Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Should we use item/npc/object IDs or names? When/Why?

Featured Replies

When looking for/interacting with an item/npc/object, is it preferred to use the ID or the name? Are there times when one would be preferred over the other? What's the benifit from using a name rather than an ID and vice versa?

I haven't seen this question answered publicly, and I'm sure it'll be helpful seeing how it's a common aspect of scripting

i dont think item ids ever change but objects ids sometimes do. It will be easier to just use names for objects incase of a rs update.

 

Hope my nooby self helped somewhat

Edited by TheObserver

Ye,

 

Object Ids change frequently (pretty much every RS update), so basically you should use anything other than IDs to define them... Index/name etc

 

As for item IDs, these never change but using names is probably better anyway because a name is guarenteed never to change :) also easier to read when using names.

 

apa

Only downside to using the name is it applies to noted items aswell as unnoted :3

  • Author

i dont think item ids ever change but objects ids sometimes do. It will be easier to just use names for objects incase of a rs update.

 

Hope my nooby self helped somewhat

  

Ye,

 

Object Ids change frequently (pretty much every RS update), so basically you should use anything other than IDs to define them... Index/name etc

 

As for item IDs, these never change but using names is probably better anyway because a name is guarenteed never to change :) also easier to read when using names.

 

apa

  

Only downside to using the name is it applies to noted items aswell as unnoted :3

  

Item id's never change, so thats not a problem.

NPc's and gameobjects do change, so you should use names for those :)

 

There also more advanced ways, like using models to search for entities ^^

 

Khaleesi

So it seems you should use IDs for items to avoid name collisions with noted items and names for objects incase their IDs change. What about NPCs?

      

So it seems you should use IDs for items to avoid name collisions with noted items and names for objects incase their IDs change. What about NPCs?

 

Same applies to NPCs I believe. Their IDs frequently change. I recommend using names for NPCs

 

I try and avoid using ids for anything tbh. Either names (or if they dont work eg multiple npcs with same name next to eachother), I find some other difference between them such as modified colours or index

      

So it seems you should use IDs for items to avoid name collisions with noted items and names for objects incase their IDs change. What about NPCs?

 

Item id's never change, so you can use them if you want to smile.png

 

Entities have their ID changed every update.

This means, NPC's and objects will have swapped ID's.

 

So you should use names.

 

NOte: Jagex will be a bitch and call some npcs/gameobjects "null".

You should use models to get those specific entities ^^

 

Khaleesi

Edited by Khaleesi Scripts

Only downside to using the name is it applies to noted items aswell as unnoted :3

There's a boolean for is noted items

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.