![]() |
find, collect and extract - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: find, collect and extract (/Thread-find-collect-and-extract) |
find, collect and extract - ograso - 05-28-2014 12:10 AM Hey all, I am trying to write a store crystal but I need some information about it. - I need to know How can I find out spesific item in your bag. (for ex. I am trying find out all i_reag_mandrake_root or i_reag_black_pearl) - This store crystal item must be a storage and automaticly collect all items in your bag. - Last thing is extraction. For example there 1000 i_reag_mandrake_root in store crystal item and I wanna extract 100 mandrake root to my bag. How can I do that RE: find, collect and extract - Extreme - 05-28-2014 01:44 AM You have many options: (2 of them) 1 - create a list with all reagent ids and search them using <rescount i_reag_name> PHP Code: [defnames reags] 2 - using a recursive forcont in your backpacks (backpack inside your main backpack) and check if they are t_reagent PHP Code: [function grabreags] Will you store the reagents using TAGs? If yes, you will have to remove the reags and add the amounts in your pack in the tags. To grab values from the crystal, make buttons and when pressed, create x amount of you want and place in backpack and decrease the same value from the tags. To know what items are stored in the crystal, store the reagents baseid in one tag, like tag.items i_reag_nightshade,i_reag_blood_moss and in your gump, make a for to fill the dialog. |