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.

Combat Formula

Featured Replies

Hi all,

 

I have recently started to script again and I was wondering if there is already a standard way of obtaining a target to attack. I have already started to develop my own targeting method, but any helpful hints are appreciated!

 

Thanks,

ZaqMasterBot

I found that in the API after I posted this, but I am still having trouble using it.

 

Mind sharing an example of your usage

I found that in the API after I posted this, but I am still having trouble using it.

final NPC npc = npcs.closest(new Filter<NPC>() {
                @Override
                public boolean match(NPC npc) {
                    return npc != null && npc.getName().equals("Monster name here") && !npc.isUnderAttack() && npc.getHealth() > 0 && map.canReach(npc);
                }
            });
  • Author
final NPC npc = npcs.closest(new Filter<NPC>() {
                @Override
                public boolean match(NPC npc) {
                    return npc != null && npc.getName().equals("Monster name here") && !npc.isUnderAttack() && npc.getHealth() > 0 && map.canReach(npc);
                }
            });

That @Override is needed I assume?  Gets me every time. 

That @Override is needed I assume?  Gets me every time. 

Yes

  • Author

Two questions: is isUnderAttack() and checking the health more reliable that isAttackable()? When using global vars in onStart() I get:  Error in script onStart(): TestScriptOne in the client?

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.