Go Back   EQEmulator Home > EQEmulator Forums > General > General::General Discussion

General::General Discussion General discussion about EverQuest(tm), EQEMu, and related topics.
Do not post support topics here.

Reply
 
Thread Tools Display Modes
  #1  
Old 12-03-2008, 05:13 AM
Furinex
Hill Giant
 
Join Date: Apr 2002
Location: Rochester, NY
Posts: 178
Default #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
Reply With Quote
  #2  
Old 12-03-2008, 08:07 AM
yoman258
Sarnak
 
Join Date: Dec 2004
Posts: 71
Default

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.
Reply With Quote
  #3  
Old 12-07-2008, 10:05 PM
liquest
"Special" Member
 
Join Date: Jul 2007
Posts: 373
Default

Quote:
Originally Posted by Furinex View Post
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
Reply With Quote
  #4  
Old 12-08-2008, 01:07 AM
Richardo
Banned
 
Join Date: Oct 2003
Location: Mattmecks Basement
Posts: 546
Default

Quote:
Originally Posted by Furinex View Post
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.
Reply With Quote
  #5  
Old 12-08-2008, 01:11 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #6  
Old 12-08-2008, 01:22 AM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

Why not just have #finditem list the item link instead of just the name?
Reply With Quote
  #7  
Old 12-08-2008, 01:34 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #8  
Old 12-08-2008, 06:57 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 12-08-2008 at 03:18 PM..
Reply With Quote
  #9  
Old 12-08-2008, 11:25 AM
Zeice
Sarnak
 
Join Date: Oct 2008
Location: USA
Posts: 92
Default

I added those changes and I can't get it to work. Am I supposed to do something other than just save the file like compile it or anything?
Reply With Quote
  #10  
Old 12-08-2008, 01:08 PM
Furinex
Hill Giant
 
Join Date: Apr 2002
Location: Rochester, NY
Posts: 178
Default

UI creation might be lost for some, but Im in the process of incorporating a modified Bazaar UI window that will do the #itemsearch command and list more than 20. The max I seem I could get it to show is 50 atm, but im working on maxing that out. I will post UI files when I get this working, shouldnt take me more than a week, im Underway right now so I dont have my computer with me and I dont have the tools nessisary. Anyways, I'll post back with more info when I get back home.
__________________
U.S. Navy - Retired
17 Year EQ Veteran
Reply With Quote
  #11  
Old 12-08-2008, 03:04 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Quote:
Originally Posted by trevius View Post
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.
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #12  
Old 12-08-2008, 04:31 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Quote:
Originally Posted by Zeice View Post
I added those changes and I can't get it to work. Am I supposed to do something other than just save the file like compile it or anything?
Yes, once you make that change, you need to compile it
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #13  
Old 12-26-2008, 03:53 AM
Furinex
Hill Giant
 
Join Date: Apr 2002
Location: Rochester, NY
Posts: 178
Default

Well I have an alpha of the bazaar window, im still out at sea (missed christmas :( ) but I should be back by new years, Im having issues uploading it from here... but here's what i've got so far. The window replaces ALT+K (Mp3 player) but it can replace any window you wish to specify (like the bandolier or whatever...Anyways, it opens just like the bazaar window, instead of "Find Trader", the button is replaced by "Summon Item". Ive also narrowed down the search paramiters so it looks for items by class, race, and all other specifications that you can do in the bazaar window. I will post this completed project when I get home. Later yall.
__________________
U.S. Navy - Retired
17 Year EQ Veteran
Reply With Quote
  #14  
Old 12-26-2008, 04:23 AM
Richardo
Banned
 
Join Date: Oct 2003
Location: Mattmecks Basement
Posts: 546
Default

I'll believe it when I see it. Hah-hah-hah.. :p
Reply With Quote
  #15  
Old 12-26-2008, 04:33 AM
Gonner
Fire Beetle
 
Join Date: Aug 2007
Location: Columbus Grove, Ohio
Posts: 22
Default

You can use the /Buyer window in the bazaar to see the stats of everything. Sadly though its not my number but by name.
__________________
The reason I talk to myself is because I am the only one whose answers I accept.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 12:39 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3