Skip 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.

In Combat?

Featured Replies

Would be nice to see some more combat related methods like inCombat()

  • Author

My bad didnt see that thanks

isUnderAttack() doesn't seem to work mate.

 

In what context are you using it

Peter was most likely referring to the code I was showing him.

 

 

 

        if (client.getMyPlayer().isUnderAttack()) {           log("Detected combat.")           state = State.WALK_TO_BANK           return 300 + gRandom(100, 400)       } 

Peter was most likely referring to the code I was showing him.

 

 

 

        if (client.getMyPlayer().isUnderAttack()) {           log("Detected combat.")           state = State.WALK_TO_BANK           return 300 + gRandom(100, 400)       } 

 

Quick Question as I don't know too much about scripting and am trying to learn.

What is the return doing, or what exactly is it you're returning.

Like why return 300?

Quick Question as I don't know too much about scripting and am trying to learn.

What is the return doing, or what exactly is it you're returning.

Like why return 300?

The method (a.k.a. function or subroutine) specifies that it will result in an integer value. In this case, the caller of the method (the thing that executed it) took that returned value and pauses for the amount of milliseconds that that integer value represents.

The method (a.k.a. function or subroutine) specifies that it will result in an integer value. In this case, the caller of the method (the thing that executed it) took that returned value and pauses for the amount of milliseconds that that integer value represents.

 

Oh okay.

Must it be implemented in the code?

Oh okay.

Must it be implemented in the code?

In case you didn't understand, it's basically how long the script gets to think before moving on.

 

And yes, I do believe you must have it implemented.

In case you didn't understand, it's basically how long the script gets to think before moving on.

 

And yes, I do believe you must have it implemented.

 

Yeah, I figured that out.

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

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.