Jump to content

Need help with a snippet of my code

Recommended Posts

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) {
    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?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...