1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Ability to use GE Lookup with Names Instead of IDs

Discussion in 'Client & Site Suggestions' started by DesignDecay, Jul 2, 2015.

  1. DesignDecay

    Joined:
    May 6, 2015
    Messages:
    16
    Likes Received:
    0
    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.
     
  2. Hazard

    Joined:
    Apr 18, 2015
    Messages:
    408
    Likes Received:
    84
    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.
     
  3. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    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.
     
  4. Defeat3d

    Defeat3d Primate

    Joined:
    Oct 30, 2014
    Messages:
    3,017
    Likes Received:
    1,890
    Perhaps we can use some sort of query system?
     
  5. SlashnHax

    Joined:
    Dec 10, 2014
    Messages:
    3,198
    Likes Received:
    1,041
    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
     

Share This Page

Loading...