February 24, 20187 yr 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, 20187 yr by TheMcPker
February 24, 20187 yr 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.
February 24, 20187 yr Author 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, 20187 yr by TheMcPker
February 24, 20187 yr 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, 20187 yr by Explv
February 24, 20187 yr Author 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
February 24, 20187 yr 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, 20187 yr by Explv
Create an account or sign in to comment