Jump to content

TheKevin

Members
  • Posts

    10
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by TheKevin

  1. runecrafting script ..... mhhhh should be not hard depending on how much it should be able to do but the most task if a player has everything rdy is to walk to the nearst bank, get the needed stuff then go to altair and craft runes ..... i will out it on the list of posible things i will do when i have time. But there is runeessence mining available.
  2. The script has to be prepared for different szenarios and events that can happen to look like a "normal" player, the mouse stuff comes from the client and it hasnt a stop/logout reason so no need for this like when you want to enchant stuff, maybe people want to run this script over hours.
  3. copy paste it into a projekt (there is a video how to setup intelliJ for it) and then just click on build tab and click on build. After this you have to make a "Script" folder in the epicbot folder with the settings and copy paste the compiled file/files into the script folder.
  4. GET rdy for it guys @veedubman87 and me finished and i tested it: Adventurer Jon Collection without anything to do self. So it will go to the Jon, claim what is claimable and walk to the castle bank to deposit all (inv. & Euip) and stops. Edit: Found a problem by some more and longer testings, its fixed. Problem with script stucks sometime by jon doesnt appear anymore. Edit 2: Last fix now with a area updated. import com.epicbot.api.shared.APIContext; import com.epicbot.api.shared.GameType; import com.epicbot.api.shared.entity.NPC; 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 = "Adventurer Jon Collector", gameType = GameType.OS) public class CollectPathRewards extends LoopScript { private final Area FrontAdventureJon = new Area (3231, 3233, 3233, 3235); private final Area Lumbridge_Bank = new Area(2, 3207, 3222, 3210, 3215); public int Phase = 1; APIContext ctx; @Override public boolean onStart(String... strings) { System.out.println("Walk to Jon to collect the Rewards"); ctx = getAPIContext(); return true; } @Override protected int loop() { System.out.println(FrontAdventureJon); if (Phase == 3) { System.out.println("Banking"); walkBank(); }else if (!FrontAdventureJon.contains(ctx.localPlayer().getLocation()) || Phase == 1) { System.out.println("Walk to Jon"); walkToAdventurePathDude(); }else if (FrontAdventureJon.contains(ctx.localPlayer().getLocation()) && Phase == 2) { System.out.println("Collecting Items"); collect(); } else{ System.out.println("Failed"); getAPIContext().game().logout(); } return 100; } public void walkToAdventurePathDude(){ if ((getAPIContext().walking().getRunEnergy() >= 40) && (!getAPIContext().walking().isRunEnabled())){ getAPIContext().walking().setRun(true); } if (!isActioning()){ getAPIContext().webWalking().walkTo(FrontAdventureJon.getCentralTile()); } if (FrontAdventureJon.contains(ctx.localPlayer().getLocation())){ Phase = 2; } } public void collect (){ if (getAPIContext().dialogues().isDialogueOpen()) { if (getAPIContext().dialogues().canContinue()) { getAPIContext().dialogues().selectContinue(); Time.sleep(3000); } else { Phase = 3; } } else { NPC Jon = ctx.npcs().query().nameMatches("Adventurer Jon").results().first(); if (Jon.interact("Claim")) { Time.sleep(3000 , () -> getAPIContext().dialogues().isDialogueOpen()); } } } public void walkBank(){ if ((getAPIContext().walking().getRunEnergy() > 40 && !(getAPIContext().walking().isRunEnabled()))){ getAPIContext().walking().setRun(true); } if (Lumbridge_Bank.contains(ctx.localPlayer().getLocation())) { if (ctx.bank().isOpen()) { if (!ctx.inventory().isEmpty()) { ctx.bank().depositEquipment(); Time.sleep(2000, () -> ctx.equipment().isEmpty()); ctx.bank().depositInventory(); Time.sleep(2000, () -> ctx.inventory().isEmpty()); } else { ctx.script().stop("Rewards Collected"); } } else { ctx.bank().open(); } } else { ctx.webWalking().walkTo(Lumbridge_Bank.getCentralTile()); } } public boolean isActioning(){ return getAPIContext().localPlayer().isAnimating() || getAPIContext().localPlayer().isMoving(); } } CollectPathRewards.class
  5. Worked a little bit on it: 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.Skill; import com.epicbot.api.shared.model.Tile; import com.epicbot.api.shared.util.paint.frame.PaintFrame; import com.epicbot.api.shared.script.LoopScript; import com.epicbot.api.shared.script.ScriptManifest; import com.epicbot.api.shared.util.time.Time; import com.epicbot.api.shared.util.time.Timer; import java.awt.*; @ScriptManifest(name = "Woodcutting.retard", gameType = GameType.OS) public class F2PWoodcuting extends LoopScript { private long startTime; private int experienceGained, startExperience = 0; private final Timer experienceTimer = new Timer(5_000); private final Area BANK_AREA = new Area(new Tile(3165, 3486, 0), new Tile(3170, 3492, 0)); private final Area OAK_AREA = new Area(new Tile(3188, 3465, 0), new Tile(3197,3458,0)); @Override public boolean onStart(String... strings) { startTime = System.currentTimeMillis(); return true; } @Override protected int loop() { if ( !getAPIContext().inventory().contains("Bronze axe", "Iron axe", "Steel axe", "Black axe", "Mithril axe", "Adamant axe", "Rune axe", "Gilded axe", "Dragon axe", "3rd age axe", "Infernal axe", "Crystal axe") && !getAPIContext().equipment().contains("Bronze axe", "Iron axe", "Steel axe", "Black axe", "Mithril axe", "Adamant axe", "Rune axe", "Gilded axe", "Dragon axe", "3rd age axe", "Infernal axe", "Crystal axe")) { getAxe(); } if (getAPIContext().walking().getRunEnergy() > 30 && !getAPIContext().walking().isRunEnabled()){ getAPIContext().walking().setRun(true); } else { if (getAPIContext().inventory().isFull()) { bank(); } else { handleCalculations(); chop(); } } return 0; } public void getAxe() { if (!BANK_AREA.contains(getAPIContext().localPlayer().getLocation())) { getAPIContext().walking().walkTo(BANK_AREA.getCentralTile()); System.out.println("Walking to bank"); Time.sleep(1000); } else if (BANK_AREA.contains(getAPIContext().localPlayer().getLocation())) { if (!getAPIContext().bank().isOpen()) { System.out.println("Trying to open bank"); getAPIContext().bank().open(); Time.sleep(4000, () -> getAPIContext().bank().isOpen()); } if (getAPIContext().bank().isOpen()) { System.out.println("Bank is open"); getAPIContext().bank().withdraw(1,"Bronze axe", "Iron axe", "Steel axe", "Black axe", "Mithril axe", "Adamant axe", "Rune axe", "Gilded axe", "Dragon axe", "3rd age axe", "Infernal axe", "Crystal axe"); Time.sleep(4000, () -> APIContext.get().inventory().contains("Bronze axe", "Iron axe", "Steel axe", "Black axe", "Mithril axe", "Adamant axe", "Rune axe", "Gilded axe", "Dragon axe", "3rd age axe", "Infernal axe", "Crystal axe")); System.out.println("Closing bank"); if (getAPIContext().bank().isOpen()){ getAPIContext().bank().close(); Time.sleep(1000); } if (getAPIContext().inventory().contains("Adamant axe")){ getAPIContext().inventory().interactItem("Wield" ,"Adamant axe"); Time.sleep(2000); } else if(getAPIContext().inventory().contains("Mithril axe")) { getAPIContext().inventory().interactItem("Wield" ,"Mithril axe"); Time.sleep(2000); } else{ getAPIContext().inventory().interactItem("Wield" ,"Bronze axe"); Time.sleep(2000); } } } } public void bank() { if (!BANK_AREA.contains(getAPIContext().localPlayer().getLocation())) { getAPIContext().walking().walkTo(BANK_AREA.getCentralTile()); System.out.println("Walking to bank"); Time.sleep(1000); } else if (BANK_AREA.contains(getAPIContext().localPlayer().getLocation())) { if (!getAPIContext().bank().isOpen()) { System.out.println("Trying to open bank"); getAPIContext().bank().open(); Time.sleep(4000, () -> getAPIContext().bank().isOpen()); } if (getAPIContext().bank().isOpen()) { System.out.println("Bank is open"); getAPIContext().bank().depositAllExcept("Bronze axe", "Iron axe", "Steel axe", "Black axe", "Mithril axe", "Adamant axe", "Rune axe", "Gilded axe", "Dragon axe", "3rd age axe", "Infernal axe", "Crystal axe"); System.out.println("Closing bank"); getAPIContext().bank().close(); } } } public void chop() { if (!OAK_AREA.contains(getAPIContext().localPlayer().getLocation())) { System.out.println("Walking to oak area"); getAPIContext().walking().walkTo(OAK_AREA.getCentralTile()); Time.sleep(3000); } else if (!this.isChopping()) { SceneObject tree = getAPIContext().objects().query().nameContains(new String[]{"Oak"}).results().nearest(); if (tree != null && tree.interact()) { System.out.println("Chopping"); Time.sleep(4000, () -> getAPIContext().localPlayer().isAnimating()); } } } public boolean isChopping() { return getAPIContext().localPlayer().isAnimating() || getAPIContext().localPlayer().isMoving(); } // Credit to Pseudo for this function. private void handleCalculations() { if (startExperience == 0) { startExperience = getAPIContext().skills().get(Skill.Skills.WOODCUTTING).getExperience(); } else { if (!experienceTimer.isRunning()) { experienceGained = getAPIContext().skills().get(Skill.Skills.WOODCUTTING).getExperience() - startExperience; experienceTimer.reset(); } } } private int getExperienceGainedString() { return experienceGained; } @Override protected void onPaint(Graphics2D g, APIContext ctx) { PaintFrame pf = new PaintFrame(); pf.setTitle("Script by Michaud.retard"); pf.addLine("Runtime: ", Time.getFormattedRuntime(startTime)); pf.addLine("Experience Gain: ",getExperienceGainedString()); pf.addLine("Lv.",getAPIContext().skills().woodcutting().getCurrentLevel()); pf.draw(g, 4, 110, ctx); } } F2PWoodcuting.class
  6. Copy the code, compile it to a runable file and deposite it in the epicbot folder with a new folder named Scripts. And for everyone: Enough my Work i done on this. import com.epicbot.api.shared.APIContext; import com.epicbot.api.shared.GameType; import com.epicbot.api.shared.entity.SceneObject; 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 com.epicbot.api.shared.webwalking.model.RSBank; 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 = "Private Miner & Smither", gameType = GameType.OS) public class Mine_Smelt extends LoopScript { //define image to display on screen private final BufferedImage image = downloadImage("https://i.imgur.com/6rfxOOp.jpg"); private final Area BANK_AREA = new Area(new Tile(3008, 3359, 0), new Tile(3019, 3352, 0)); private final Area TIN_AREA = new Area(new Tile(2983, 3238, 0), new Tile(2987, 3234, 0)); private final Area COPPER_AREA = new Area(new Tile(2975, 3248, 0), new Tile(2980, 3244, 0)); private final Area FURNACE_AREA = new Area(new Tile(2969, 3371, 0), new Tile(2978, 3367, 0)); private long startTime; private int counter = 0; @Override public boolean onStart(String... strings) { startTime = System.currentTimeMillis(); return true; } @Override protected int loop() { WidgetGroup LevelUpInterface = getAPIContext().widgets().get(233); if(!getAPIContext().inventory().contains("Bronze Pickaxe", "Iron Pickaxe", "Steel Pickaxe", "Black Pickaxe", "Mithril Pickaxe", "Adamant Pickaxe", "Rune Pickaxe", "Gilded Pickaxe", "Dragon Pickaxe", "3rd age Pickaxe", "Infernal Pickaxe", "Crystal Pickaxe") && !getAPIContext().equipment().contains("Bronze Pickaxe", "Iron Pickaxe", "Steel Pickaxe", "Black Pickaxe", "Mithril Pickaxe", "Adamant Pickaxe", "Rune Pickaxe", "Gilded Pickaxe", "Dragon Pickaxe", "3rd age Pickaxe", "Infernal Pickaxe", "Crystal Pickaxe")) { getPickAxe(); } else { if (LevelUpInterface.isVisible()) { levelup(); } else { if (getAPIContext().inventory().getCount("Uncut sapphire", "Uncut emerald", "Uncut ruby", "Uncut diamond", "Clue geode (beginner)") > 0) { drop(); } else if (getAPIContext().inventory().getCount("Bronze bar") == 14) { bank(); } else if (FURNACE_AREA.contains(getAPIContext().localPlayer().getLocation())) { smelt(); } else if (getAPIContext().inventory().getCount("Tin ore") == 14 && (getAPIContext().inventory().getCount("Copper ore") == 14)) { smelt(); } else if (getAPIContext().inventory().getCount("Tin ore") != 14) { mine_tin(); } else if (getAPIContext().inventory().getCount("Copper ore") != 14) { mine_copper(); } } } return 100; } public void getPickAxe() { if (!BANK_AREA.contains(getAPIContext().localPlayer().getLocation())) { getAPIContext().walking().walkTo(BANK_AREA.getCentralTile()); System.out.println("Walking to bank"); Time.sleep(10_000); } else if (BANK_AREA.contains(getAPIContext().localPlayer().getLocation())) { if (!getAPIContext().bank().isOpen()) { System.out.println("Trying to open bank"); getAPIContext().bank().open(); Time.sleep(5_000, () -> getAPIContext().bank().isOpen()); } if (getAPIContext().bank().isOpen()) { System.out.println("Bank is open"); getAPIContext().bank().depositInventory(); getAPIContext().bank().depositEquipment(); getAPIContext().bank().withdraw(1,"Bronze Pickaxe", "Iron Pickaxe", "Steel Pickaxe", "Black Pickaxe", "Mithril Pickaxe", "Adamant Pickaxe", "Rune Pickaxe", "Gilded Pickaxe", "Dragon Pickaxe", "3rd age Pickaxe", "Infernal Pickaxe", "Crystal Pickaxe"); Time.sleep(4000, () -> APIContext.get().inventory().contains("Bronze Pickaxe", "Iron Pickaxe", "Steel Pickaxe", "Black Pickaxe", "Mithril Pickaxe", "Adamant Pickaxe", "Rune Pickaxe", "Gilded Pickaxe", "Dragon Pickaxe", "3rd age Pickaxe", "Infernal Pickaxe", "Crystal Pickaxe")); System.out.println("Closing bank"); if(getAPIContext().bank().isOpen()) { getAPIContext().bank().close(); Time.sleep(1000); } if (getAPIContext().inventory().contains("Rune Pickaxe")){ getAPIContext().inventory().interactItem("Wield" ,"Rune Pickaxe"); Time.sleep(2000); } else if(getAPIContext().inventory().contains("Adamant Pickaxe")){ getAPIContext().inventory().interactItem("Wield" ,"Adamant Pickaxe"); Time.sleep(2000); } else if(getAPIContext().inventory().contains("Mithril Pickaxe")){ getAPIContext().inventory().interactItem("Wield" ,"Mithril Pickaxe"); Time.sleep(2000); } else { getAPIContext().inventory().interactItem("Wield" ,"Bronze Pickaxe"); Time.sleep(2000); } } } } private boolean isActioning() { return getAPIContext().localPlayer().isAnimating() || getAPIContext().localPlayer().isMoving(); } private void bank() { if (!BANK_AREA.contains(getAPIContext().localPlayer().getLocation())) { getAPIContext().webWalking().walkTo(RSBank.FALADOR_EAST.getTile()); } else { if (BANK_AREA.contains(getAPIContext().localPlayer().getLocation())) { if (!getAPIContext().bank().isOpen()) { getAPIContext().bank().open(); Time.sleep(1_000, () -> getAPIContext().bank().isOpen()); }else if (getAPIContext().bank().isOpen()) { getAPIContext().bank().depositInventory(); counter = counter + 14; Time.sleep(1_000, () -> !getAPIContext().bank().isOpen()); } } } } private void mine_tin() { final SceneObject Rocks = getAPIContext().objects().query().id(11361, 11360).results().nearest(); if (!TIN_AREA.contains(getAPIContext().localPlayer().getLocation())) { getAPIContext().webWalking().walkTo(TIN_AREA.getCentralTile()); } else if (!isActioning()) { if (Rocks != null) { Rocks.interact("Mine"); Time.sleep(2_000, () -> getAPIContext().localPlayer().isAnimating()); } } } private void mine_copper() { final SceneObject Rocks = getAPIContext().objects().query().id(11161, 10943).results().nearest(); if (!COPPER_AREA.contains(getAPIContext().localPlayer().getLocation())) { getAPIContext().webWalking().walkTo(COPPER_AREA.getCentralTile()); } else if (!isActioning()) { if (Rocks != null) { Rocks.interact("Mine"); Time.sleep(2_000, () -> getAPIContext().localPlayer().isAnimating()); } } } private void smelt() { final SceneObject FURNACE = getAPIContext().objects().query().nameContains("Furnace").results().nearest(); WidgetGroup SmeltInterface = getAPIContext().widgets().get(270); if (!FURNACE_AREA.contains(getAPIContext().localPlayer().getLocation())) { getAPIContext().webWalking().walkTo(FURNACE_AREA.getCentralTile()); } else if (isActioning()) { Time.sleep(2_000, () -> !getAPIContext().localPlayer().isAnimating()); Time.sleep(2_000, () -> getAPIContext().localPlayer().isAnimating() && getAPIContext().inventory().getCount("Bronze bar") != 14); } else if (SmeltInterface.isVisible()) { getAPIContext().keyboard().sendKey(49); Time.sleep(2_000, () -> getAPIContext().localPlayer().isAnimating()); } else if (FURNACE != null) { FURNACE.interact("Smelt"); Time.sleep(1000,2000); } } private void levelup() { WidgetGroup LevelUpInterface = getAPIContext().widgets().get(233); Time.sleep(500, 1000); if (LevelUpInterface.isVisible()) { getAPIContext().keyboard().sendKey(32); } } private void drop() { if (getAPIContext().inventory().getCount("Uncut sapphire") > 0) { getAPIContext().inventory().dropAll("Uncut sapphire"); }else if (getAPIContext().inventory().getCount("Uncut emerald") > 0) { getAPIContext().inventory().dropAll("Uncut emerald"); }else if (getAPIContext().inventory().getCount("Uncut ruby") > 0) { getAPIContext().inventory().dropAll("Uncut ruby"); }else if (getAPIContext().inventory().getCount("Uncut diamond") > 0) { getAPIContext().inventory().dropAll("Uncut diamond"); }else if (getAPIContext().inventory().getCount("Clue geode (beginner)") > 0) { getAPIContext().inventory().dropAll("Clue geode (beginner)"); Time.sleep(500,1000); } } @Override protected void onPaint(Graphics2D g, APIContext ctx){ PaintFrame pf = new PaintFrame(); g.drawImage(image, 0, getAPIContext().game().getViewportHeight() - -5, null); pf.addLine("Private Miner/Smither",""); pf.addLine("",""); pf.addLine("Runtime: ", Time.getFormattedRuntime(startTime)); pf.addLine("",""); pf.addLine("Mining Level: ", getAPIContext().skills().mining().getCurrentLevel()); pf.addLine("",""); pf.addLine("Smithing Level: ", getAPIContext().skills().smithing().getCurrentLevel()); pf.addLine("",""); pf.addLine("Bronze Bars: ", counter); pf.addLine("",""); pf.addLine("",""); pf.addLine("",""); pf.addLine("",""); pf.draw(g, 195, 339, ctx); } //download the image to display on screen 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; } } } Mine_Smelt.class
  7. 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; } } }
×
×
  • Create New...