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.

How to delay checks

Featured Replies

How do you guys delay checks like getting the range xp or what the user is wearing, do i really need to do it onLoop with a boolean, (just to check once), at the moment im doing it with onStart(), but it isnt that good because when the user is logged out and lets say the user starts the script it would be null ofcourse because he/she wasnt logged in.

 

so i would like to hear what you guys do, just simply onLoop? :)

 

 

I put nothing in the onStart() method and just run a loop in the start of the onLoop() method. This logs the user in and then you can check the xp and gear.

Edited by Jack

I know what you're saying. If you put it o nthe onStart() and the person starts logged out it will f up ur xp tracking. However the best way is to just use the expTracker class in OSb's api.

  • Author

I know what you're saying. If you put it o nthe onStart() and the person starts logged out it will f up ur xp tracking. However the best way is to just use the expTracker class in OSb's api.

 

 

Yeah, but stil would be a problem for checking equipmentTab what the player is wearing :P

I think you could put something like this in your onloop

if(!checked && client.getLoginState() == 30){
            checkThings();
}

What the guy above me said. If you want to check things once, either set the variable to something it wouldn't be possible to reach when checked through the loop, or use a boolean to lock the if statement forever once the code is run.

int startXP = -1;

public void update(Script script){

if(startXP == -1){
startXP = script.getXP();
}

}

Since players don't ever have negative xp, it doesn't matter what we set that to. I do suggest that if you are needing multiple checks, to just make a superate class and place the update method at the start of your onLoop() method so it doesn't clutter stuff up for you.

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.