![]() |
|
Listing items - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Listing items (/Thread-Listing-items) |
Listing items - JohnVeritas - 05-21-2014 09:31 PM Hello guys, I want to list items with a proper command but I want the listed items placed by their amout. For instace; I have a lot of potions, when I use the command .listpotions, I want to see, which potions I have and how many of them. And if I have 20 heal 19 cure and 21 refresh, in the list refresh potion must be the first place, also I dont want to see the potion names that I dont have in my backpack. (p.s Sorry about my bad english. ) RE: Listing items - Alaric - 05-21-2014 10:49 PM Do you have stackable potions or separate? for stackable: 1. use a function with forconttype t_potion - store potion uids separated by comma in one local.string. Send the whole string to second function that will sort it.nope 2. MySQL 3. usin a list- basically the same as the long string in the first case. RE: Listing items - JohnVeritas - 05-21-2014 11:29 PM My potions are stackable but dont stand upon it, it's just a sample, it could be ores too. Anyways I see, I can get values of my potions with checking forconttype t_potion but I can't understand how to store uids, can u show a example ? RE: Listing items - Coruja - 05-22-2014 12:20 AM you must use RESCOUNT Code: [FUNCTION listpotions]RE: Listing items - JohnVeritas - 05-22-2014 12:33 AM Well I'm already done a list script but it just too simple. Check it; Code: [function pots] But... I want that list count potions and list them "much to less" by their amount. RE: Listing items - Alaric - 05-22-2014 12:57 AM Its bad with thos uids, ignore it. You have to really use the rescount. (Didn't know sphere has this function )I don't know about an easy way to do this, damn... Everything is too heavy. |