Jump to content

Eagle Scripts

Lifetime Sponsor
  • Posts

    7163
  • Joined

  • Last visited

  • Days Won

    10
  • Feedback

    100%

Everything posted by Eagle Scripts

  1. So thanks to some help from Precise I mentioned to make a little progress : The script now knows not to drop the net and starts fishing. I'm still running into a problem --> It keeps spam clicking to fish (since I haven't given it a 'confirmation' on whether it is fishing or not). Could you help me to make the script detect wether I am fishing or not, which prevents it from spam clicking the fishing option? My Code so far : import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; @ScriptManifest(author = "Labyrinth", info = "PowerFisher", name = "Simple Fisher", version = 0.1, logo = "http://imgur.com/bXr0Is1") public class main extends Script { @Override public void onStart() { log("Let's catch some fish!"); log("If you encounter any bugs or errors please report them on the forums"); log("Goodluck gaining!"); } private enum State { FISH, DROP, WAIT }; private State getState() { Entity FS = npcs.closest("Fishing spot"); if (!inventory.isEmptyExcept("Small fishing net")) return State.DROP; if (FS != null) return State.FISH; return State.WAIT; } @Override public int onLoop() throws InterruptedException { log(getState()); switch(getState()) { case FISH: Entity FS = npcs.closest("Fishing spot"); log("Fishing spot null?: " + (FS == null)); if (FS!= null) { log("Fishing spot has Net action: " + FS.hasAction("Net")); FS.interact("Net"); } break; case DROP: inventory.dropAllExcept("Small Fishing net"); break; case WAIT: sleep(random(500, 1300)); break; } return random(300, 900); } @Override public void onExit() { log("Thanks for running my SimpleFisher!"); } @Override public void onPaint(Graphics2D g) { } }
  2. Heya Apaec, Thanks for your guide, because of this i'm actually looking into making my own scripts. I'm actually trying to make a simple Shrimp powerfisher (catch the shrimp and drop all once inv is full, EXCEPT the fishing net) I'm struggling trying to drop everything BUT the fishing net. Could you help me out? Code i have right now: import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; @ScriptManifest(author = "Labyrinth", info = "PowerFisher", name = "Simple Fisher", version = 0.1, logo = "https://bloggermymaze.files.wordpress.com/2010/12/mymaze_2010_tudor_labyrinth.jpg") public class main extends Script { @Override public void onStart() { log("Let's catch some fish!"); log("If you encounter any bugs or errors please report them on the forums"); log("Goodluck gaining!"); } private enum State { FISH, DROP, WAIT }; private State getState() { Entity FS = objects.closest("Fishing spot"); if (!inventory.isEmpty()) return State.DROP; if (FS != null) return State.FISH; return State.WAIT; } @Override public int onLoop() throws InterruptedException { switch (getState()) { case FISH: Entity FS = objects.closest("Fishing spot"); if (FS!= null) { FS.interact("Net-from"); } break; case DROP: inventory.dropAll(); break; case WAIT: sleep(random(500, 1300)); break; } return random(300, 900); } @Override public void onExit() { log("Thanks for running my SimpleFisher!"); } @Override public void onPaint(Graphics2D g) { } }
×
×
  • Create New...