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.

Scripting Help // Attacking NPC

Featured Replies

Is there any way to make it so it stops clicking the NPC while it's already attacking it? I know I could just make it sleep for a while after it attacks.. but you could obviously kill it in different amounts of time every time, and I know there are better ways. So, I've tried to make it so if it will only click attack if I'm not animating (attack animation), but after every hit it just attacks it again, and the problem with that is there are several NPCs of that type and it attacks a different one each time. 

 

So is there something like:

 

 

if (!client.getMyPlayer().isAttacking) {

 

?

 

It would be really useful.. thanks smile.png

 

EDIT: I don't think isUnderAttack() would work because it's ranging something from a safespot. I'll try though.

Edited by DJay

  • Author

What kind of script are you making

 

Just something that ranges monsters from a safespot. It will be free for everyone.

something like this

NPC chicken = closestAttackableNPCForName("Chicken");
        if (myPlayer().isUnderAttack() && myPlayer().isAnimating() && myPlayer().isFacing(chicken)) {
            sleep(200);
        } else {
            chicken.interact("Attack");
            sleep(random(700, 900));
        }

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.