HTM 31 Share Posted June 30, 2020 Hey guys, i wrote this for practice with dreambots api and im trying to test it. i have it in the correct folder "svripts" in dreambot but it is appearing. any ideas on what i need to fix? 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.NPC; @ScriptManifest(author = "Hoke2012", name = "FreeFlyFisher", version = 1.0, description = "Flyfish Anywhere!", category = Category.FISHING ) public class test extends AbstractScript { public void onStart() { log("Welcome to FreeFlyFisher by Hoke2012."); 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() { NPC Fishing_spot = getNpcs().closest(fis -> fis != null && fis.getName().equals("Rod Fishing Spot")); if (getInventory().isFull()) { return State.DROP; } if (Fishing_spot != null) { return State.FISH; } return State.WAIT; } public void onExit() { } @Override public int onLoop() { switch (getState()) { case FISH: NPC Fishing_spot = getNpcs().closest(fis -> fis != null && fis.getName().equals("Rod Fishing Spot")); if (Fishing_spot != null) { Fishing_spot.interact("Lure"); } break; case DROP: getInventory().dropAll("Trout", "Salmon"); break; case WAIT: sleep(Calculations.random(500, 600)); break; } return Calculations.random(500, 600); } } Link to comment Share on other sites More sharing options...
Hashtag 8671 Share Posted June 30, 2020 The issue has been solved by using Java 8 to compile the script. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.