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.

Any Ideas?

Featured Replies

if (!myPlayer().isAnimating() && !myPlayer().isMoving()) {
                if (!myPlayer().isUnderAttack() && Guard.isVisible()) {
                    Guard.interact("Attack");
                    sleep(random(500, 1000));
                } else {
                    camera.toEntity(Guard);
                }
            }
        }
        if (myPlayer().getHealth() <=30 && getInventory().contains("Lobster")) {
            inventory.getItem("Lobster").interact("Eat");
            sleep(random(600, 1200));
        }

I get this issue when running

http://gyazo.com/32407f7a8337725e1ea21a0d621e325d

 

 

 

It would return to attack then eat a lobster when it is already full health

Try

getSkills().getDynamic(Skill.HITPOINTS) <= 30

 

  • Author

 

Try

getSkills().getDynamic(Skill.HITPOINTS) <= 30

Okay thanks

 

Try

getSkills().getDynamic(Skill.HITPOINTS) <= 30

could try this.. 

if (myPlayer().getHealth() < *HPHERE*){ 

 

could try this.. 

if (myPlayer().getHealth() < *HPHERE*){ 

wat?

wat?

was for him smile.png

was quoting you because your method will also work. 

Edited by chad0ck

 


       
        if (myPlayer().getHealth() <=30) {
    

 

 

if (myPlayer().getHealth() < *HPHERE*){ 

Erm, can you explain the difference between what he already has implemented and your suggestion?

Erm, can you explain the difference between what he already has implemented and your suggestion?

Oops, just now noticed that's what he had. Besides the less than or equal to, my apologies.  

getHealth() returns a int when hp bar above character is visible. so use the current hp to track when to eat

getHealth() returns a int when hp bar above character is visible. so use the current hp to track when to eat

getHealth works just fine with no hp bar, I tested this myself

getHealth works just fine with no hp bar, I tested this myself

it will return the wrong value. fight someone, wait until the bar disable and eat some food. youll see it wont update without the bar

it will return the wrong value. fight someone, wait until the bar disable and eat some food. youll see it wont update without the bar

I will look at this when I get home, i'm sure you are correct. Thank you for correcting me. :P


getSkills().getDynamic(Skill.HITPOINTS) // Works

myPlayer().getHealth() // Percentage, doesn't work if you logged in with not 100% life

getWidgets().get(160, 4).getMessage() // Works, only if the orbs are activated

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.