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.

[solved] Cannot getWalking.walk() when under attack

Featured Replies

Hello,

I cant seem to figure out why my script wont move when I am under attach. I tried using:

getWalking().walk(Constants.safeTile3);
getWalking().walkPath(Constants.safeSpotPath);
getWalking().webWalk(Constants.safeSpotArea);

any ideas? (these areas/positions are all easily reachable. not obstacles in the way or anything)
 

thanks

Edited by yawhide

use a WalkingEvent and set the minDistanceThreshold to 0 if the tile is less than 4 tiles away

otherwise it is an error in your logic

//p is a position

if (myPlayer().getPosition().equals(p)) { //if on tile attack
            NPC npc = getNpcs().closest(npc -> npc.getName().equals("monster") && npc.isAttackable());
            if (myPlayer().getInteracting() == null) { //if not interacting
                if (npc != null && npc.interact("Attack")){
                    getMouse().moveOutsideScreen();
                    new ConditionalSleep(20000) {
                        @Override
                        public boolean condition() {
                            return getCombat().isFighting() || myPlayer().getInteracting() != null;
                        }
                    }.sleep();
                }
            } else { //sleep for a bit while interacting
                sleep(100);
            }
        } else {
            if (p.isVisible(getBot())) { //click if tile 
                getMouse().click(new MainScreenTileDestination(getBot(), p));
                sleep(1750);
            } else getWalking().walk(p); //walk if not onscreen
        }

 

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.