SRL Archive - Newly Added to Reflection

All items indexed! At your fingertips now...


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 function

You'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

Sex

2010-11-28 19:39:22

This looks cool. I might have to start scripting again.
Keep up the good work <3 :).

Coh3n

2010-11-28 20:08:30

Wonderful! :)

Won't need to input all the item IDs in MSI now. Do you plan on creating a similar database for object IDs? I suppose it could be done with everything really: animations, ground items, and whatever else reflection has. :p

pyroryan

2010-11-28 20:16:53

I haven't looked at cache extraction at all, so Method is the epic pro to talk to for any possibilities on this :)

Coh3n

2010-11-28 21:12:28

From: pyroryan
I haven't looked at cache extraction at all, so Method is the epic pro to talk to for any possibilities on this :)

Okay.

What about if you want the ID for the noted version of an item? What would you put in for the name? I noticed in the All Item Names text file there was (noted) beside some names, does that mean you'd do

GetItemID('Rune hatched (noted)');
?

Cstrike

2010-11-28 21:14:24

From: Coh3n
Okay.

What about if you want the ID for the noted version of an item? What would you put in for the name? I noticed in the All Item Names text file there was (noted) beside some names, does that mean you'd do

GetItemID('Rune hatched (noted)');
?


We're working on that ;)
We tried using the true fully all out list, but Simba just can't handle it. We're going to have to make a work around… I've got an idea.

The complete list would have the ' (noted)' text in there as well and support ALL items, not just GE ones

pyroryan

2010-11-28 21:27:37

From: Coh3n
Okay.

What about if you want the ID for the noted version of an item? What would you put in for the name? I noticed in the All Item Names text file there was (noted) beside some names, does that mean you'd do

GetItemID('Rune hatched (noted)');
?




notedID := GetItemID('Rune hatchet')+1;
That should do it.

Edit:
It doesn't always do it.
Method says that there are "199 cases where that's not valid"

Coh3n

2010-11-28 23:03:46

From: pyroryan
Edit:
It doesn't always do it.
Method says that there are "199 cases where that's not valid"

Yeah, I remember reading that in another thread. :(

pyroryan

2010-11-28 23:15:46

Method just got the objects for us :)! I turned them into arrays and sent them over to cstrike.

Coh3n

2010-11-29 00:46:44

From: pyroryan
Method just got the objects for us :)! I turned them into arrays and sent them over to cstrike.

Wow! I may not need to do any ID gathering! :D