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.

Object reference becomes irrelevant when reloading, how to?

Featured Replies

Ok, so I have an Entity variable holding the value of an entity (not null). 

When I walk away far enough or teleport away, this variable's value becomes irrelevant: when you walk back to the initial Entity the value does not refer to that same Entity anymore (I doesn't refer to anything anymore actually). I suppose this is because the game reloads and a new reference is given, if I'm wrong about this please inform me :)

 

Is there a way to store the initial value so that it does not become irrelevant whenever an entity is reloaded? I'm thinking about storing data of the initial Entity and then re-scanning for that data, but kinda hoping for a better solution :p

The way our wrapper system works is simply to wrap the client's reference of the entity. Unfortunately because of the way the RuneScape game engine works, there exists the situation which you have described. If it's a player or npc, you can call .getIndex() to get the player or npc's index on the client's global list. For objects you can do .getUID() to get the unique hash of the object. 

  • Author

The way our wrapper system works is simply to wrap the client's reference of the entity. Unfortunately because of the way the RuneScape game engine works, there exists the situation which you have described. If it's a player or npc, you can call .getIndex() to get the player or npc's index on the client's global list. For objects you can do .getUID() to get the unique hash of the object. 

 

Ah beast! Exactly what I was looking for :D

ty!

Guest
This topic is now closed to further replies.

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.