simbo 4 Posted November 25, 2016 import org.dreambot.api.methods.Calculations;import org.dreambot.api.script.AbstractScript;import org.dreambot.api.script.ScriptManifest;import org.dreambot.api.script.Category;import org.dreambot.api.wrappers.interactive.GameObject; @ScriptManifest(author = "Simbo", name = "My First Script", version = 1.0, description = "Fisher", category = Category.FISHING)public class main extends AbstractScript { public void onStart() {log("Welcome to Simbo's Fisher.");log("If you experience any issues while running this script please report them to me on the forums.");log("Enjoy the script, gain some fishing levels!.");} private enum State {FISH, DROP, WAIT}; private State getState() {GameObject fishspot = getGameObjects().closest("fishspot");if (!getInventory().isEmpty())return State.DROP;if (fishspot != null)return State.FISH;return State.WAIT;} public void onExit() { } @Overridepublic int onLoop() {switch (getState()) {case FISH:GameObject fishspot = getGameObjects().closest("fishspot");if (fishspot != null) {fishspot.interact("net");}break;case DROP:getInventory().dropAll("shrimp");break;case WAIT:sleep(Calculations.random(500, 600));break;}return Calculations.random(500, 600);}} ok so I'm a complete noob at this just wondering if a scripter might be willing to give me a hand on a few really noob questions this is apaecs tea thiever I'm converting to a net fisher for experience however I'm abit lost return State.WAIT; < would this ever be true while fishing anywhere GameObject fishspot = getGameObjects().closest("fishspot"); < would this be correct to always find the node? fishspot.interact("net");< is this the correct procedure for net fishing I did say complete noob any pointers would be greatly appreciated thanks in advance simbo
08keelr 3 Posted November 25, 2016 I'd recommend learning the absolute basics of Java before actually trying to write a script that would be complex to a new starter. I go to codeacademy (google it) for EVERY basics course I need on a load of programming languages, Python / Java / JavaScript ect... Hope my advice helps and best of luck in your programming adventure!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.