TheMcPker Posted February 24, 2018 Share Posted February 24, 2018 (edited) Hey guys anyone has a code snippet to receive the name of a item using the item id? (could be webbased or scriptbased But not api dependent) Edited February 24, 2018 by TheMcPker Quote Link to comment Share on other sites More sharing options...
Butters Posted February 24, 2018 Share Posted February 24, 2018 Probably not gonna help you out here, but if there's at least a little posibility to use names and not ids - always use names. Quote Link to comment Share on other sites More sharing options...
TheMcPker Posted February 24, 2018 Author Share Posted February 24, 2018 (edited) 6 minutes ago, nosepicker said: Probably not gonna help you out here, but if there's at least a little posibility to use names and not ids - always use names. It is used to display item names on a website and i get item id's from my scripts im running (which get pushed to website) so i wanna find a way to just find the item name using item id so well itemid's do not really give the user any real usefull info (it is not possible for me to get the item name out of the game) Edited February 24, 2018 by TheMcPker Quote Link to comment Share on other sites More sharing options...
Explv Posted February 24, 2018 Share Posted February 24, 2018 (edited) 18 minutes ago, TheMcPker said: Hey guys anyone has a code snippet to receive the name of a item using the item id? (could be webbased or scriptbased) ItemDefinition def = ItemDefinition.forId(id); if (def != null) { String name = def.getName(); } https://osbot.org/api/org/osbot/rs07/api/def/ItemDefinition.html#forId-int- Edited February 24, 2018 by Explv Quote Link to comment Share on other sites More sharing options...
TheMcPker Posted February 24, 2018 Author Share Posted February 24, 2018 17 minutes ago, Explv said: ItemDefinition def = ItemDefinition.forId(id); if (def != null) { String name = def.getName(); } https://osbot.org/api/org/osbot/rs07/api/def/ItemDefinition.html#forId-int- Thanks the script im making is in a diffrent botclient tho (i should of mentioned this in my first post il edit it now) my first thought was maby use some website to lookup the name there but i suck at that kinda stuff xD Quote Link to comment Share on other sites More sharing options...
Explv Posted February 24, 2018 Share Posted February 24, 2018 (edited) 34 minutes ago, TheMcPker said: Thanks the script im making is in a diffrent botclient tho (i should of mentioned this in my first post il edit it now) my first thought was maby use some website to lookup the name there but i suck at that kinda stuff xD Then why not post on their forum? Yes there are websites which you could use to lookup the name from ID for example http://www.itemdb.biz/ (may not support all items though) Not going to spoonfeed you a snippet to do it either Edited February 24, 2018 by Explv 1 Quote Link to comment Share on other sites More sharing options...