ScriptingGuy Posted August 9, 2015 Share Posted August 9, 2015 I got my local script to show by exporting it to a jar. My question is do I have to export to a jar every time I want to test my local script? How can I run it in the IDE? Quote Link to comment Share on other sites More sharing options...
Omicron Posted August 9, 2015 Share Posted August 9, 2015 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. Quote Link to comment Share on other sites More sharing options...
ScriptingGuy Posted August 9, 2015 Author Share Posted August 9, 2015 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). Quote Link to comment Share on other sites More sharing options...
Omicron Posted August 9, 2015 Share Posted August 9, 2015 I replace the jar but when I refresh my script list, it still says "Version: 2" (It's supposed to say version 3). 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). Quote Link to comment Share on other sites More sharing options...
ScriptingGuy Posted August 9, 2015 Author Share Posted August 9, 2015 (edited) 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: 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 August 9, 2015 by ScriptingGuy Quote Link to comment Share on other sites More sharing options...
Psvxe Posted August 9, 2015 Share Posted August 9, 2015 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). You don't have to delete the jar nor to restart the client. Quote Link to comment Share on other sites More sharing options...
Omicron Posted August 9, 2015 Share Posted August 9, 2015 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 Quote Link to comment Share on other sites More sharing options...
ScriptingGuy Posted August 9, 2015 Author Share Posted August 9, 2015 You don't have to delete the jar nor to restart the client. "Jar" as in my script jar, not OSBot. Refer to my gif above and notify me if I did anything wrong, thanks. My script doesn't update until I restart OSBot. Quote Link to comment Share on other sites More sharing options...
Omicron Posted August 9, 2015 Share Posted August 9, 2015 You don't have to delete the jar nor to restart the client. I personally don't, as the steps he mentioned seem to work fine for me (although I don't use eclipse), it's something I recommended he try Quote Link to comment Share on other sites More sharing options...
ScriptingGuy Posted August 9, 2015 Author Share Posted August 9, 2015 (edited) 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. Update the script WITHOUT closing OSBot. ----- Currently, only closing OSBot updates the script. Edited August 9, 2015 by ScriptingGuy Quote Link to comment Share on other sites More sharing options...
Omicron Posted August 9, 2015 Share Posted August 9, 2015 That's what I'm trying to avoid. Update the script WITHOUT closing OSBot. ----- Currently, only closing OSBot updates the script. Perhaps it's an issue with the new version of the client then as I haven't tried this with the newest version 1 Quote Link to comment Share on other sites More sharing options...
ScriptingGuy Posted August 9, 2015 Author Share Posted August 9, 2015 (edited) 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 August 9, 2015 by ScriptingGuy Quote Link to comment Share on other sites More sharing options...
Psvxe Posted August 10, 2015 Share Posted August 10, 2015 "Jar" as in my script jar, not OSBot. Refer to my gif above and notify me if I did anything wrong, thanks. My script doesn't update until I restart OSBot. I believe the jar was already defined by you as the script jar. Thus making me talking about the script jar. Quote Link to comment Share on other sites More sharing options...
Bobrocket Posted August 10, 2015 Share Posted August 10, 2015 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 Quote Link to comment Share on other sites More sharing options...
ScriptingGuy Posted August 10, 2015 Author Share Posted August 10, 2015 (edited) 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 Yes I refreshed it. Edited August 10, 2015 by ScriptingGuy Quote Link to comment Share on other sites More sharing options...