|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
General::General Discussion General discussion about EverQuest(tm), EQEMu, and related topics. Do not post support topics here. |
12-03-2008, 05:13 AM
|
Hill Giant
|
|
Join Date: Apr 2002
Location: Rochester, NY
Posts: 178
|
|
#itemsearch GUI ... ?
I had a thought today. I wonder if we could make a UI addon that tied into #itemsearch and #summonitem so you could visually see the item's stats before summoning. It would be pretty useful for GM's i think. Using the baseline for the window, we could use the bazaar UI window, but instead of searching for bazaar items, it could refer to the #itemsearch command instead, and probably could throw a button in for a #summonitem command. I dunno, just an idea, any thoughts?
__________________
U.S. Navy - Retired
17 Year EQ Veteran
|
12-03-2008, 08:07 AM
|
Sarnak
|
|
Join Date: Dec 2004
Posts: 71
|
|
OH MY AND/OR YOUR GOD!!! That is exactly what is needed. I have always thought about wanting something like this, but I didn't have any wya to implement it to be useful. But using the bazaar window type thing sounds perfect. I hope someone with the knowledge can confirm if this can be done or not.
|
12-07-2008, 10:05 PM
|
"Special" Member
|
|
Join Date: Jul 2007
Posts: 373
|
|
Quote:
Originally Posted by Furinex
I had a thought today. I wonder if we could make a UI addon that tied into #itemsearch and #summonitem so you could visually see the item's stats before summoning. It would be pretty useful for GM's i think. Using the baseline for the window, we could use the bazaar UI window, but instead of searching for bazaar items, it could refer to the #itemsearch command instead, and probably could throw a button in for a #summonitem command. I dunno, just an idea, any thoughts?
|
this would be great, and usefull for that fact. if it was implemented it would be easy
|
|
|
|
12-08-2008, 01:11 AM
|
|
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
Making a UI for that would probably be pretty tough. But, I was thinking of an idea that might help a little for admins. The idea is to make a command that will pop up an item stats window just like you had clicked an item link, or right clicked an item. Basically, you would search for items and then type something like #itemlink <Item ID>, or #il <Item ID> for short. Then, it would just pop up the window for stats. This would save a little time from having to summon the item, put it in your inventory, then right click to show the stats. I always check item stats before using the #giveitem command to verify that I am giving the correct item. This command would help a bit for doing that.
The code there DOES NOT work yet, it is just there as a place to start working on it. Hopefully I or someone else can get it working at some point. Here is a link to the post on my site about it:
http://stormhavenserver.com/forums/v...php?f=25&t=578
|
|
|
|
12-08-2008, 01:22 AM
|
|
The PEQ Dude
|
|
Join Date: Apr 2003
Location: -
Posts: 1,988
|
|
Why not just have #finditem list the item link instead of just the name?
|
12-08-2008, 01:34 AM
|
|
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
That is an AWESOME idea, CD! Genius! I am definitely gonna see if I can figure out how to do that lol. I also might increase the output max of finditem to higher than 20 unless anyone apposes. I think 50ish would be better. Oh, and I think an alias command of #fi would help a bit too. That is an easy little fix.
|
|
|
|
12-08-2008, 06:57 AM
|
|
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
Well, that was WAY easier than I thought it would be lol (took like 5 minutes to do). I am going to add this to the SVN right now
command.cpp - Replace the old itemsearch command with this (changes are in RED):
Code:
void command_itemsearch(Client *c, const Seperator *sep)
{
if (sep->arg[1][0] == 0)
c->Message(0, "Usage: #itemsearch [search string]");
else
{
const char *search_criteria=sep->argplus[1];
const Item_Struct* item = 0;
if (Seperator::IsNumber(search_criteria)) {
item = database.GetItem(atoi(search_criteria));
if (item)
c->Message(0, " %i: %c%06X000000000000000000000000000000000000000%s%c",(int) item->ID,0x12, item->ID, item->Name, 0x12);
else
c->Message(0, "Item #%s not found", search_criteria);
return;
}
#ifdef SHAREMEM
int count=0;
//int iSearchLen = strlen(search_criteria)+1;
char sName[64];
char sCriteria[255];
strn0cpy(sCriteria, search_criteria, sizeof(sCriteria));
strupr(sCriteria);
char* pdest;
int32 it = 0;
while ((item = database.IterateItems(&it))) {
strn0cpy(sName, item->Name, sizeof(sName));
strupr(sName);
pdest = strstr(sName, sCriteria);
if (pdest != NULL) {
c->Message(0, " %i: %c%06X000000000000000000000000000000000000000%s%c",(int) item->ID,0x12, item->ID, item->Name, 0x12);
count++;
}
if (count == 50)
break;
}
if (count == 50)
c->Message(0, "50 items shown...too many results.");
else
c->Message(0, "%i items found", count);
#endif
}
}
I am going to add the #fi alias for finditem as well. This command is awesome! Thanks CD for the idea lol. I don't know why no one thought of this before now!
EDIT: The more I play with this command, the more I love it! It's just so freakin cool! This is now in Revision 237. Lemme know how you like it, or if there are any changes/fixes that are needed.
Last edited by trevius; 12-08-2008 at 03:18 PM..
|
|
|
|
|
|
|
12-08-2008, 03:04 PM
|
Developer
|
|
Join Date: Mar 2007
Location: Ohio
Posts: 648
|
|
Quote:
Originally Posted by trevius
But, I was thinking of an idea that might help a little for admins. The idea is to make a command that will pop up an item stats window just like you had clicked an item link, or right clicked an item. Basically, you would search for items and then type something like #itemlink <Item ID>, or #il <Item ID> for short. Then, it would just pop up the window for stats.
The code there DOES NOT work yet, it is just there as a place to start working on it. Hopefully I or someone else can get it working at some point. Here is a link to the post on my site about it:
http://stormhavenserver.com/forums/v...php?f=25&t=578
|
First of all, if we wanted to sent an item window, I think we can utilize something like this:
zone/client_packet.cpp
Code:
void Client::Handle_OP_ItemLinkResponse(const EQApplicationPacket *app) {
LDONItemViewRequest_Struct* item = (LDONItemViewRequest_Struct*)app->pBuffer;
ItemInst* inst = database.CreateItem(item->item_id);
if (inst) {
SendItemPacket(0, inst, ItemPacketViewLink);
safe_delete(inst);
}
return;
}
I was also working on a function to parse an item instance and return the "link" part that we need (so everything except the item name & null characters so we can use it for both links in the chat window & links in Task windows, etc). I haven't worked on it for a bit, and what I have so far doesn't work right due to some memory definitions, but here's the diff:
Code:
Index: zone/client.h
===================================================================
--- zone/client.h (revision 229)
+++ zone/client.h (working copy)
@@ -674,6 +674,7 @@
void SetStats(int8 type,sint16 set_val);
void IncStats(int8 type,sint16 increase_val);
void DropItem(sint16 slot_id);
+ bool MakeItemLink(char *return_link, const ItemInst* inst);
void SendItemLink(const ItemInst* inst, bool sendtoall=false);
void SendLootItemInPacket(const ItemInst* inst, sint16 slot_id);
void SendItemPacket(sint16 slot_id, const ItemInst* inst, ItemPacketType packet_type);
Index: zone/inventory.cpp
===================================================================
--- zone/inventory.cpp (revision 229)
+++ zone/inventory.cpp (working copy)
@@ -477,7 +477,44 @@
}
}
+bool Client::MakeItemLink(char *return_link, const ItemInst *inst) {
+ //we're sending back the entire "link", minus the null characters & item name
+ //that way, we can use it for regular links & Task links
+ //note: initiator needs to pass us return_link
+ /*
+ if (!inst) //have to have an item to make the link
+ return false;
+ const Item_Struct* item = inst->GetItem();
+ //format:
+ //0 itemid aug1 aug2 aug3 aug4 aug5 evolving? loregroup evolved level hash
+ //0 00000 00000 00000 00000 00000 00000 0 0000 0 00000000
+ //length:
+ //1 5 5 5 5 5 5 1 4 1 8 = 45
+ //evolving item info: http://eqitems.13th-floor.org/phpBB2/viewtopic.php?t=145#558
+ //char link[45+1] = "0" "00000" "00000" "00000" "00000" "00000" "00000" "0" "0000" "0" "00000000";
+ int8 evolving = 0;
+ uint16 loregroup = 0;
+ int8 = evolvedlevel = 0;
+ int hash = 0;
+ return_link = sprintf(&link, "%1X%05X%05X%05X%05X%05X%05X%1X%04X%1X%08X",
+ 0,
+ item->ID,
+ inst->GetAugmentItemID(0),
+ inst->GetAugmentItemID(1),
+ inst->GetAugmentItemID(2),
+ inst->GetAugmentItemID(3),
+ inst->GetAugmentItemID(4),
+ evolving,
+ loregroup,
+ evolvedlevel,
+ hash
+ );
+
+ return true;
+ */
+}
+
void Client::SendItemLink(const ItemInst* inst, bool send_to_all)
{
/*
All you would have to do is feed an item instance to it, which would include augments.
If someone wants to mess with this, feel free.
|
|
|
|
12-08-2008, 01:07 AM
|
Banned
|
|
Join Date: Oct 2003
Location: Mattmecks Basement
Posts: 546
|
|
Quote:
Originally Posted by Furinex
I had a thought today. I wonder if we could make a UI addon that tied into #itemsearch and #summonitem so you could visually see the item's stats before summoning. It would be pretty useful for GM's i think. Using the baseline for the window, we could use the bazaar UI window, but instead of searching for bazaar items, it could refer to the #itemsearch command instead, and probably could throw a button in for a #summonitem command. I dunno, just an idea, any thoughts?
|
I believe that UI creation/editing is a lost art my friend.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 02:07 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|