-
Posts
4 -
Joined
-
Last visited
-
Days Won
4
Content Type
Profiles
Forums
Articles
Store
Posts posted by ashgg83
-
-
This was originally a tin miner, lol.
-
Basic Potato picking script, should help with simple tasks.
import com.epicbot.api.shared.APIContext; 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.model.Tile; import com.epicbot.api.shared.script.LoopScript; import com.epicbot.api.shared.script.ScriptManifest; import com.epicbot.api.shared.util.paint.frame.PaintFrame; import com.epicbot.api.shared.util.time.Time; import com.epicbot.api.shared.webwalking.model.RSBank; import java.awt.*; @ScriptManifest(name = "Private Potato Picker", gameType = GameType.OS) public class main extends LoopScript { private Area BANK_AREA = new Area(new Tile(3087, 3247, 0), new Tile(3098, 3239, 0)); private Area POTATO_AREA = new Area(new Tile(3137, 3291, 0), new Tile(3158, 3267, 0)); private long startTime; private int counter = 0; @Override public boolean onStart(String... strings) { startTime = System.currentTimeMillis(); return true; } @Override protected int loop() { if (getAPIContext().inventory().isFull()) { bank(); } else { mine(); } return 100; } private void bank() { if (!BANK_AREA.contains(getAPIContext().localPlayer().getLocation())) { getAPIContext().webWalking().walkTo(RSBank.DRAYNOR.getTile()); } else { if (BANK_AREA.contains(getAPIContext().localPlayer().getLocation())) { if (!getAPIContext().bank().isOpen()) { getAPIContext().bank().open(); Time.sleep(5_000, () -> getAPIContext().bank().isOpen()); } } if (getAPIContext().bank().isOpen()) { getAPIContext().bank().depositInventory(); } } } private void mine() { if (!POTATO_AREA.contains(getAPIContext().localPlayer().getLocation())) { getAPIContext().webWalking().walkTo(POTATO_AREA.getCentralTile()); } else if (!isActioning()) { final SceneObject potato = getAPIContext().objects().query().nameContains("Potato").results().nearest(); if (potato != null) { if (potato.interact("Pick")) { counter++; Time.sleep(5_000, () -> getAPIContext().localPlayer().isAnimating()); } } } } @Override protected void onPaint(Graphics2D g, APIContext ctx){ PaintFrame pf = new PaintFrame(); pf.setTitle(">>>Private Potato Picker<<< "); pf.addLine("Runtime: ", Time.getFormattedRuntime(startTime)); //pf.addLine("Mining Level: ", getAPIContext().skills().mining().getCurrentLevel()); pf.addLine("Potatoes Picked: ", counter); pf.draw(g, 0, 90, ctx); } private boolean isActioning() { return getAPIContext().localPlayer().isAnimating() || getAPIContext().localPlayer().isMoving(); } private int getGainedLevels() { return getAPIContext().skills().thieving().getCurrentLevel(); } }
- 2
-
Miner/Smither
in Resource Gathering
Posted · Edited by ashgg83
This bot will mine Tin & Copper in Rimmington then navigate to Falador smelter, create bronze bars, bank.
Start script with empty inventory and desired pickaxe in equipment slot, only start the script in either Rimmington or Falador East Bank.