Jump to content

ItsYaBoiEd

Members
  • Posts

    9
  • Joined

  • Last visited

  • Days Won

    4

Other groups

Beta Tester

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ItsYaBoiEd's Achievements

Bronze Member

Bronze Member (1/10)

  1. 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! import com.epicbot.api.shared.APIContext; import com.epicbot.api.shared.GameType; import com.epicbot.api.shared.entity.*; import com.epicbot.api.shared.event.ChatMessageEvent; import com.epicbot.api.shared.methods.ITabsAPI; import com.epicbot.api.shared.model.Area; import com.epicbot.api.shared.model.Skill; import com.epicbot.api.shared.model.Spell; 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.Random; 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.event.KeyEvent; import java.awt.image.BufferedImage; import java.io.IOException; import java.net.HttpURLConnection; import java.net.URL; @ScriptManifest(name = "Recoil FACTORY", gameType = GameType.OS) public class main extends LoopScript { public boolean needsToBank() { return !getAPIContext().inventory().contains("Cosmic rune") || !getAPIContext().inventory().contains("Sapphire ring"); } public boolean needsToOpenBank() { return !getAPIContext().bank().isOpen(); } public void openBank() { if (getAPIContext().magic().isSpellSelected()) { getAPIContext().mouse().click(450, 265); } else { getAPIContext().bank().open(); } } public boolean shouldLogOut() { return getAPIContext().bank().getCount("Sapphire ring") == 0 || getAPIContext().inventory().getCount("Cosmic rune") == 0; } public void logOut() { if (getAPIContext().bank().isOpen()) { getAPIContext().bank().close(); } getAPIContext().game().logout(); getAPIContext().script().stop("Das it bro, was it worth it?"); } public boolean doesNeedToDeposit() { return getAPIContext().inventory().getCount("Ring of recoil") == 27; } public void depositRings() { getAPIContext().bank().depositAllExcept("Cosmic rune"); } public boolean needsWithdrawSapphirerings() { return getAPIContext().inventory().getCount("Ring of recoil") == 0 && getAPIContext().inventory().getCount("Sapphire ring") == 0; } public void withdrawSapphireRing() { getAPIContext().bank().withdrawAll("Sapphire ring"); } public boolean needsToEnchant() { return getAPIContext().inventory().contains("Cosmic Rune") && getAPIContext().inventory().contains("Sapphire ring"); } public void enchantsRings() { int count = getAPIContext().inventory().getCount(true, "Ring of recoil"); if (!getAPIContext().magic().isSpellSelected()) { if (getAPIContext().magic().cast(Spell.Modern.LEVEL_1_ENCHANT)) { Time.sleep(500, 1000, () -> getAPIContext().magic().isSpellSelected()); } } else { ItemWidget ring = getAPIContext().inventory().getItem("Sapphire ring"); if (ring != null) { if (ring.interact()) { Time.sleep(500, 1000, () -> getAPIContext().inventory().getCount(true, "Ring of recoil") > count); } } } } 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); } @Override public boolean onStart(String... strings) { System.out.println("Lets enchant some rings"); return true; } @Override protected int loop() { if (!getAPIContext().client().isLoggedIn()) { System.out.println("hold up till you are logged in mayne"); return 300; } if (needsToBank() && needsToOpenBank()) { System.out.println("Opening bank"); openBank(); return 300; } if (getAPIContext().bank().isOpen()) { if (doesNeedToDeposit()) { System.out.println("Depositing rings"); depositRings(); return 200; } if (shouldLogOut()) { logOut(); } if (needsWithdrawSapphirerings()) { System.out.println("Withdrawin the rings"); withdrawSapphireRing(); return 1000; } else { getAPIContext().bank().close(); return 200; } } if (needsToEnchant()) { System.out.println("Enchanting rings"); enchantsRings(); return 200; } if (needsToBank()) { System.out.println("Bankin"); openBank(); return 200; } if (doesNeedToDeposit()) { depositRings(); return 200; } return 200; } }
  2. 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!
  3. Im on it man! Created 2 more after this one 😄
  4. no longer at 69 posts lmaoooo 70 now get cucked
  5. 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; } }
×
×
  • Create New...