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.

Issues with WalkingEvent

Featured Replies

Hey all, currently having an issue sometimes with walking event. My logger will show that I have reached the walk event, but will sometimes not actually move, or attempt to move, even though in the logger it says it has generated a tile and is executing the walk event. Other times it works perfectly.

Im new to the API, so I'm unsure if I should be using WalkingEvent? I might need to fine tune my tile selection though.

@Override
    public void process() throws InterruptedException {
        List<NPC> dangerousNPC = script.getNpcs().filter(script::isDangerousNPC);
        dangerousNPC.forEach(npc -> {
            if (script.currentState != States.LOOT && !script.myPlayer().isMoving()) {
                WalkingEvent myEvent = new WalkingEvent(new Position(findAnySafeTile(npc, potentialSafeTiles)));
                script.execute(myEvent);
                script.log("Generated safe tile.. executing walk.");

            }

        });
    }

 

Edited by ospaul

Try webwalking

  • Author
4 hours ago, Heist said:

Try webwalking

I web walk for larger distances this is in a 10x10 area where I sometimes just want to move a tile back. It's to my understanding that webwalking uses the minimap, I don't always want to traverse using the mini map. We walking is also a hog on resources if I'm not mistaken?

 

Edited by ospaul

7 hours ago, ospaul said:

Hey all, currently having an issue sometimes with walking event. My logger will show that I have reached the event sometimes but will not actually move, or attempt to move, even though in the logger it says it has generated a tile and is executing the walk event. Other times it works perfectly.

Im new to the API, so I'm unsure if I should be using WalkingEvent? I might need to fine tune my tile selection though.


@Override
    public void process() throws InterruptedException {
        List<NPC> dangerousNPC = script.getNpcs().filter(script::isDangerousNPC);
        dangerousNPC.forEach(npc -> {
            if (script.currentState != States.LOOT && !script.myPlayer().isMoving()) {
                WalkingEvent myEvent = new WalkingEvent(new Position(findAnySafeTile(npc, potentialSafeTiles)));
                script.execute(myEvent);
                script.log("Generated safe tile.. executing walk.");

            }

        });
    }

 

When creating a walkingevent there is probably a base threshold ste of a few tiles?
To fix that you should add myEvent.setMinDistanceThreshold(0);

That will make sure you walk on the exact tile you want 😉

While myEvent.setMinDistanceThreshold(1);
Would stop the event when you ar e inside 1 tile radius ^^

  • Author
28 minutes ago, Khaleesi said:

When creating a walkingevent there is probably a base threshold ste of a few tiles?
To fix that you should add myEvent.setMinDistanceThreshold(0);

That will make sure you walk on the exact tile you want 😉

While myEvent.setMinDistanceThreshold(1);
Would stop the event when you ar e inside 1 tile radius ^^

Thanks khal, I’ll try that next time I’m free and let you know if that works!

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.