Jump to content

Quick question.


ScriptingGuy

Recommended Posts

It doesn't take that long to export, just have the export path set up so it exports to the scripts folder. You can't run your script in your IDE,  OSBot looks for local scripts in the specified directory so either way you're going to have to export your jar.

 

I replace the jar but when I refresh my script list, it still says "Version: 2" (It's supposed to say version 3).

Link to comment
Share on other sites

Be sure to delete the old jar and then replace it with the new one, make sure to save changes before you compile into jar and also refresh the list (which you are doing). 

 

Steps I took:

giphy.gif

Be sure to delete the old jar and then replace it with the new one, make sure to save changes before you compile into jar and also refresh the list (which you are doing). 

 

See post above, had to edit something.

Edited by ScriptingGuy
Link to comment
Share on other sites

Everything seems to be in order, try closing out of OSBot, deleting the script in the scripts folder and THEN making the jar, see if that makes a difference 

 

 

That's what I'm trying to avoid. tongue.png

 

Update the script WITHOUT closing OSBot.

 

-----

 

Currently, only closing OSBot updates the script. 

Edited by ScriptingGuy
Link to comment
Share on other sites

Perhaps it's an issue with the new version of the client then as I haven't tried this with the newest version

 

Thanks for the help, I'll just wait for the newest update.

 

----

 

I don't want to create another thread so I'll post my other question here.

I'm making a flax spinner and my SpinFlax.java class executes even while I'm spinning the flax. Getting the players animation to detect if I'm spinning or not will not work because it will switch between -1 (player standing normally) and 1563 (player spinning) during the spinning process. 

 

Anybody have a suggestion to prevent my player from spinning flax while I'm already doing it?

public class SpinFlax extends Task {

	public SpinFlax(Script s) {
		super(s);
		// TODO Auto-generated constructor stub
	}

	@Override
	public boolean activate() {
		RS2Object spinningWheel = s.objects.closest("Spinning wheel");
		return s.getInventory().contains("Flax")
				&& s.myPlayer().getAnimation() != 1563 && spinningWheel != null;
	}

	@Override
	public void execute() throws InterruptedException {
		//EXECUTE STUFF

	}
} 

 

 

Also, is there a way to detect if an object is reachable to my player? (Nothing blocking my way from interacting with it, like a closed door?)

Edited by ScriptingGuy
Link to comment
Share on other sites

Thanks for the help, I'll just wait for the newest update.

----

I don't want to create another thread so I'll post my other question here.

I'm making a flax spinner and my SpinFlax.java class executes even while I'm spinning the flax. Getting the players animation to detect if I'm spinning or not will not work because it will switch between -1 (player standing normally) and 1563 (player spinning) during the spinning process.

Anybody have a suggestion to prevent my player from spinning flax while I'm already doing it?

public class SpinFlax extends Task {	public SpinFlax(Script s) {		super(s);		// TODO Auto-generated constructor stub	}	@Override	public boolean activate() {		RS2Object spinningWheel = s.objects.closest("Spinning wheel");		return s.getInventory().contains("Flax")				&& s.myPlayer().getAnimation() != 1563 && spinningWheel != null;	}	@Override	public void execute() throws InterruptedException {		//EXECUTE STUFF	}}

Also, is there a way to detect if an object is reachable to my player? (Nothing blocking my way from interacting with it, like a closed door?)

Prevent reusing - conditional sleep until either level up widget is visible or no flax left

Reachability - getMap().canReach(entity)

Did you refresh the script list? I can't see in the gif properly because I'm on my phone

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