-
Posts
9 -
Joined
-
Last visited
-
Days Won
5
Content Type
Profiles
Forums
Articles
Store
Posts posted by ItsYaBoiEd
-
-
I couldnt find bug report place, but i am here to do exactly that. Feel free to delete this comment afterwards.
The script seems to run into issues at the end of fletching cycle when stringing yew longbows. Perhaps it is also like that with other features. It tries to bank while string is selected - thus failing to bank and stuck in an infinite loop. Also please add a check for both bows and strings, otherwise it will sill try to withdraw bows even tho it has none - but it has strings.
Thats all, thank you!
-
2 hours ago, Mint said:
Wow nice, this your first script? Great job... might be on to something here, perhaps create a few more 🙂
Im on it man! Created 2 more after this one 😄
-
no longer at 69 posts lmaoooo
70 now
get cucked
-
I have got to let you know that this is my first time trying to do anything even closely related to programming, so don't expect anything crazy. This is just a simple flax picker that picks flax, goes to spin the flax into bowstrings and then banks them. After that its on repeat.
I created this because I am running a Youtube series about botting my ironman account and I really wanted to do bowstrings to alch the bows later. No way was I gonna do it by hand - that's why this script was created.
Start the script anywhere near Seers Village. If you want to be safe, start it in the bank to be sure. Make sure you have an empty inventory before running it.
From my own testing the script runs without any issues. If you do encounter any - please let me know!
import com.epicbot.api.shared.APIContext; import com.epicbot.api.shared.GameType; import com.epicbot.api.shared.entity.Player; import com.epicbot.api.shared.entity.SceneObject; import com.epicbot.api.shared.entity.WidgetChild; import com.epicbot.api.shared.entity.WidgetGroup; 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 sun.security.action.GetBooleanAction; import javax.imageio.ImageIO; import java.awt.*; import java.awt.image.BufferedImage; import java.io.IOException; import java.net.HttpURLConnection; import java.net.URL; @ScriptManifest(name = "Ed's Kush Picker", gameType = GameType.OS) public class main extends LoopScript { private final Area flaxField = new Area(2751, 3437, 2739, 3451); private final Area seersBank = new Area(2729, 3490, 2721, 3493); private Player local; private SceneObject flax; private final Tile spinRoom = new Tile(2771, 3471, 1); private SceneObject spinningWheel; private final Tile ladderTile = new Tile(2715, 3471, 0); private final Area stairRoom = new Area(2711, 3470, 2715, 3472); private final long spinTimeOut = 3000; private long startTime; private long lastSpin = 0; private long runTime = System.currentTimeMillis() - startTime; private int counter = 0; public boolean NeedsToBank() { return getAPIContext().inventory().isFull() && getAPIContext().inventory().contains("Bow string") && !seersBank.contains(local); } public void walksToBank() { getAPIContext().webWalking().walkToBank(); } public boolean needsToOpenBank() { return !getAPIContext().bank().isOpen(); } public void openBank() { getAPIContext().bank().open(); } public boolean doesNeedToDeposit() { return getAPIContext().bank().isOpen() && !getAPIContext().inventory().isEmpty(); } public void depositAll() { counter = counter + 28; getAPIContext().bank().depositInventory(); } public boolean needsToWalkToFlax() { local = getAPIContext().localPlayer().get(); return !getAPIContext().inventory().isFull() && !flaxField.contains(local); } public void walkFlaxField() { getAPIContext().webWalking().walkTo(flaxField.getRandomTile()); } public boolean shouldPick() { local = getAPIContext().localPlayer().get(); return flaxField.contains(local) && !getAPIContext().inventory().isFull(); } public boolean needsToWalkToSpin() { local = getAPIContext().localPlayer().get(); return getAPIContext().inventory().isFull() && getAPIContext().inventory().contains("Flax") && local.getPlane() != 1; } public void walksToSpin() { SceneObject ladder = getAPIContext().objects().query().nameMatches("Ladder").results().nearest(); if (!stairRoom.contains(local)) { getAPIContext().webWalking().walkTo(ladderTile); } else { getAPIContext().objects().query().nameMatches("Ladder").results().nearest().interact("Climb-up"); } } public boolean shouldSpin() { local = getAPIContext().localPlayer().get(); return local.getPlane() == 1 && getAPIContext().inventory().contains("Flax"); } public final String formatTime(long ms) { long s = ms / 1000, m = s / 60, h = m / 60, d = h / 24; s %= 60; m %= 60; h %= 24; return d > 0 ? String.format("%02d:%02d:%02d:%02d", d, h, m, s) : h > 0 ? String.format("%02d:%02d:%02d", h, m, s) : String.format("%02d:%02d", m, s); } //========================================================================================================================== private SceneObject getFlax() { return getAPIContext().objects().query().nameMatches("Flax").actions("Pick").results().nearest(); } private void pick() { flax = getFlax(); if (flax != null) { flax.interact("Pick"); } } private SceneObject getSpinning() { return getAPIContext().objects().query().nameMatches("Spinning wheel").results().nearest(); } private void spin() { if (getAPIContext().localPlayer().getAnimation() == 894) { lastSpin = System.currentTimeMillis(); } if (notSpinning()) { System.out.println("memes plz work"); WidgetGroup spinInterface = getAPIContext().widgets().get(270); spinningWheel = getSpinning(); if (spinInterface != null && spinInterface.isVisible()) { System.out.println("pressing 3"); getAPIContext().keyboard().sendKey(51); lastSpin = System.currentTimeMillis(); } else if (spinningWheel != null) { System.out.println("tryna spin"); if (spinningWheel.interact("Spin")) { Time.sleep(9000, () -> getAPIContext().widgets().get(270).isVisible()); } } } } private boolean notSpinning() { return System.currentTimeMillis() - lastSpin > spinTimeOut; } @Override public boolean onStart(String... strings) { System.out.println("FlaxPickSpinOP"); startTime = System.currentTimeMillis(); return true; } //============================================================================================================ private BufferedImage bg = downloadImage("https://i.imgur.com/uesM6ze.png"); @Override protected void onPaint(Graphics2D g, APIContext a) { long runTime = System.currentTimeMillis() - startTime; g.drawImage(bg, 0, getAPIContext().game().getViewportHeight() - 165, null); PaintFrame frame = new PaintFrame("It Just 'Works'"); frame.addLine("Kush Manicured", counter); frame.addLine(formatTime(runTime), ""); frame.draw(g, 293, getAPIContext().game().getViewportHeight() - 63, getAPIContext()); } // function to parse the image public BufferedImage downloadImage(String url) { try { HttpURLConnection conn; conn = (HttpURLConnection)(new URL(url.replaceAll(" ", "%20")).openConnection()); conn.setInstanceFollowRedirects(false); conn.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8"); conn.setRequestProperty("Accept", "ttext/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8"); conn.setRequestProperty("Accept-Language", "en-us,en;q=0.5"); conn.setRequestProperty("Accept-Encoding", "gzip, deflate"); conn.setRequestProperty("Accept-Charset", "ISO-8859-1,utf-8;q=0.7,*;q=0.7"); conn.setRequestProperty("Keep-Alive", "300"); conn.setRequestProperty("Connection", "keep-alive"); conn.setRequestMethod("GET"); return ImageIO.read(conn.getInputStream()); } catch(IOException e1) { return null; } } @Override protected int loop() { if (!getAPIContext().client().isLoggedIn()) { System.out.println("hold up till you are logged in mayne"); return 300; } if (needsToWalkToFlax()) { System.out.println("Walking to the fields"); walkFlaxField(); } else if (shouldPick()) { System.out.println("Picking up the DANK KUSH"); pick(); } else if (needsToWalkToSpin()) { System.out.println("On my way to spin my KUSH"); walksToSpin(); } else if (shouldSpin()) { System.out.println("Processing the KUSH"); System.out.println("Smells nice"); spin(); } else if (NeedsToBank()) { System.out.println("Walkin to the Dank Bank"); System.out.println("Sneaky Beaky Style"); walksToBank(); } else if (needsToOpenBank()) { System.out.println("Opening Dank Bank"); openBank(); } else if (doesNeedToDeposit()) { System.out.println("Depositing Dank"); depositAll(); } else { getAPIContext().script().stop("get danker"); } return 2000; } }
- 2
-
-
9 hours ago, Sellout said:
epic
no u
-
-
[200k p/h] Eds sapphire ring enchanter + video materials
in Resource Crafting
Posted · Edited by ItsYaBoiEd
Changed from crafter to enchanter, whoopsies.
Hello!
This is my second script that I have ever written, so don't expect anything too crazy. It enchants sapphire rings for you, making 200k per hour.
What you need :
1. Have cosmic runes in your inventory
2. Have sapphire rings in your bank
From my intensive testing on 10+ accounts for 2 weeks, the script works flawlessly and it logs out when you run out of resources.
If you want to see me writing the script and explaining what's what along the way, you can check out this video!