Cstrike
2010-11-28 19:35:49
Items.simba
When better becomes even more better…
All the items in Runescape, minus non GE ones (hopefully we can get Method's file to be converted to an array, then we will have mainly all of them!), are now indexed. There's a few cool functions for you:
Procedure R_ReturnItem(Item: Variant; var ItemIDs: TIntegerArray; var ItemNames: TStringArray); You're not really meant to use this, but if you know what you're doing it's a great tool, this is the main functionYou're supposed to use these
Function R_ReturnItemIDs(ItemName: String): TIntegerArray;
Function R_ReturnItemNames(ID: Integer): TStringArray;
Function R_ReturnItemID(ItemName: String): Integer;
Function R_ReturnItemName(ID: Integer): String; These will each return you an item based on your request. If you don't know the item ID… this will do the work for you. If you forget the item Name (aka UPTEXT! Omg yes uptext solved!), input the ID.
If you're going for an ambiguous item like 'gloves' that has 5 matches, use the one that returns arrays (if you use the single ones, it will only return the first match).
How do you use this?
Lets say you're fishing shark and don't want to deposit that harpoon of yours, do this:
R_DepositAllButID (R_ReturnItemID('harpoon'));
// instead of calling this...
R_DepositAllButID (311);No need to get the ID anymore, does it all for you.
The array can be completely searched in 0.015 seconds, so call it as much as you like.
EDIT: To re-iterate, yes… entering the ID will retrieve the exact uptext AFAIK
EDIT2: Names are NOT case sensitive