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.

Need help with a snippet of my code

Featured Replies

RS2Object conveyorBelt = x.getObjects().closest("Conveyor belt");

RS2Object barDispenser = x.getObjects().closest("Bar dispenser");

Position barDispenseArea = new Position(1942, 4967, 0);

x.log("Walking to conveyor belt");

if (conveyorBelt.exists() && conveyorBelt != null) {
    x.getWalking().walk(barDispenseArea);
    Sleep.sleepUntil(() -> !x.myPlayer().isMoving(), 1000);
}

 

Everytime my player walk to the barDispenseArea it keeps hovering its mouse on the object and trying to click something

 

I did not specfiy in my code to click anything when it arrives just to sleep.

 

does my if statement play a role in what is going on?

 

When I say everytime I mean every time my player goes over to the conveyor belt it tries to click something but for no reason because where did i put in my code to click?

I think its try to get to the spot (and that is the click it might ) to fix this I would make bardispenseArea an Area object with a Y by X grid?

PS it should be...

if (coveyorBelt !=null && conveyorBelt.exists())  

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.