PDA

View Full Version : New Plugin: Pack Search


hellgo
12-07-2004, 04:02 AM
Why organize when you can Query?

hey im mostly done with a new plugin which will allow you to look thru your entire inventory and find items. /query "some text" where some text is what your looking for weather its a catagory (food, weapons , green, etc) or a name (tin, ore, bar etc) and put every item it finds into a new window that looks like your main back pack.

the items in this new window can be put onto your action bar, used, or sold but not re-aranging cuase its not really your pack.

currently you can search for any item buy partial name but ill be expanding it to allow words, catagorys, and qualities of the item to be returned for instance /query cat:bow qual:green will return all bows that are green or /query name:sword qual:grey will return any item with sword in its name thats a grey item. etc.

i am also looking to alow you to destroy items.

im thinking it would be best to use a macro and put it in the pop bar as a way to just pop up the commonly used queries.

-deleteion complete (didnt even know it was...)

sarf
12-07-2004, 04:09 AM
Sounds neat!

Sarf
---
This is precisely the sort of thing that people who like this sort of thing will like.

blademage727
12-07-2004, 04:18 AM
That sounds totally awesome. I can't wait. =D

Anonymous
12-07-2004, 06:31 AM
this could take a lil bit, the only efficent way to do the class sorting is to write a hash function to do it (order N vs N^2 without hashing) only kicker is i dont know LUA so.

hellgo
12-07-2004, 06:32 AM
that was me above, forgot to login

sarf
12-07-2004, 07:39 AM
Check out Sea.

ClassifyItem for teh w1n! :)

Sarf
---
The short fortune-teller who escaped from prison was a small medium at large.

Anonymous
12-07-2004, 07:52 AM
yea i know im gonna use that but to ive got 2 options

compare each item in the inventory to each item in a catagory requested or
created a perfect hash table and insert your inventory into it then insert the catagory list into the hash table and check for collisions.

the first method means i do N^2 comparisons were as with the hastable its N comparisons where N is the number of items in the catagory tree

sarf
12-07-2004, 08:12 AM
Hmm... yes... on the other hand, you have the overhead for the hash table.

And with only 4x20+1x16 (=96) maximum number of slots right now, the speed difference isn't that great - it is retrieving the item info that is the costly operation.

Sarf
---
"A study in the Washington Post says that women have better verbal skills than men. I just want to say to the authors of that study: Duh." - Conan O'Brien

Anonymous
12-07-2004, 04:22 PM
Why is efficiency an issue? What are we talking a maximum of 12*5 = 60 slots. Even with the most inefficient search the time spent would be trivial. Unless each check is handled seperately with the server in which case I suppose there may be some lag.

blademage727
12-07-2004, 04:25 PM
Hey I downloaded this, but when I ran the game, there was a bug and it kept trying to sort my bag or something like that. I replaced the sea files like you said, so I don't know what happened. BTW I am using cosmos. So yeah, it sorta just froze I guess.

smashy
12-07-2004, 06:07 PM
Sorry -- I must have missed it:
What's the download link?

Gryphon
12-07-2004, 06:43 PM
I think blademage727 posted in the wrong thread and is talking about BagSort.

blademage727
12-07-2004, 06:56 PM
Yeah I did. ^_^" Sorry. I just realized it when I noticed my post wasn't in that thread.

Anonymous
12-08-2004, 12:05 AM
http://www.wowwiki.com/Query
you can find the newest verison and notes here.

jwwpua
12-09-2004, 01:01 AM
Hey I like the addon, but when I use

/query qual: grey

It only returns my throwing knives, but not some grey weapons that I have from drops (mace, dagger, etc). Also the knives aren't even grey, they're white.

Suggestion: add usage info and examples when there are no arguments, just for a quick reference! Also, return an error mesage if an argument is typed incorrectly, instead of just returning all items in your inventory.

Overall, I love the addon :)

Darksun
12-09-2004, 07:22 PM
Hmm... yes... on the other hand, you have the overhead for the hash table.

And with only 4x20+1x16 (=96) maximum number of slots right now, the speed difference isn't that great - it is retrieving the item info that is the costly operation.

Sarf
---
"A study in the Washington Post says that women have better verbal skills than men. I just want to say to the authors of that study: Duh." - Conan O'Brien

BagSort works on a hash table like this. In fact, it takes a "snapshot" of your pack. Then sorts the snapshot (selection sort for the geeks). Then it compares that to your pack and re-arranges your pack to match the sorted table.

The first two steps don't take any noticeable time to complete. The performance hit is when you start re-arranging the actual items.

Anyway, feel free to look at the part of BagSort that uses Sea read the item info and make a table out of them.

BagSort (http://www.darksun.lunarpages.com/downloads/)

-Darksun

P.S. the bugs described in above posts have been fixed.

Anonymous
12-10-2004, 09:01 PM
thanks dark sun i will take a look at that.

jwwpua - that was becuase i incorrectly identified grey vs white items and its been fixed as of yesterday or the day before that i think.

hellgo
12-10-2004, 09:04 PM
auto login just doesnt seem to want to stay for me...

also ill look into adding your suggestions jwwpua. however if an arguement is typed incorrectly such as catt: and name: proceded it then it will assume catt: is a name. which makes sending error messages unfriendly. the only thing i can really check for is if word: and see if a word ends with : and if that word is valid.

also darksun , while i havent looked yet is it able to handle inventory updates without rescanning the whole pack?