Alias Posted January 4, 2021 Share Posted January 4, 2021 (edited) import com.epicbot.api.shared.GameType; import com.epicbot.api.shared.entity.SceneObject; import com.epicbot.api.shared.model.Area; import com.epicbot.api.shared.script.LoopScript; import com.epicbot.api.shared.script.ScriptManifest; import com.epicbot.api.shared.util.time.Time; @ScriptManifest(name = "Alias", gameType = GameType.OS) public class Main extends LoopScript { private final static Area OAK_AREA = new Area(3172, 3422, 3159, 3411); private final static Area BANK_AREA = new Area(3185, 3439, 3180, 3431); @Override public boolean onStart(String... strings) { return true; } @Override protected int loop() { if (getAPIContext().inventory().isFull()) { bank(); } else { chop(); } return 100; } private void bank() { if (!BANK_AREA.contains(getAPIContext().localPlayer().getLocation())) { getAPIContext().walking().walkTo(BANK_AREA.getCentralTile()); } else if (!getAPIContext().bank().isOpen()) { if (getAPIContext().bank().open()) { Time.sleep(5_000, () -> getAPIContext().bank().isOpen()); } } else if (getAPIContext().bank().depositAll("Oak logs")) { Time.sleep(5_000, () -> getAPIContext().inventory().isEmpty()); } } private void chop() { if (!OAK_AREA.contains(getAPIContext().localPlayer().getLocation())) { getAPIContext().walking().walkTo(OAK_AREA.getCentralTile()); } else if (!isChopping()) { final SceneObject tree = getAPIContext().objects().query().nameContains("Oak").results().nearest(); if (tree != null) { if (tree.interact()) { Time.sleep(5_000, () -> getAPIContext().localPlayer().isAnimating()); } } } } private boolean isChopping() { return getAPIContext().localPlayer().isAnimating() || getAPIContext().localPlayer().isMoving(); } } Edited January 4, 2021 by Alias 2 1 Quote Link to comment Share on other sites More sharing options...
Sellout Posted January 4, 2021 Share Posted January 4, 2021 Nice short simple script! thanks for sharing ❤️ Quote Link to comment Share on other sites More sharing options...
Koala Posted January 4, 2021 Share Posted January 4, 2021 Does this kill Zulrah? Nice release 🙂 Quote Link to comment Share on other sites More sharing options...
Alias Posted January 4, 2021 Author Share Posted January 4, 2021 (edited) 41 minutes ago, Koala said: Does this kill Zulrah? Nice release 🙂 Considering you don't have a Zulrah released I figured I'd help. public class RotationListener implements Runnable { public RotationListener(final AliasZulrah ctx) { this.ctx = ctx; } Edited January 4, 2021 by Alias 1 Quote Link to comment Share on other sites More sharing options...
Mint Posted January 4, 2021 Share Posted January 4, 2021 Thanks for sharing @Alias. Would love to see a few more for the community.. maybe even some SDN worthy stuff soon 🙂 Quote Link to comment Share on other sites More sharing options...
TheKevin Posted June 8, 2021 Share Posted June 8, 2021 (edited) Updaded version for the east Side of Varrock. Just compile and go to varrock east bank or the oak Trees and you are rdy to mine oak 😁 AND yes this is now my first start so maybe i will share some free stuff more in the future that is also my "own" stuff and new things Edit: 100% bann rate so far, even with the new area updated, maybe because no run option but only use it if you can throw away the account. // // Source code recreated from a .class file by IntelliJ IDEA // (powered by FernFlower decompiler) // import com.epicbot.api.shared.GameType; import com.epicbot.api.shared.entity.SceneObject; import com.epicbot.api.shared.entity.details.Locatable; import com.epicbot.api.shared.model.Area; import com.epicbot.api.shared.script.LoopScript; import com.epicbot.api.shared.script.ScriptManifest; import com.epicbot.api.shared.util.time.Time; @ScriptManifest( name = "F2P Oak Chopper", gameType = GameType.OS ) public class main extends LoopScript { public static final Area OAK_AREA = new Area(3277, 3413, 3284, 3434); public static final Area BANK_AREA = new Area(3253, 3419, 3254, 3419); public main() { } public void bank() { if (!BANK_AREA.contains(new Locatable[]{this.getAPIContext().localPlayer().getLocation()})) { this.getAPIContext().walking().walkTo(BANK_AREA.getCentralTile()); } else if (!this.getAPIContext().bank().isOpen()) { if (this.getAPIContext().bank().open()) { Time.sleep(5000, () -> { return this.getAPIContext().bank().isOpen(); }); } } else if (this.getAPIContext().bank().depositAll(new String[]{"Oak logs"})) { Time.sleep(5000, () -> { return this.getAPIContext().inventory().isEmpty(); }); } } public void chop() { if (!OAK_AREA.contains(new Locatable[]{this.getAPIContext().localPlayer().getLocation()})) { this.getAPIContext().walking().walkTo(OAK_AREA.getCentralTile()); } else if (!this.isChopping()) { SceneObject tree = (SceneObject)this.getAPIContext().objects().query().nameContains(new String[]{"Oak"}).results().nearest(); if (tree != null && tree.interact()) { Time.sleep(5000, () -> { return this.getAPIContext().localPlayer().isAnimating(); }); } } } public boolean isChopping() { return this.getAPIContext().localPlayer().isAnimating() || this.getAPIContext().localPlayer().isMoving(); } public boolean onStart(String... strings) { System.out.println("Starting Test"); return true; } protected int loop() { if (this.getAPIContext().inventory().isFull()) { this.bank(); return 200; } else { this.chop(); return 100; } } } Edited June 12, 2021 by TheKevin 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.