Apaec Posted July 5, 2017 Author Share Posted July 5, 2017 37 minutes ago, osrs_pvm said: Thanks for the guide, this will probably be me To answer your previous question, you will see that our script extends Script. This is an abstract class in the OSBot API and since we are extending it, we have access to all of its attributes. An example of an attribute is inventory, whereby we are calling the super inventory object attribute and using the methods that it provides. As for the stall, you will find that that is initialised just above the snippet you quoted, we're creating an instance of an RS2Object which is an API object describing an ingame object. Hope that makes sense, let me know if you're still unsure. Since you edited the post I would assume you figured this out yourself but I just thought i'd drop a quick reply in to clear it up if you didn't! -Apa Quote Link to comment Share on other sites More sharing options...
XXXSHOTO Posted July 6, 2017 Share Posted July 6, 2017 I get this when I try running eclipse Quote Link to comment Share on other sites More sharing options...
slazter Posted July 6, 2017 Share Posted July 6, 2017 1 hour ago, Saitama Anonymous said: I get this when I try running eclipse Not quite sure if this is the right answer, but if i recall i had the same problem and it had something to do with installing the 32bit instead of the 64bit version. 2 Quote Link to comment Share on other sites More sharing options...
XXXSHOTO Posted July 6, 2017 Share Posted July 6, 2017 1 minute ago, slazter said: Not quite sure if this is the right answer, but if i recall i had the same problem and it had something to do with installing the 32bit instead of the 64bit version. Ok, i'll give it a try Quote Link to comment Share on other sites More sharing options...
XXXSHOTO Posted July 6, 2017 Share Posted July 6, 2017 5 minutes ago, slazter said: Not quite sure if this is the right answer, but if i recall i had the same problem and it had something to do with installing the 32bit instead of the 64bit version. Works! tyvm 1 Quote Link to comment Share on other sites More sharing options...
Apaec Posted July 6, 2017 Author Share Posted July 6, 2017 1 hour ago, Saitama Anonymous said: Works! tyvm Glad it got sorted out! (: 1 Quote Link to comment Share on other sites More sharing options...
Jacksonpm23 Posted July 12, 2017 Share Posted July 12, 2017 (edited) Noob question. The new form of Eclipse wants me to pick between Eclipse IDE for Java devs, EE devs, C++ devs,Javascript&web devs, or PHP devs..which one? Edit: Ignore my dumb ass, I sucked at following instructions. Edited July 12, 2017 by Jacksonpm23 1 Quote Link to comment Share on other sites More sharing options...
Simplintho Posted July 28, 2017 Share Posted July 28, 2017 Why do you prefer Eclipse over Visual Studio Code or other IDE's? Quote Link to comment Share on other sites More sharing options...
Offensive Posted July 28, 2017 Share Posted July 28, 2017 Thanks for the share! Quote Link to comment Share on other sites More sharing options...
Apaec Posted July 28, 2017 Author Share Posted July 28, 2017 1 hour ago, Simplintho said: Why do you prefer Eclipse over Visual Studio Code or other IDE's? It's the one I started off with and the one I have used since! Quote Link to comment Share on other sites More sharing options...
CanCo Posted August 6, 2017 Share Posted August 6, 2017 (edited) Hey i can't for the life of me figure out why this is not working >.> I tried to modify ur script to be the start of a fishing script but i can get it to work. Currently when ran it will just be in the WAIT state. Most likely because it cant find the fishing spot is what i am assuming (even tho i am right by it). I have tried changing some things such as "Entity -> RS2Object" and "objects -> getObjects()" import org.osbot.rs07.api.model.*; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; @ScriptManifest(author = "CanCo", info = "shrimper fisher", name = "CanFish", version = 0, logo = "") public class main extends Script { @Override public void onStart() { log("My fisher v1"); } private enum State { FISH, WAIT } private State getState() { Entity spot = objects.closest("Fishing spot"); if (spot != null && !myPlayer().isAnimating()) return State.FISH; return State.WAIT; } @Override public int onLoop() throws InterruptedException { switch (getState()) { case FISH: log("going fishing.."); Entity spot = objects.closest("Fishing spot"); if (spot != null && !myPlayer().isAnimating()) spot.interact("Net-from"); break; case WAIT: log("waiting.."); sleep(random(500, 800)); break; } return random(200, 300); } @Override public void onExit() { log("STOPPED"); } @Override public void onPaint(Graphics2D g) { } } Edited August 6, 2017 by CanCo Quote Link to comment Share on other sites More sharing options...
dreameo Posted August 6, 2017 Share Posted August 6, 2017 fishing spots are NPC. 1 Quote Link to comment Share on other sites More sharing options...
Apaec Posted August 6, 2017 Author Share Posted August 6, 2017 6 hours ago, CanCo said: Hey i can't for the life of me figure out why this is not working >.> I tried to modify ur script to be the start of a fishing script but i can get it to work. Currently when ran it will just be in the WAIT state. Most likely because it cant find the fishing spot is what i am assuming (even tho i am right by it). I have tried changing some things such as "Entity -> RS2Object" and "objects -> getObjects()" import org.osbot.rs07.api.model.*; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; @ScriptManifest(author = "CanCo", info = "shrimper fisher", name = "CanFish", version = 0, logo = "") public class main extends Script { @Override public void onStart() { log("My fisher v1"); } private enum State { FISH, WAIT } private State getState() { Entity spot = objects.closest("Fishing spot"); if (spot != null && !myPlayer().isAnimating()) return State.FISH; return State.WAIT; } @Override public int onLoop() throws InterruptedException { switch (getState()) { case FISH: log("going fishing.."); Entity spot = objects.closest("Fishing spot"); if (spot != null && !myPlayer().isAnimating()) spot.interact("Net-from"); break; case WAIT: log("waiting.."); sleep(random(500, 800)); break; } return random(200, 300); } @Override public void onExit() { log("STOPPED"); } @Override public void onPaint(Graphics2D g) { } } As dreameo stated, they are indeed NPCS. Use: NPC fishingSpot = getNpcs().closest("Fishing spot"); Apa Quote Link to comment Share on other sites More sharing options...
JohnDoe1 Posted August 6, 2017 Share Posted August 6, 2017 (edited) nice guide trying to write a fishing spot but it just keeps error on trying to find the actual location of the spot? nevermind it's a NPC like you said above Edited August 6, 2017 by JohnDoe1 1 Quote Link to comment Share on other sites More sharing options...
CanCo Posted August 6, 2017 Share Posted August 6, 2017 Perfect thanks Quote Link to comment Share on other sites More sharing options...