Jump to content

Interact() Method Not Working?


Doomdude70

Recommended Posts

Hey,

 

So I made a script and it worked perfectly until OSBot updated to 2.3.66. What my script did is that it used to pick up things and bank. Now, where it should pick up, instead, the mouse hovers over the item and moves away and does not click. Even my localWalker does not work anymore.

 

I made the below sample script to see if was just a problem with my individual bot script:

package Test;

import org.osbot.rs07.api.LocalWalker;
import org.osbot.rs07.api.model.Item;
import org.osbot.rs07.api.model.NPC;
import org.osbot.rs07.api.model.RS2Object;
import org.osbot.rs07.api.ui.Message;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
import org.osbot.rs07.utility.Area;

import java.awt.*;

@ScriptManifest(author = "Doomdude70", info = "Picks wheat", name = "Test", version = 1.0, logo = "")
public class NPCs extends Script {


	@Override
	public void onStart() {
		log("Start");
	}

	private enum State {
		PICKWHEAT;
	}
	
	private State getState() {
		return State.PICKWHEAT;
	}
	

	@Override
	public int onLoop() throws InterruptedException {
		switch (getState()) {
		case PICKWHEAT:
			RS2Object wheat = objects.closest("Wheat");
			wheat.interact("Pick");
		break;
		}
		

		return random(200, 300);
	}

	@Override
	public void onExit() {
		log("Exit");
	}

	@Override
	public void onPaint(Graphics2D g) {

	}

}

This sample script did not work either. The mouse hovered over the wheat and quickly moved away again without clicking.

 

So, what's the deal? What should I do? tongue.png

Link to comment
Share on other sites

i believe there was something wrong with 2.3.66.

 

I suggest you re-install osbot.

 

Thanks xD I should have tried that earlier, I reinstalled OSBot and it started working perfectly again.

 

On the website when you go to download it says OSBot version is 2.33.65. Seems like there IS some sort of problem with 2.33.66.

  • Like 1
Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

Guest
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...