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.

player keeps walking away from NPC interaction

Featured Replies

so i have this bit of code this is supposed to have the player talk to the NPC in karamja and pay the fare but he keeps walking away from the customs officer. the webwalk seems to be looping but I don't know why. the if statement has animation and dialogue checks so the code shouldn't execute ???

Position pos1 = new Position(2943, 3146, 0);
NPC sailor = getNpcs().closest(3648);
if (getInventory().isFull() && (!myPlayer().isAnimating() && (!getDialogues().inDialogue()))) {
    getSettings().setRunning(true);
    getWalking().webWalk(pos1);
    if (sailor != null) {
        sailor.interact("Pay-Fare");
        sleep(getRandomNumber(1000, 3000));
        if (dialogues.isPendingContinuation()) {
            dialogues.clickContinue();
        }

any help would be appreciated :)

2 hours ago, r3nnoc said:

so i have this bit of code this is supposed to have the player talk to the NPC in karamja and pay the fare but he keeps walking away from the customs officer. the webwalk seems to be looping but I don't know why. the if statement has animation and dialogue checks so the code shouldn't execute ???


Position pos1 = new Position(2943, 3146, 0);
NPC sailor = getNpcs().closest(3648);
if (getInventory().isFull() && (!myPlayer().isAnimating() && (!getDialogues().inDialogue()))) {
    getSettings().setRunning(true);
    getWalking().webWalk(pos1);
    if (sailor != null) {
        sailor.interact("Pay-Fare");
        sleep(getRandomNumber(1000, 3000));
        if (dialogues.isPendingContinuation()) {
            dialogues.clickContinue();
        }

any help would be appreciated :)

Because you keep walking every time before you interact with the npc.. Might wanna do some check where your player is located.

Shouldn't there be a function, for example if 1square from npc id then interact else move to npc?

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.