Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Ability to use GE Lookup with Names Instead of IDs

Joined
May 6, 2015
Messages
16
Currently, the only way to do a GE lookup is by using an item ID. It's not difficult for a developer to lookup an item id, but my concern with statically doing so is that if Jagex decides to change them around on us it'll break the bots.
 
Joined
Apr 18, 2015
Messages
408
Currently, the only way to do a GE lookup is by using an item ID. It's not difficult for a developer to lookup an item id, but my concern with statically doing so is that if Jagex decides to change them around on us it'll break the bots.

They won't change id's, don't worry about that ;)
The general purpose of using id's and not names(strings) in all software you'll ever see is to keep that consistency when they ever decide to change the name.
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
They won't change id's, don't worry about that ;)
The general purpose of using id's and not names(strings) in all software you'll ever see is to keep that consistency when they ever decide to change the name.
They change ids more than names, we've seen it done. Anyways, regarding this suggestion, the problem is that the GE servers resolve it via id and for us to resolve the id from a name, we would have to look up the ItemDef for that name. The problem with that is we'd have to search over all items until we found it and because some items share the same name it's possible we'd get the wrong id.
 
Primate
Joined
Oct 30, 2014
Messages
3,475
They change ids more than names, we've seen it done. Anyways, regarding this suggestion, the problem is that the GE servers resolve it via id and for us to resolve the id from a name, we would have to look up the ItemDef for that name. The problem with that is we'd have to search over all items until we found it and because some items share the same name it's possible we'd get the wrong id.
Perhaps we can use some sort of query system?
 
Joined
Dec 10, 2014
Messages
3,255
Perhaps we can use some sort of query system?
iirc we use the official GE api, which allows us to query by ID but not by name.
You could load up all the definitions, find the ones with the name you want, send requests for all of those IDs until you get a valid response, but that's a terrible solution imo xD
 
Top