Jump to content

LeetyPoo

Members
  • Posts

    14
  • Joined

  • Last visited

Recent Profile Visitors

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

LeetyPoo's Achievements

Bronze Member

Bronze Member (1/10)

  1. Yes I can help you out with this. I sent you a private message. Would like to know more details about this script.
  2. Hello everyone. I am releasing all of the custom scripts that I've made. They are probably not super great but they worked for me just messing around. Might be able to find some useful stuff I suppose. I am a java game developer and just took these on for fun. I don't really play anymore though so I thought I'd release it all for everyone else to hopefully get some use out of. If you want a custom script feel free to message me. I don't mind helping out where I can. This is just a basic script for mining at the mining guild. import com.epicbot.api.shared.APIContext; import com.epicbot.api.shared.GameType; import com.epicbot.api.shared.entity.GameEntity; import com.epicbot.api.shared.entity.GroundItem; import com.epicbot.api.shared.entity.NPC; import com.epicbot.api.shared.entity.WidgetChild; import com.epicbot.api.shared.methods.IInventoryAPI; import com.epicbot.api.shared.model.Skill; 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.methods.*; import com.epicbot.api.shared.util.time.Time; import com.epicbot.api.shared.util.time.Timer; import java.awt.*; @ScriptManifest(name = "ELeetMiningGuild", gameType = GameType.OS) public class ELeetMiner extends LoopScript { @Override public boolean onStart(String... strings) { return true; } private final Timer runTimer = new Timer(0); private int oresDropped = 0; private String status = "Starting"; private boolean scriptBanksOres = true; private int oreIndex = 0; private int profitGenerated = 0; private double experienceGained, startExperience = 0; private Skill.Skills trainedSkill = Skill.Skills.MINING; private double xpPerMine = 50.0; private int oresInBank = 0; private Tile mineArea = new Tile(3146,3150); private Tile bankArea = new Tile(3092,3245); private Tile intermediateArea = new Tile(3171,3408); private String[] oreType = {"Mithril ore", "Coal"}; private String[] rockType = {"Mithril rocks", "Coal rocks"}; public IInventoryAPI inventory() { return getAPIContext().inventory(); } public IMouseAPI mouse() { return getAPIContext().mouse(); } public ILocalPlayerAPI player() { return getAPIContext().localPlayer(); } public IGroundItemsAPI groundItems() { return getAPIContext().groundItems(); } public IObjectsAPI objects() { return getAPIContext().objects(); } public IBankAPI bank() { return getAPIContext().bank(); } public IWidgetsAPI widgets() { return getAPIContext().widgets(); } public IWalkingAPI walking() { return getAPIContext().walking(); } public IWebWalkingAPI webWalking() { return getAPIContext().webWalking(); } public ICameraAPI camera() { return getAPIContext().camera(); } public ISkillsAPI skills() { return getAPIContext().skills(); } @Override protected int loop() { if(!player().isAnimating()) { handleCalculations(); /*handleRandomEvent();*/ if (inventory().isFull()) { if (!scriptBanksOres) { dropOres(); dropGems(); } else { /*if(player().getY() < 3406) { walkToIntermediate(); }*/ walkToBank(); /*setCameraForBanking();*/ bankOres(); rotateCamera(); } } while(groundContainsOres() && !inventory().isFull()) { pickupOres(); } if(!inventory().contains(oreType[0]) && !inventory().contains(oreType[1])) { walkToMineArea(); } clickOre(); moveMouseRandomly(); rotateCamera(); Time.sleep(getSleepTime()); } return 3; } private void handleCalculations() { if (startExperience == 0) { startExperience = skills().get(trainedSkill).getExperience(); } else { experienceGained = skills().get(trainedSkill).getExperience() - startExperience; } } public static int getSleepTime() { int sleepMin = 1500; int sleepMax = 3000; return Random.nextInt(sleepMin, sleepMax); } public static int getShortSleepTime() { int sleepMin = 750; int sleepMax = 1683; return Random.nextInt(sleepMin, sleepMax); } public static int getAmountToTurnCamera() { return Random.nextInt(-100, 100); } public void dropOres() { status = "Dropping Ores"; for(int i = 0; i < oreType.length; i++) { int amount = inventory().getCount(oreType); oresDropped += amount; inventory().dropAll(oreType); } } public void pickupOres() { status = "Picking up ores"; rotateCamera(); for(int i = 0; i < oreType.length; i++) { GroundItem arrow = groundItems().query().named(oreType[i]).distance(2.0).reachable().results().nearest(); if(arrow != null) { arrow.interact("Take"); } } GroundItem uncut = groundItems().query().nameContains("Uncut").distance(2.0).reachable().results().nearest(); if(uncut != null) { uncut.interact("Take"); } } public void dropGems() { status = "Dropping Ores"; inventory().dropAll("Uncut sapphire"); inventory().dropAll("Uncut ruby"); inventory().dropAll("Uncut emerald"); inventory().dropAll("Uncut opal"); inventory().dropAll("Uncut jade"); inventory().dropAll("Uncut diamond"); } public void clickOre() { status = "Mining Ores"; if(player().isInCombat()) { return; } GameEntity mithrilRock = objects().query().named(rockType[0]).distance(10.0).results().nearest(); if(mithrilRock != null) { mithrilRock.interact("Mine"); rotateCamera(); Time.sleep(getShortSleepTime()); return; } GameEntity coal = objects().query().named(rockType[1]).distance(10.0).results().nearest(); if(coal != null) { coal.interact("Mine"); rotateCamera(); Time.sleep(getShortSleepTime()); return; } } public boolean groundContainsOres() { for(int i = 0; i < rockType.length; i++) { GroundItem ore = groundItems().query().named(oreType[i]).distance(2.0).results().nearest(); if(ore != null) { return true; } } return false; } public void walkToIntermediate() { status = "Walking to intermediary location"; webWalking().walkTo(getIntermediateTile()); if(!walking().isRunEnabled() && walking().getRunEnergy() > 50) { walking().setRun(true); } } public void walkToBank() { status = "Walking to bank"; webWalking().walkTo(getBankTile()); if(!walking().isRunEnabled() && walking().getRunEnergy() > 50) { walking().setRun(true); } Time.sleep(getShortSleepTime()); } public Tile getIntermediateTile() { int x = intermediateArea.getX(); int y = intermediateArea.getY(); int randomness = 2; int randomX = Random.nextInt(x - randomness, x + randomness); int randomY = Random.nextInt(y - randomness, y + randomness); return new Tile(randomX, randomY); } public Tile getBankTile() { int x = bankArea.getX(); int y = bankArea.getY(); int randomness = 0; int randomX = Random.nextInt(x - randomness, x + randomness); int randomY = Random.nextInt(y - randomness, y + randomness); return new Tile(x, y); } public Tile getMineTile() { int x = mineArea.getX(); int y = mineArea.getY(); int randomness = 0; int randomX = Random.nextInt(x - randomness, x + randomness); int randomY = Random.nextInt(y - randomness, y + randomness); return new Tile(x, y); } public void rotateCamera() { if(Random.nextInt(1, 5) != 1) { return; } Time.sleep(getShortSleepTime()); int currentYaw = camera().getYaw(); camera().setYaw(currentYaw + getAmountToTurnCamera()); } public void bankOres() { status = "Banking Ores"; int amount = 0; for(int i = 0; i < oreType.length; i++) { amount = inventory().getCount(oreType[i]); } GameEntity bank = objects().query().named("Bank booth").distance(5.0).results().nearest(); bank.interact("Bank"); while(!bank().isOpen()) { Time.sleep(); } clickBankAll(); oresDropped += amount; profitGenerated = oresDropped * 100; for(int i = 0; i < oreType.length; i++) { oresInBank = bank().getCount(oreType[i]); } } public void clickBankAll() { status = "Clicking Bank all"; bank().open(); Time.sleep(getShortSleepTime()); WidgetChild bankAllButton = widgets().get(12).getChild(42); mouse().click(bankAllButton); } public void walkToMineArea() { status = "Walking to Mine Area"; webWalking().walkTo(getMineTile()); if(!walking().isRunEnabled() && walking().getRunEnergy() > 50) { walking().setRun(true); } Time.sleep(getShortSleepTime()); } public void moveMouseRandomly() { if(Random.nextInt(1, 10) > 2) { mouse().moveRandomly(); } } private String rsFormat(Integer number) { String[] suffix = new String[]{"K", "M", "B", "T"}; int size = (number != 0) ? (int) Math.log10(number) : 0; if (size >= 3) { while (size % 3 != 0) { size = size - 1; } } return (size >= 3) ? +(Math.round((number / Math.pow(10, size)) * 10) / 10d) + suffix[(size / 3) - 1] : +number + ""; } private int getHourlyRate(int i) { return (int) (i / (runTimer.getElapsed() / 3600000.0D)); } @Override protected void onPaint(Graphics2D g, APIContext ctx) { PaintFrame frame = new PaintFrame("ELeetMiningGuild"); frame.addLine("[Time running]:", runTimer.toElapsedString()); frame.addLine("[Status]:", status); frame.addLine("[Ore Focus]:", oreType[oreIndex]); frame.addLine("", ""); frame.addLine("[Xp Gained]:", experienceGained); frame.addLine("[Xp Per Hour]:", rsFormat(getHourlyRate((int)experienceGained))); frame.addLine("",""); frame.addLine("[Ores Mined]:", (int)(experienceGained / xpPerMine)); frame.addLine("[Ores Per Hour]:", rsFormat(getHourlyRate((int)(experienceGained / xpPerMine)))); frame.addLine("",""); frame.addLine("[Ores In Bank]:", oresInBank); frame.addLine("[Profit Generated]:", profitGenerated); frame.addLine("[Total Ore Evaluation]:", (oresInBank * 175) + "gp"); frame.draw(g, 0, 155, ctx); } }
  3. Hello everyone. I am releasing all of the custom scripts that I've made. They are probably not super great but they worked for me just messing around. Might be able to find some useful stuff I suppose. I am a java game developer and just took these on for fun. I don't really play anymore though so I thought I'd release it all for everyone else to hopefully get some use out of. If you want a custom script feel free to message me. I don't mind helping out where I can. This is just a basic script for killing Hill Giants / Banking. *NOTE* This is probably my favorite script I've made. import com.epicbot.api.shared.APIContext; import com.epicbot.api.shared.GameType; import com.epicbot.api.shared.entity.*; import com.epicbot.api.shared.model.Skill; 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 com.epicbot.api.shared.methods.*; import com.epicbot.api.shared.util.time.Timer; import java.awt.*; @ScriptManifest(name = "ELeetHillGiants", gameType = GameType.OS) public class ELeetHillGiants extends LoopScript { @Override public boolean onStart(String... strings) { return true; } private final Timer runTimer = new Timer(0); private static String status = "Starting"; private double experienceGained, startExperience = 0; private Skill.Skills trainedSkill = Skill.Skills.ATTACK; private int bigBonesInBank = 0; private int totalKills = 0; private int totalBones = 0; private double xpPerKill = 144.0; private Tile giantArea = new Tile(3122,9842); private Tile bankArea = new Tile(3185,3444); private String[] pickupItems = {"Giant key", "Big bones", "Limpwurt root", "Law rune", "Nature rune", "Death rune", "Chaos rune", "Fire rune", "Uncut sapphire", "Uncut emerald", "Uncut ruby"}; private ILocalPlayerAPI player() { return getAPIContext().localPlayer(); } private IInventoryAPI inventory() { return getAPIContext().inventory(); } private IMouseAPI mouse() { return getAPIContext().mouse(); } private ICameraAPI camera() { return getAPIContext().camera(); } private ITabsAPI tabs() { return getAPIContext().tabs(); } private IWebWalkingAPI webWalking() { return getAPIContext().webWalking(); } private IWalkingAPI walking() { return getAPIContext().walking(); } private IGroundItemsAPI groundItems() { return getAPIContext().groundItems(); } private INPCsAPI npcs() { return getAPIContext().npcs(); } private IObjectsAPI objects() { return getAPIContext().objects(); } private IBankAPI bank() { return getAPIContext().bank(); } private ISkillsAPI skills() { return getAPIContext().skills(); } private IEquipmentAPI equipment() { return getAPIContext().equipment(); } private IWidgetsAPI widgets() { return getAPIContext().widgets(); } @Override protected int loop() { handleCalculations(); eatFood(); if(inventory().isFull()) { rotateCamera(); moveMouse(); teleportToVarrock(); rotateCamera(); walkToBank(); takeABreak(); rotateCamera(); bankLootItems(); } if(groundContainsLoot()) { rotateCamera(); pickupLoot(); } if(!player().isAttacking() && !player().isMoving() && player().getInteracting() == null) { rotateCamera(); if(player().getLocation().getY() < 9800 && !inventory().isFull()) { equipSword(); walkToHillGiantArea(); } attackNpc(); moveMouse(); } else { rotateCamera(); moveMouse(); Time.sleep(getSleepTime()); } return 3; } private void takeABreak() { status = "Taking a break"; if(Random.nextInt(1, 10) == 1) { Time.sleep(210000); } } private void bankLootItems() { status = "Banking loot items"; GameEntity bank = objects().query().named("Bank booth").results().nearest(); bank.interact("Bank"); Time.sleep(getSleepTime()); for(int i = 0; i < pickupItems.length; i++) { bank().depositAll(pickupItems[i]); Time.sleep(getShortSleepTime()); } bigBonesInBank = bank().getCount("Big bones"); //restock food String foodType = "Swordfish"; if(inventory().getCount(foodType) < 4) { int amountInInvy = inventory().getCount(foodType); bank().withdraw((4 - amountInInvy), foodType); } //Withdraw Brass key if absent Time.sleep(getShortSleepTime()); if(!inventory().contains("Brass key")) { bank().withdraw(1, "Brass key"); } bank().close(); Time.sleep(getSleepTime()); } private void handleCalculations() { if (startExperience == 0) { startExperience = skills().get(trainedSkill).getExperience(); } else { experienceGained = skills().get(trainedSkill).getExperience() - startExperience; } totalKills = (int)(experienceGained / xpPerKill); } private int getHourlyRate(int i) { return (int) (i / (runTimer.getElapsed() / 3600000.0D)); } public static int getShortSleepTime() { int sleepMin = 733; int sleepMax = 1123; return Random.nextInt(sleepMin, sleepMax); } public static int getSleepTime() { int sleepMin = 3750; int sleepMax = 5530; return Random.nextInt(sleepMin, sleepMax); } public static int getAmountToTurnCamera() { return Random.nextInt(-322, 363); } public void attackNpc() { if(player().getInteracting() != null || player().isMoving() || player().isAnimating()) { return; } String npc = "Hill Giant"; NPC entity = npcs().query().named(npc).distance(5.0).reachable().results().nearest(); status = "Attacking " + npc; if(!entity.isAttacking() && !entity.isInCombat()) { entity.interact("Attack"); Time.sleep(getShortSleepTime()); } } public void rotateCamera() { if(Random.nextInt(1, 25) == 1) { int currentYaw = camera().getY(); camera().setYaw(currentYaw + getAmountToTurnCamera()); } } public void moveMouse() { if(Random.nextInt(1, 25) < 3) { mouse().moveRandomly(); } } public void eatFood() { //Check Inventory For Food String food = "Swordfish"; if(!inventory().contains(food)) { System.out.println("No food left to eat."); walkToBank(); } //Click food if health is < 50% int currentHealth = player().getHealthPercent(); if(currentHealth < 75) { status = "Eating Food"; //Swap to Inventory Tab if it's not open if(!tabs().isOpen(ITabsAPI.Tabs.INVENTORY)) { tabs().open(ITabsAPI.Tabs.INVENTORY); } int foodX = inventory().getItem(food).getX(); int foodY = inventory().getItem(food).getY(); mouse().click(foodX, foodY); } } public void walkToBank() { status = "Walking to bank"; webWalking().walkTo(getBankTile()); if(!walking().isRunEnabled() && walking().getRunEnergy() > 50) { walking().setRun(true); } Time.sleep(getShortSleepTime()); } public void walkToHillGiantArea() { status = "Walking to Hill Giants"; webWalking().walkTo(getHillTile()); if(!walking().isRunEnabled() && walking().getRunEnergy() > 50) { walking().setRun(true); } Time.sleep(getShortSleepTime()); } public Tile getBankTile() { int x = bankArea.getX(); int y = bankArea.getY(); int randomness = 1; int randomX = Random.nextInt(x - randomness, x + randomness); int randomY = Random.nextInt(y - randomness, y + randomness); return new Tile(randomX, randomY); } public Tile getHillTile() { int x = giantArea.getX(); int y = giantArea.getY(); int randomness = 2; int randomX = Random.nextInt(x - randomness, x + randomness); int randomY = Random.nextInt(y - randomness, y + randomness); return new Tile(randomX, randomY); } public boolean groundContainsLoot() { boolean loot = false; for(int i = 0; i < pickupItems.length; i++) { GroundItem item = groundItems().query().named(pickupItems[i]).distance(1.0).reachable().results().nearest(); if(item != null || !inventory().isFull()) { loot = true; } } return loot; } public void equipSword() { status = "Equipping sword"; String sword = "Rune scimitar"; if(equipment().getItem(IEquipmentAPI.Slot.WEAPON).getName().equals(sword)) { return; } ItemWidget item = inventory().getItem(sword); if(!equipment().getItem(IEquipmentAPI.Slot.WEAPON).getName().equals(sword)) { mouse().click(item); } } public void pickupLoot() { status = "Picking up loot"; for(int i = 0; i < pickupItems.length; i++) { GameEntity loot = groundItems().query().named(pickupItems[i]).distance(4.0).reachable().results().nearest(); if(loot != null) { if(loot.getId() == 532) { totalBones++; } loot.interact("Take"); Time.sleep(getShortSleepTime()); } } rotateCamera(); } public void teleportToVarrock() { if(tabs().isOpen(ITabsAPI.Tabs.MAGIC)) { tabs().open(ITabsAPI.Tabs.MAGIC); } WidgetChild varrockButton = widgets().get(218).getChild(21); varrockButton.interact("Cast"); } private String rsFormat(Integer number) { String[] suffix = new String[]{"K", "M", "B", "T"}; int size = (number != 0) ? (int) Math.log10(number) : 0; if (size >= 3) { while (size % 3 != 0) { size = size - 1; } } return (size >= 3) ? +(Math.round((number / Math.pow(10, size)) * 10) / 10d) + suffix[(size / 3) - 1] : +number + ""; } @Override protected void onPaint(Graphics2D g, APIContext ctx) { PaintFrame frame = new PaintFrame("ELeetHillGiants"); frame.addLine("[Time running]:", runTimer.toElapsedString()); frame.addLine("[Status]:", status); frame.addLine("", ""); frame.addLine("[Xp Gained]", experienceGained); frame.addLine("[Xp Per Hour]", rsFormat(getHourlyRate((int)experienceGained))); frame.addLine("", ""); frame.addLine("[Kills]:", (int)(experienceGained / xpPerKill)); frame.addLine("[Kills Per Hour]:", rsFormat(getHourlyRate(totalKills))); frame.addLine("", ""); frame.addLine("[Bones Collected]:", totalBones); frame.addLine("[Bones Per Hour]:", rsFormat(getHourlyRate(totalBones))); frame.addLine("", ""); frame.addLine("[Big Bones Banked]:", bigBonesInBank); frame.addLine("[Big Bones Evaluation]:", bigBonesInBank * 235); frame.draw(g, 0, 130, ctx); } }
  4. Hello everyone. I am releasing all of the custom scripts that I've made. They are probably not super great but they worked for me just messing around. Might be able to find some useful stuff I suppose. I am a java game developer and just took these on for fun. I don't really play anymore though so I thought I'd release it all for everyone else to hopefully get some use out of. If you want a custom script feel free to message me. I don't mind helping out where I can. This is just a basic script for killing npcs. import com.epicbot.api.shared.APIContext; import com.epicbot.api.shared.GameType; import com.epicbot.api.shared.entity.GameEntity; import com.epicbot.api.shared.entity.GroundItem; import com.epicbot.api.shared.entity.ItemWidget; import com.epicbot.api.shared.model.Skill; 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 com.epicbot.api.shared.methods.*; import com.epicbot.api.shared.util.time.Timer; import java.awt.*; @ScriptManifest(name = "eLeetNpcKiller", gameType = GameType.OS) public class ELeetNpcKiller extends LoopScript { @Override public boolean onStart(String... strings) { return true; } private final Timer runTimer = new Timer(0); private static String status; private String arrowType = "Iron arrow"; private Tile lureArea = new Tile(2011,9002); private double experienceGained, startExperience = 0; private Skill.Skills trainedSkill = Skill.Skills.STRENGTH; public ILocalPlayerAPI player() { return getAPIContext().localPlayer(); } @Override protected int loop() { handleCalculations(); eatFood(); if(!player().isAttacking() && !player().isMoving() && player().getInteracting() == null) { if(playerIsUsingRanged()) { equipArrows(); while(groundContainsArrows()) { if(player().isInCombat() || !groundContainsArrows()) { break; } else { pickupArrows(); } } } rotateCamera(); attackNpc(); moveMouse(); } else { rotateCamera(); moveMouse(); Time.sleep(getSleepTime()); } return 3; } private void handleCalculations() { if (startExperience == 0) { startExperience = getAPIContext().skills().get(trainedSkill).getExperience(); } else { experienceGained = getAPIContext().skills().get(trainedSkill).getExperience() - startExperience; } } private int getHourlyRate(int i) { return (int) (i / (runTimer.getElapsed() / 3600000.0D)); } public static int getShortSleepTime() { int sleepMin = 733; int sleepMax = 1123; return Random.nextInt(sleepMin, sleepMax); } public static int getSleepTime() { int sleepMin = 3750; int sleepMax = 5530; return Random.nextInt(sleepMin, sleepMax); } public static int getAmountToTurnCamera() { return Random.nextInt(-322, 363); } public void attackNpc() { if(player().getInteracting() != null || player().isMoving() || player().isAnimating()) { return; } String npc = "Cow"; GameEntity entity = APIContext.get().npcs().query().named(npc).distance(6.0).reachable().moving().results().nearest(); status = "Attacking " + npc; entity.interact("Attack"); Time.sleep(getShortSleepTime()); } public void rotateCamera() { if(Random.nextInt(1, 12) == 1) { int currentYaw = APIContext.get().camera().getY(); APIContext.get().camera().setYaw(currentYaw + getAmountToTurnCamera()); } } public void moveMouse() { if(Random.nextInt(1, 25) < 3) { APIContext.get().mouse().moveRandomly(); } } public static void eatFood() { //Check Inventory For Food String food = "Swordfish"; if(!APIContext.get().inventory().contains(food)) { System.out.println("No food left to eat."); APIContext.get().script().pause("No food found. Paused Script."); } //Click food if health is < 50% int currentHealth = APIContext.get().localPlayer().getHealthPercent(); if(currentHealth < 50) { status = "Eating Food"; //Swap to Inventory Tab if it's not open if(!APIContext.get().tabs().isOpen(ITabsAPI.Tabs.INVENTORY)) { APIContext.get().tabs().open(ITabsAPI.Tabs.INVENTORY); } int foodX = APIContext.get().inventory().getItem(food).getX(); int foodY = APIContext.get().inventory().getItem(food).getY(); APIContext.get().mouse().click(foodX, foodY); } } public boolean playerIsUsingRanged() { boolean isUsingRanged; if(APIContext.get().equipment().getItem(IEquipmentAPI.Slot.WEAPON).getName().contains("bow")) { isUsingRanged = true; } else { isUsingRanged = false; } return isUsingRanged; } public boolean groundContainsArrows() { boolean arrowsFound; GroundItem arrow = APIContext.get().groundItems().query().named(arrowType).distance(10.0).reachable().results().nearest(); if(arrow != null) { arrowsFound = true; } else { arrowsFound = false; } return arrowsFound; } public void equipArrows() { ItemWidget item = APIContext.get().inventory().getItem(arrowType); if(!APIContext.get().equipment().getItem(IEquipmentAPI.Slot.AMMO).getName().equals(arrowType)) { APIContext.get().mouse().click(item); } } public void pickupArrows() { status = "Picking up arrows"; rotateCamera(); GroundItem arrow = APIContext.get().groundItems().query().named(arrowType).distance(10.0).reachable().results().nearest(); if(arrow != null) { arrow.interact("Take"); } Time.sleep(getShortSleepTime()); } public void walkToLureSpot() { APIContext.get().webWalking().walkTo(lureArea); } @Override protected void onPaint(Graphics2D g, APIContext ctx) { double xpPerKill = 32.0; PaintFrame frame = new PaintFrame("eLeetNpcKiller"); frame.addLine("[Time running]:", runTimer.toElapsedString()); frame.addLine("[Status]:", status); frame.addLine("[Xp Gained]", experienceGained); frame.addLine("[Kills]:", (int)(experienceGained / xpPerKill)); frame.draw(g, 0, 220, ctx); } }
  5. Hello everyone. I am releasing all of the custom scripts that I've made. They are probably not super great but they worked for me just messing around. Might be able to find some useful stuff I suppose. I am a java game developer and just took these on for fun. I don't really play anymore though so I thought I'd release it all for everyone else to hopefully get some use out of. If you want a custom script feel free to message me. I don't mind helping out where I can. This is just a basic script for mining coal. import com.epicbot.api.shared.APIContext; import com.epicbot.api.shared.GameType; import com.epicbot.api.shared.entity.GameEntity; import com.epicbot.api.shared.entity.GroundItem; import com.epicbot.api.shared.entity.NPC; import com.epicbot.api.shared.entity.WidgetChild; import com.epicbot.api.shared.methods.IInventoryAPI; import com.epicbot.api.shared.model.Skill; 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.methods.*; import com.epicbot.api.shared.util.time.Time; import com.epicbot.api.shared.util.time.Timer; import java.awt.*; @ScriptManifest(name = "ELeetCoalMiner", gameType = GameType.OS) public class ELeetCoalMiner extends LoopScript { @Override public boolean onStart(String... strings) { return true; } private final Timer runTimer = new Timer(0); private int oresDropped = 0; private String status = "Starting"; private boolean scriptBanksOres = true; private int oreIndex = 0; private int profitGenerated = 0; private double experienceGained, startExperience = 0; private Skill.Skills trainedSkill = Skill.Skills.MINING; private double xpPerMine = 50.0; private int oresInBank = 0; private Tile mineArea = new Tile(3040,9740); private Tile bankArea = new Tile(3013,3355); private Tile intermediateArea = new Tile(3171,3408); private String[] oreType = {"Coal"}; private String[] rockType = {"Coal rocks"}; public IInventoryAPI inventory() { return getAPIContext().inventory(); } public IMouseAPI mouse() { return getAPIContext().mouse(); } public ILocalPlayerAPI player() { return getAPIContext().localPlayer(); } public IGroundItemsAPI groundItems() { return getAPIContext().groundItems(); } public IObjectsAPI objects() { return getAPIContext().objects(); } public IBankAPI bank() { return getAPIContext().bank(); } public IWidgetsAPI widgets() { return getAPIContext().widgets(); } public IWalkingAPI walking() { return getAPIContext().walking(); } public IWebWalkingAPI webWalking() { return getAPIContext().webWalking(); } public ICameraAPI camera() { return getAPIContext().camera(); } public ISkillsAPI skills() { return getAPIContext().skills(); } @Override protected int loop() { if(!player().isAnimating()) { handleCalculations(); /*handleRandomEvent();*/ if (inventory().isFull()) { if (!scriptBanksOres) { dropOres(); dropGems(); } else { /*if(player().getY() < 3406) { walkToIntermediate(); }*/ walkToBank(); /*setCameraForBanking();*/ bankOres(); rotateCamera(); } } /* while(groundContainsOres() && !inventory().isFull()) { pickupOres(); }*/ if(!inventory().contains(oreType)) { walkToMineArea(); } clickOre(); moveMouseRandomly(); rotateCamera(); Time.sleep(getSleepTime()); } return 3; } private void handleCalculations() { if (startExperience == 0) { startExperience = skills().get(trainedSkill).getExperience(); } else { experienceGained = skills().get(trainedSkill).getExperience() - startExperience; } } public static int getSleepTime() { int sleepMin = 1500; int sleepMax = 3000; return Random.nextInt(sleepMin, sleepMax); } public static int getShortSleepTime() { int sleepMin = 750; int sleepMax = 1683; return Random.nextInt(sleepMin, sleepMax); } public static int getAmountToTurnCamera() { return Random.nextInt(-100, 100); } public void dropOres() { status = "Dropping Ores"; for(int i = 0; i < oreType.length; i++) { int amount = inventory().getCount(oreType); oresDropped += amount; inventory().dropAll(oreType); } } public void pickupOres() { status = "Picking up ores"; rotateCamera(); for(int i = 0; i < oreType.length; i++) { GroundItem arrow = groundItems().query().named(oreType[i]).distance(2.0).reachable().results().nearest(); if(arrow != null) { arrow.interact("Take"); } } GroundItem uncut = groundItems().query().nameContains("Uncut").distance(2.0).reachable().results().nearest(); if(uncut != null) { uncut.interact("Take"); } } public void dropGems() { status = "Dropping Ores"; inventory().dropAll("Uncut sapphire"); inventory().dropAll("Uncut ruby"); inventory().dropAll("Uncut emerald"); inventory().dropAll("Uncut opal"); inventory().dropAll("Uncut jade"); inventory().dropAll("Uncut diamond"); } public void clickOre() { status = "Mining Ores"; if(player().isInCombat()) { return; } GameEntity coal = objects().query().named(rockType).distance(10.0).results().nearest(); if(coal != null) { coal.interact("Mine"); rotateCamera(); Time.sleep(getShortSleepTime()); } } public boolean groundContainsOres() { for(int i = 0; i < rockType.length; i++) { GroundItem ore = groundItems().query().named(oreType[i]).distance(2.0).results().nearest(); if(ore != null) { return true; } } return false; } public void walkToIntermediate() { status = "Walking to intermediary location"; webWalking().walkTo(getIntermediateTile()); if(!walking().isRunEnabled() && walking().getRunEnergy() > 50) { walking().setRun(true); } } public void walkToBank() { status = "Walking to bank"; webWalking().walkTo(getBankTile()); if(!walking().isRunEnabled() && walking().getRunEnergy() > 50) { walking().setRun(true); } Time.sleep(getShortSleepTime()); } public Tile getIntermediateTile() { int x = intermediateArea.getX(); int y = intermediateArea.getY(); int randomness = 2; int randomX = Random.nextInt(x - randomness, x + randomness); int randomY = Random.nextInt(y - randomness, y + randomness); return new Tile(randomX, randomY); } public Tile getBankTile() { int x = bankArea.getX(); int y = bankArea.getY(); int randomness = 0; int randomX = Random.nextInt(x - randomness, x + randomness); int randomY = Random.nextInt(y - randomness, y + randomness); return new Tile(x, y); } public Tile getMineTile() { int x = mineArea.getX(); int y = mineArea.getY(); int randomness = 0; int randomX = Random.nextInt(x - randomness, x + randomness); int randomY = Random.nextInt(y - randomness, y + randomness); return new Tile(x, y); } public void rotateCamera() { if(Random.nextInt(1, 5) != 1) { return; } Time.sleep(getShortSleepTime()); int currentYaw = camera().getYaw(); camera().setYaw(currentYaw + getAmountToTurnCamera()); } public void bankOres() { status = "Banking Ores"; int amount = 0; for(int i = 0; i < oreType.length; i++) { amount = inventory().getCount(oreType[i]); } GameEntity bank = objects().query().named("Bank booth").distance(5.0).results().nearest(); bank.interact("Bank"); while(!bank().isOpen()) { Time.sleep(); } clickBankAll(); oresDropped += amount; profitGenerated = oresDropped * 100; for(int i = 0; i < oreType.length; i++) { oresInBank = bank().getCount(oreType[i]); } } public void clickBankAll() { status = "Clicking Bank all"; bank().open(); Time.sleep(getShortSleepTime()); WidgetChild bankAllButton = widgets().get(12).getChild(42); mouse().click(bankAllButton); } public void walkToMineArea() { status = "Walking to Mine Area"; webWalking().walkTo(getMineTile()); if(!walking().isRunEnabled() && walking().getRunEnergy() > 50) { walking().setRun(true); } Time.sleep(getShortSleepTime()); } public void moveMouseRandomly() { if(Random.nextInt(1, 10) > 2) { mouse().moveRandomly(); } } private String rsFormat(Integer number) { String[] suffix = new String[]{"K", "M", "B", "T"}; int size = (number != 0) ? (int) Math.log10(number) : 0; if (size >= 3) { while (size % 3 != 0) { size = size - 1; } } return (size >= 3) ? +(Math.round((number / Math.pow(10, size)) * 10) / 10d) + suffix[(size / 3) - 1] : +number + ""; } private int getHourlyRate(int i) { return (int) (i / (runTimer.getElapsed() / 3600000.0D)); } @Override protected void onPaint(Graphics2D g, APIContext ctx) { PaintFrame frame = new PaintFrame("ELeetCoalMiner"); frame.addLine("[Time running]:", runTimer.toElapsedString()); frame.addLine("[Status]:", status); frame.addLine("[Ore Focus]:", oreType[oreIndex]); frame.addLine("", ""); frame.addLine("[Xp Gained]:", experienceGained); frame.addLine("[Xp Per Hour]:", rsFormat(getHourlyRate((int)experienceGained))); frame.addLine("",""); frame.addLine("[Ores Mined]:", (int)(experienceGained / xpPerMine)); frame.addLine("[Ores Per Hour]:", rsFormat(getHourlyRate((int)(experienceGained / xpPerMine)))); frame.addLine("",""); frame.addLine("[Ores In Bank]:", oresInBank); frame.addLine("[Profit Generated]:", profitGenerated); frame.addLine("[Total Ore Evaluation]:", (oresInBank * 175) + "gp"); frame.draw(g, 0, 155, ctx); } }
  6. Hello everyone. I am releasing all of the custom scripts that I've made. They are probably not super great but they worked for me just messing around. Might be able to find some useful stuff I suppose. I am a java game developer and just took these on for fun. I don't really play anymore though so I thought I'd release it all for everyone else to hopefully get some use out of. If you want a custom script feel free to message me. I don't mind helping out where I can. This is just a basic script for killing frogs in lumby and burying the bones. import com.epicbot.api.shared.APIContext; import com.epicbot.api.shared.GameType; import com.epicbot.api.shared.entity.GameEntity; import com.epicbot.api.shared.entity.GroundItem; import com.epicbot.api.shared.entity.ItemWidget; import com.epicbot.api.shared.model.Skill; 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 com.epicbot.api.shared.methods.*; import com.epicbot.api.shared.util.time.Timer; import java.awt.*; @ScriptManifest(name = "ELeetLumbyFrogs", gameType = GameType.OS) public class ELeetLumbyFrogs extends LoopScript { @Override public boolean onStart(String... strings) { return true; } private final Timer runTimer = new Timer(0); private static String status = "Starting"; private String[] pickupLoots = {"Big bones"}; private double trainedSkillExperienceGained, trainedSkillStartingExperience = 0; private double prayerSkillExperienceGained, prayerSkillStartingExperience = 0; private Skill.Skills trainedSkill = Skill.Skills.RANGED; private Skill.Skills prayerSkill = Skill.Skills.PRAYER; public IGroundItemsAPI groundItems() { return getAPIContext().groundItems(); } public ICameraAPI camera() { return getAPIContext().camera(); } public INPCsAPI npcs() { return getAPIContext().npcs(); } public IMouseAPI mouse() { return getAPIContext().mouse(); } public IInventoryAPI inventory() { return getAPIContext().inventory(); } public IScriptAPI script() { return getAPIContext().script(); } public ILocalPlayerAPI player() { return getAPIContext().localPlayer(); } public ITabsAPI tabs() { return getAPIContext().tabs(); } public IEquipmentAPI equipment() { return getAPIContext().equipment(); } public ISkillsAPI skills() { return getAPIContext().skills(); } public IWebWalkingAPI webWalking() { return getAPIContext().webWalking(); } @Override protected int loop() { handleCalculations(); eatFood(); if(!player().isAttacking() && !player().isMoving() && player().getInteracting() == null) { /*if(playerIsUsingRanged()) { equipArrows(); }*/ while(inventoryContainsBigBones()) { buryBones(); } while(groundContainsLoot()) { pickupLoots(); } rotateCamera(); attackNpc(); moveMouse(); } return 3; } private void handleCalculations() { //Handle Trained Skill Calculation if (trainedSkillStartingExperience == 0) { trainedSkillStartingExperience = skills().get(trainedSkill).getExperience(); } else { trainedSkillExperienceGained = skills().get(trainedSkill).getExperience() - trainedSkillStartingExperience; } //Handle Prayer Skill Calculation if (prayerSkillStartingExperience == 0) { prayerSkillStartingExperience = skills().get(prayerSkill).getExperience(); } else { prayerSkillExperienceGained = skills().get(prayerSkill).getExperience() - prayerSkillStartingExperience; } } private int getHourlyRate(int i) { return (int) (i / (runTimer.getElapsed() / 3600000.0D)); } public static int getShortSleepTime() { int sleepMin = 733; int sleepMax = 1123; return Random.nextInt(sleepMin, sleepMax); } public static int getSleepTime() { int sleepMin = 3750; int sleepMax = 5530; return Random.nextInt(sleepMin, sleepMax); } public static int getAmountToTurnCamera() { return Random.nextInt(-322, 363); } private void walkToStartingSpot() { webWalking().walkTo(new Tile(3199, 3171, 0)); } public void attackNpc() { if(player().getInteracting() != null || player().isMoving() || player().isAnimating()) { return; } String npc = "Giant frog"; GameEntity entity = npcs().query().named(npc).distance(10.0).reachable().results().nearest(); if(entity == null) { walkToStartingSpot(); Time.sleep(getSleepTime()); return; } status = "Attacking " + npc; entity.interact("Attack"); Time.sleep(getShortSleepTime()); } public void rotateCamera() { if(Random.nextInt(1, 12) == 1) { int currentYaw = camera().getY(); camera().setYaw(currentYaw + getAmountToTurnCamera()); } } public void moveMouse() { if(Random.nextInt(1, 25) < 3) { mouse().moveRandomly(); } } public void eatFood() { //Check Inventory For Food String food = "Swordfish"; if(!inventory().contains(food)) { System.out.println("No food left to eat."); script().pause("No food found. Paused Script."); } //Click food if health is < 50% int currentHealth = player().getHealthPercent(); if(currentHealth < 50) { status = "Eating Food"; //Swap to Inventory Tab if it's not open if(!tabs().isOpen(ITabsAPI.Tabs.INVENTORY)) { tabs().open(ITabsAPI.Tabs.INVENTORY); } int foodX = inventory().getItem(food).getX(); int foodY = inventory().getItem(food).getY(); mouse().click(foodX, foodY); } } public boolean inventoryContainsBigBones() { return inventory().contains("Big bones"); } public boolean playerIsUsingRanged() { boolean isUsingRanged; if(equipment().getItem(IEquipmentAPI.Slot.WEAPON).getName().contains("bow")) { isUsingRanged = true; } else { isUsingRanged = false; } return isUsingRanged; } public boolean groundContainsLoot() { boolean lootFound = false; for(int i = 0; i < pickupLoots.length; i++) { GroundItem loot = groundItems().query().named(pickupLoots[i]).distance(10.0).reachable().results().nearest(); if(loot != null) { lootFound = true; } } return lootFound; } public void equipArrows() { if(Random.nextInt(1, 10) > 1) { return; } ItemWidget item = inventory().getItem(pickupLoots[0]); if(inventory().contains(pickupLoots[0])) { mouse().click(item); } } public void buryBones() { if(!tabs().isOpen(ITabsAPI.Tabs.INVENTORY)) { tabs().open(ITabsAPI.Tabs.INVENTORY); } ItemWidget item = inventory().getItem(pickupLoots[0]); item.interact("Bury"); } public void pickupLoots() { status = "Picking up loots"; rotateCamera(); for(int i = 0; i < pickupLoots.length; i++) { GroundItem item = groundItems().query().named(pickupLoots[i]).distance(10.0).reachable().results().nearest(); if(item != null) { item.interact("Take"); Time.sleep(getShortSleepTime()); } } } private String rsFormat(Integer number) { String[] suffix = new String[]{"K", "M", "B", "T"}; int size = (number != 0) ? (int) Math.log10(number) : 0; if (size >= 3) { while (size % 3 != 0) { size = size - 1; } } return (size >= 3) ? +(Math.round((number / Math.pow(10, size)) * 10) / 10d) + suffix[(size / 3) - 1] : +number + ""; } @Override protected void onPaint(Graphics2D g, APIContext ctx) { double xpPerKill = 92.0; PaintFrame frame = new PaintFrame("ELeetLumbyFrogs"); frame.addLine("[Time running]:", runTimer.toElapsedString()); frame.addLine("[Status]:", status); frame.addLine("", ""); frame.addLine("[Kills]:", (int)(trainedSkillExperienceGained / xpPerKill)); frame.addLine("[Bones Buried]:", (int)(prayerSkillExperienceGained / 15)); frame.addLine("", ""); frame.addLine("[Ranged Xp Gained]", trainedSkillExperienceGained); frame.addLine("[Ranged Xp Per Hr]", rsFormat(getHourlyRate((int)trainedSkillExperienceGained))); frame.addLine("", ""); frame.addLine("[Prayer Xp Gained]", prayerSkillExperienceGained); frame.addLine("[Prayer Xp Per Hr]", rsFormat(getHourlyRate((int)prayerSkillExperienceGained))); frame.draw(g, 0, 220, ctx); } }
  7. Hello everyone. I am releasing all of the custom scripts that I've made. They are probably not super great but they worked for me just messing around. Might be able to find some useful stuff I suppose. I am a java game developer and just took these on for fun. I don't really play anymore though so I thought I'd release it all for everyone else to hopefully get some use out of. If you want a custom script feel free to message me. I don't mind helping out where I can. This is just a basic script for Killing Ogress Warriors. *NOTE* I cannot remember if I ever finished this script or not but should be pretty close. import com.epicbot.api.shared.APIContext; import com.epicbot.api.shared.GameType; import com.epicbot.api.shared.entity.*; 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.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 com.epicbot.api.shared.methods.*; import com.epicbot.api.shared.util.time.Timer; import java.awt.*; @ScriptManifest(name = "ELeetOgressWarriors", gameType = GameType.OS) public class ELeetOgressWarriors extends LoopScript { @Override public boolean onStart(String... strings) { return true; } private final Timer runTimer = new Timer(0); private static String status = "Starting"; private double experienceGained, startExperience = 0; private Skill.Skills trainedSkill = Skill.Skills.ATTACK; private int bigBonesInBank = 0; private int totalKills = 0; private int totalBones = 0; private double xpPerKill = 144.0; private Tile ogressArea = new Tile(2018,8997,1); private Tile safeArea = new Tile(2015,9005,1); private Tile holeAreaTop = new Tile(2524,2861,0); private Tile holeAreaBottom = new Tile(2012,9004,1); private Area killArea = new Area(2015, 8996, 2016, 9002); private Tile bankArea = new Tile(2569,2864); private String[] pickupItems = {"Law rune", "Nature rune", "Death rune", "Air rune", "Chaos rune", "Cosmic rune", "Earth rune","Fire rune", "Mind rune", "Water rune", "Steel arrow", "Iron arrow", "Uncut sapphire", "Uncut emerald", "Uncut ruby", "Rune med helm", "Rune full helm", "Mithril kiteshield", "Big bones"}; private ILocalPlayerAPI player() { return getAPIContext().localPlayer(); } private IInventoryAPI inventory() { return getAPIContext().inventory(); } private IMouseAPI mouse() { return getAPIContext().mouse(); } private ICameraAPI camera() { return getAPIContext().camera(); } private ITabsAPI tabs() { return getAPIContext().tabs(); } private IWebWalkingAPI webWalking() { return getAPIContext().webWalking(); } private IWalkingAPI walking() { return getAPIContext().walking(); } private IGroundItemsAPI groundItems() { return getAPIContext().groundItems(); } private INPCsAPI npcs() { return getAPIContext().npcs(); } private IObjectsAPI objects() { return getAPIContext().objects(); } private IBankAPI bank() { return getAPIContext().bank(); } private ISkillsAPI skills() { return getAPIContext().skills(); } private IEquipmentAPI equipment() { return getAPIContext().equipment(); } private IWidgetsAPI widgets() { return getAPIContext().widgets(); } @Override protected int loop() { handleCalculations(); eatFood(); if(beingAttackedByShaman()) { walkToSafeArea(); } if(inventory().isFull()) { rotateCamera(); moveMouse(); rotateCamera(); walkToBank(); takeABreak(); rotateCamera(); bankLootItems(); } if(groundContainsLoot()) { rotateCamera(); pickupLoot(); } if(!player().isInCombat() && !playerIsInKillArea()) { webWalking().walkTo(getHillTile()); } if(!player().isAttacking() && !player().isMoving() && player().getInteracting() == null) { rotateCamera(); if(player().getLocation().getY() > 8996 && !inventory().isFull()) { equipSword(); walkToHillGiantArea(); } attackNpc(); moveMouse(); } else { rotateCamera(); moveMouse(); Time.sleep(getSleepTime()); } return 3; } private void clickDownHole() { GameEntity hole = objects().query().named("Hole").distance(3.0).results().nearest(); hole.interact("Enter"); Time.sleep(getSleepTime()); } private void climbUpHole() { GameEntity hole = objects().query().named("Vine ladder").distance(3.0).results().nearest(); hole.interact("Climb"); Time.sleep(getSleepTime()); } private boolean playerIsToDeep() { return player().getY() <= 8996; } private boolean playerIsInKillArea() { return killArea.contains(player().getLocation()); } public void walkToSafeArea() { status = "Walking to safe area"; webWalking().walkTo(getSafeAreaTile()); walking().setRun(true); Time.sleep(getLongSleepTime()); } private void takeABreak() { status = "Taking a break"; if(Random.nextInt(1, 10) == 1) { Time.sleep(210000); } } private boolean beingAttackedByShaman() { if(player().getInteracting() == null) { return false; } boolean bool = false; if(player().getInteracting().getName().equals("Ogress Shaman")) { bool = true; } return bool; } private void bankLootItems() { status = "Banking loot items"; GameEntity bank = objects().query().named("Bank booth").results().nearest(); bank.interact("Bank"); Time.sleep(getSleepTime()); for(int i = 0; i < pickupItems.length; i++) { bank().depositAll(pickupItems[i]); Time.sleep(getShortSleepTime()); } bigBonesInBank = bank().getCount("Big bones"); //restock food String foodType = "Swordfish"; if(inventory().getCount(foodType) < 20) { int amountInInvy = inventory().getCount(foodType); bank().withdraw((20 - amountInInvy), foodType); } bank().close(); Time.sleep(getSleepTime()); } private void handleCalculations() { if (startExperience == 0) { startExperience = skills().get(trainedSkill).getExperience(); } else { experienceGained = skills().get(trainedSkill).getExperience() - startExperience; } totalKills = (int)(experienceGained / xpPerKill); } private int getHourlyRate(int i) { return (int) (i / (runTimer.getElapsed() / 3600000.0D)); } public static int getShortSleepTime() { int sleepMin = 733; int sleepMax = 1123; return Random.nextInt(sleepMin, sleepMax); } public static int getLongSleepTime() { int sleepMin = 10000; int sleepMax = 15000; return Random.nextInt(sleepMin, sleepMax); } public static int getSleepTime() { int sleepMin = 3750; int sleepMax = 5530; return Random.nextInt(sleepMin, sleepMax); } public static int getAmountToTurnCamera() { return Random.nextInt(-322, 363); } public void attackNpc() { if(player().getInteracting() != null || player().isMoving() || player().isAnimating()) { return; } String npc = "Ogress Warrior"; NPC entity = npcs().query().named(npc).id(7989).distance(6.0).reachable().results().nearest(); status = "Attacking " + npc; if(!entity.isAttacking() && !entity.isInCombat()) { entity.interact("Attack"); Time.sleep(getShortSleepTime()); } } public void rotateCamera() { if(Random.nextInt(1, 25) == 1) { int currentYaw = camera().getY(); camera().setYaw(currentYaw + getAmountToTurnCamera()); } } public void moveMouse() { if(Random.nextInt(1, 25) < 3) { mouse().moveRandomly(); } } public void eatFood() { //Check Inventory For Food String food = "Swordfish"; if(!inventory().contains(food)) { System.out.println("No food left to eat."); walkToBank(); } //Click food if health is < 50% int currentHealth = player().getHealthPercent(); if(currentHealth < 75) { status = "Eating Food"; //Swap to Inventory Tab if it's not open if(!tabs().isOpen(ITabsAPI.Tabs.INVENTORY)) { tabs().open(ITabsAPI.Tabs.INVENTORY); } int foodX = inventory().getItem(food).getX(); int foodY = inventory().getItem(food).getY(); mouse().click(foodX, foodY); } } public void walkToBank() { status = "Walking to bank"; webWalking().walkTo(holeAreaBottom); climbUpHole(); webWalking().walkTo(getBankTile()); if(!walking().isRunEnabled() && walking().getRunEnergy() > 50) { walking().setRun(true); } Time.sleep(getShortSleepTime()); } public void walkToHoleAreaTop() { status = "Walking to hole area top"; webWalking().walkTo(holeAreaTop); if(!walking().isRunEnabled() && walking().getRunEnergy() > 50) { walking().setRun(true); } Time.sleep(getShortSleepTime()); } public void walkToHoleAreaBottom() { status = "Walking to hole area bottom"; webWalking().walkTo(holeAreaBottom); if(!walking().isRunEnabled() && walking().getRunEnergy() > 50) { walking().setRun(true); } Time.sleep(getShortSleepTime()); } public void walkToHillGiantArea() { status = "Walking to Ogress Warriors"; webWalking().walkTo(holeAreaTop); clickDownHole(); webWalking().walkTo(getHillTile()); if(!walking().isRunEnabled() && walking().getRunEnergy() > 50) { walking().setRun(true); } Time.sleep(getShortSleepTime()); } public Tile getBankTile() { int x = bankArea.getX(); int y = bankArea.getY(); int randomness = 1; int randomX = Random.nextInt(x - randomness, x + randomness); int randomY = Random.nextInt(y - randomness, y + randomness); return new Tile(randomX, randomY); } public Tile getSafeAreaTile() { int x = safeArea.getX(); int y = safeArea.getY(); int randomness = 1; int randomX = Random.nextInt(x - randomness, x + randomness); int randomY = Random.nextInt(y - randomness, y + randomness); return new Tile(randomX, randomY); } public Tile getHillTile() { int x = ogressArea.getX(); int y = ogressArea.getY(); int randomness = 0; int randomX = Random.nextInt(x - randomness, x + randomness); int randomY = Random.nextInt(y - randomness, y + randomness); return new Tile(randomX, randomY, 1); } public boolean groundContainsLoot() { boolean loot = false; for(int i = 0; i < pickupItems.length; i++) { GroundItem item = groundItems().query().named(pickupItems[i]).distance(1.0).reachable().results().nearest(); if(item != null || !inventory().isFull()) { loot = true; } } return loot; } public void equipSword() { status = "Equipping sword"; String sword = "Rune scimitar"; if(equipment().getItem(IEquipmentAPI.Slot.WEAPON).getName().equals(sword)) { return; } ItemWidget item = inventory().getItem(sword); if(!equipment().getItem(IEquipmentAPI.Slot.WEAPON).getName().equals(sword)) { mouse().click(item); } } public void pickupLoot() { status = "Picking up loot"; for(int i = 0; i < pickupItems.length; i++) { GameEntity loot = groundItems().query().named(pickupItems[i]).distance(5.0).reachable().results().nearest(); if(loot != null) { if(loot.getId() == 532) { totalBones++; } loot.interact("Take"); Time.sleep(getShortSleepTime()); } } rotateCamera(); } private String rsFormat(Integer number) { String[] suffix = new String[]{"K", "M", "B", "T"}; int size = (number != 0) ? (int) Math.log10(number) : 0; if (size >= 3) { while (size % 3 != 0) { size = size - 1; } } return (size >= 3) ? +(Math.round((number / Math.pow(10, size)) * 10) / 10d) + suffix[(size / 3) - 1] : +number + ""; } @Override protected void onPaint(Graphics2D g, APIContext ctx) { PaintFrame frame = new PaintFrame("ELeetOgressWarriors"); frame.addLine("[Time running]:", runTimer.toElapsedString()); frame.addLine("[Status]:", status); frame.addLine("", ""); frame.addLine("[Xp Gained]", experienceGained); frame.addLine("[Xp Per Hour]", rsFormat(getHourlyRate((int)experienceGained))); frame.addLine("", ""); frame.addLine("[Kills]:", (int)(experienceGained / xpPerKill)); frame.addLine("[Kills Per Hour]:", rsFormat(getHourlyRate(totalKills))); frame.addLine("", ""); frame.addLine("[Bones Collected]:", totalBones); frame.addLine("[Bones Per Hour]:", rsFormat(getHourlyRate(totalBones))); frame.addLine("", ""); frame.addLine("[Big Bones Banked]:", bigBonesInBank); frame.addLine("[Big Bones Evaluation]:", bigBonesInBank * 235); frame.draw(g, 0, 130, ctx); } }
  8. Hello everyone. I am releasing all of the custom scripts that I've made. They are probably not super great but they worked for me just messing around. Might be able to find some useful stuff I suppose. I am a java game developer and just took these on for fun. I don't really play anymore though so I thought I'd release it all for everyone else to hopefully get some use out of. If you want a custom script feel free to message me. I don't mind helping out where I can. This is just a basic script for cooking food. import com.epicbot.api.shared.APIContext; import com.epicbot.api.shared.GameType; import com.epicbot.api.shared.entity.*; import com.epicbot.api.shared.methods.IInventoryAPI; import com.epicbot.api.shared.model.Skill; 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 com.epicbot.api.shared.methods.*; import com.epicbot.api.shared.util.time.Timer; import java.awt.*; import static java.awt.event.KeyEvent.VK_SPACE; @ScriptManifest(name = "ELeetCooker", gameType = GameType.OS) public class ELeetCooker extends LoopScript { @Override public boolean onStart(String... strings) { return true; } private final Timer runTimer = new Timer(0); private String status = "Starting"; private Tile rangeArea = new Tile(3211, 3215, 0); private Tile bankArea = new Tile(3208, 3220, 2); private String uncookedType = "Raw tuna"; private String cookedType = "Tuna"; private double experienceGained, startExperience = 0; private Skill.Skills skill = Skill.Skills.COOKING; public IInventoryAPI inventory() { return getAPIContext().inventory(); } public ILocalPlayerAPI player() { return getAPIContext().localPlayer(); } public IBankAPI bank() { return getAPIContext().bank(); } public IMouseAPI mouse() { return getAPIContext().mouse(); } public IObjectsAPI objects() { return getAPIContext().objects(); } public INPCsAPI npcs() { return getAPIContext().npcs(); } public IWidgetsAPI widgets() { return getAPIContext().widgets(); } public IKeyboardAPI keyboard() { return getAPIContext().keyboard(); } public ISkillsAPI skills() { return getAPIContext().skills(); } public IWebWalkingAPI webWalking() { return getAPIContext().webWalking(); } public ICameraAPI camera() { return getAPIContext().camera(); } @Override protected int loop() { handleCalculations(); rotateCamera(); if(levelUpInterfacePresent()) { rotateCamera(); walkToBank(); rotateCamera(); openBank(); } if(shouldWalkToFurnace()) { walkToRange(); moveMouse(); rotateCamera(); if (isReadyToCook()) { clickRange(); rotateCamera(); moveMouse(); if (cookingInterfaceOpen()) { sendSpaceForFishSelection(); moveMouse(); rotateCamera(); } } } else { walkToBank(); rotateCamera(); moveMouse(); openBank(); moveMouse(); rotateCamera(); } return 60; } private boolean levelUpInterfacePresent() { boolean bool = false; if(widgets().get(233).isVisible()) { System.out.println("Found Level Up Interface"); bool = true; } return bool; } private void handleCalculations() { if (startExperience == 0) { startExperience = skills().get(skill).getExperience(); } else { experienceGained = skills().get(skill).getExperience() - startExperience; } } private void walkToBank() { status = "Walking to bank"; webWalking().walkTo(getBankTile()); } private void walkToRange() { if(player().getY() > 2310 && player().getPlane() == 0) { return; } status = "Walking to range"; webWalking().walkTo(getFurnaceTile()); } private void openBank() { status = "Opening bank"; GameEntity bank = objects().query().named("Bank Booth").results().nearest(); bank.interact("Bank"); doBanking(); } private void doBanking() { status = "Doing banking"; Time.sleep(getSleepTime()); WidgetChild bankAllButton = widgets().get(12).getChild(42); mouse().click(bankAllButton); Time.sleep(getShortSleepTime()); bank().withdrawAll(uncookedType); Time.sleep(getShortSleepTime()); bank().close(); } private void clickRange() { if(cookingInterfaceOpen()) { return; } status = "Clicking range"; GameEntity furnace = objects().query().named("Cooking range").results().nearest(); furnace.interact("Cook"); } private void sendSpaceForFishSelection() { if(!inventory().isFull()) { return; } keyboard().holdKey(VK_SPACE, getShortSleepTime()); while(inventory().contains(uncookedType) && !levelUpInterfacePresent()) { Time.sleep(); } } private boolean playerHasFoodToCook() { return inventory().contains(uncookedType); } public boolean shouldWalkToFurnace() { return inventory().contains(uncookedType) && inventory().isFull() && !inventory().contains(cookedType); } public boolean isReadyToCook() { return inventory().isFull() && inventory().contains(uncookedType) && player().getLocation().equals(rangeArea); } public boolean cookingInterfaceOpen() { boolean bool = false; if(widgets().get(270).getChild(5).isVisible()) { System.out.println("Found cooking interface open"); bool = true; } return bool; } public Tile getBankTile() { int x = bankArea.getX(); int y = bankArea.getY(); int randomness = 0; int randomX = Random.nextInt(x - randomness, x + randomness); int randomY = Random.nextInt(y - randomness, y + randomness); return new Tile(x, y, 2); } public Tile getFurnaceTile() { int x = rangeArea.getX(); int y = rangeArea.getY(); int randomness = 0; int randomX = Random.nextInt(x - randomness, x + randomness); int randomY = Random.nextInt(y - randomness, y + randomness); return new Tile(x, y); } public static int getSleepTime() { int SLEEP_MIN = 1750; int SLEEP_MAX = 3211; return Random.nextInt(SLEEP_MIN, SLEEP_MAX); } public static int getShortSleepTime() { int SLEEP_MIN = 250; int SLEEP_MAX = 400; return Random.nextInt(SLEEP_MIN, SLEEP_MAX); } public static int getAmountToTurnCamera() { return Random.nextInt(-1000, 1000); } private int getHourlyRate(int i) { return (int) (i / (runTimer.getElapsed() / 3600000.0D)); } public void moveMouse() { if(Random.nextInt(1, 10) < 3) { mouse().moveRandomly(); } } public void rotateCamera() { if(Random.nextInt(1, 10) > 2) { return; } int currentYaw = camera().getYaw(); camera().setYaw(currentYaw + getAmountToTurnCamera()); } private String rsFormat(Integer number) { String[] suffix = new String[]{"K", "M", "B", "T"}; int size = (number != 0) ? (int) Math.log10(number) : 0; if (size >= 3) { while (size % 3 != 0) { size = size - 1; } } return (size >= 3) ? +(Math.round((number / Math.pow(10, size)) * 10) / 10d) + suffix[(size / 3) - 1] : +number + ""; } @Override protected void onPaint(Graphics2D g, APIContext ctx) { PaintFrame frame = new PaintFrame("ELeetCooker"); frame.addLine("[Timer]:", runTimer.toElapsedString()); frame.addLine("[Status]:", status); frame.addLine("", ""); frame.addLine("[Xp Gained]:", rsFormat((int)experienceGained)); frame.addLine("[Xp Per Hour]:", rsFormat(getHourlyRate((int)experienceGained))); frame.draw(g, 0, 220, ctx); } }
  9. Hello everyone. I am releasing all of the custom scripts that I've made. They are probably not super great but they worked for me just messing around. Might be able to find some useful stuff I suppose. I am a java game developer and just took these on for fun. I don't really play anymore though so I thought I'd release it all for everyone else to hopefully get some use out of. If you want a custom script feel free to message me. I don't mind helping out where I can. This is just a basic script for Woodcutting/banking. Hope you can find it useful. *NOTE* I don't believe I ever got the random event to work. import com.epicbot.api.shared.APIContext; import com.epicbot.api.shared.GameType; import com.epicbot.api.shared.entity.GameEntity; import com.epicbot.api.shared.entity.NPC; import com.epicbot.api.shared.entity.WidgetChild; import com.epicbot.api.shared.methods.IInventoryAPI; import com.epicbot.api.shared.model.Skill; 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 com.epicbot.api.shared.methods.*; import com.epicbot.api.shared.util.time.Timer; import java.awt.*; @ScriptManifest(name = "ELeetWoodcutter", gameType = GameType.OS) public class eLeetWoodcutter extends LoopScript { @Override public boolean onStart(String... strings) { return true; } private int logsDropped = 0; private int logsBanked = 0; private double xpGained = 0.0; private static String status = "STARTING"; private final Timer runTimer = new Timer(0); private int logsInBank; private Tile bankArea = new Tile(2569,2864); private Tile treeArea = new Tile(2475,2888); private boolean scriptBanksLogs = true; private String logType = "Yew logs"; private String treeType = "Yew"; private double experienceGained, startExperience = 0; private double xpPerLog = 175.0; private int logsChopped = 0; public IInventoryAPI inventory() { return getAPIContext().inventory(); } public IWidgetsAPI widgets() { return getAPIContext().widgets(); } public IMouseAPI mouse() { return getAPIContext().mouse(); } public ILocalPlayerAPI player() { return getAPIContext().localPlayer(); } @Override protected int loop() { handleCalculations(); handleRandomEvent(); moveMouse(); Time.sleep(getShortSleepTime()); if(!player().isAnimating()) { if (inventory().isFull()) { if(!scriptBanksLogs) { dropLogs(); } else { walkToBank(); bankLogs(); } moveMouse(); } if(!APIContext.get().inventory().contains(logType)) { walkToTreeLocation(); } clickTree(); moveMouse(); Time.sleep(getShortSleepTime()); moveMouse(); rotateCamera(); } return 60; } public static int getSleepTime() { int sleepMin = 1500; int sleepMax = 3000; return Random.nextInt(sleepMin, sleepMax); } public static int getShortSleepTime() { int sleepMin = 750; int sleepMax = 1799; return Random.nextInt(sleepMin, sleepMax); } public static int getAmountToTurnCamera() { return Random.nextInt(-224, 779); } public void bankLogs() { status = "Banking Logs"; int amountInInventory = APIContext.get().inventory().getCount(logType); rotateCamera(); GameEntity bankBooth = APIContext.get().objects().query().named("Bank booth").results().nearest(); bankBooth.interact("Bank"); Time.sleep(getShortSleepTime()); clickBankAll(); logsInBank = APIContext.get().bank().getCount(logType); APIContext.get().bank().close(); logsBanked += amountInInventory; } public void dropLogs() { status = "Dropping Logs"; int amount = inventory().getCount(logType); logsDropped += amount; inventory().dropAll(logType); } public void clickTree() { status = "Chopping Logs"; rotateCamera(); GameEntity entity = APIContext.get().objects().query().named(treeType).distance(9.0).results().nearest(); //Checks to see if the entity to click is null. If its valid entity != null if(entity.isValid()) { entity.interact("Chop down"); } else { System.out.println("Couldn't find a tree to cut."); } moveMouse(); if (!widgets().isInterfaceOpen()) { xpGained += 67.5; } else { widgets().closeInterface(); rotateCamera(); } } public void moveMouse() { if(Random.nextInt(1, 35) < 3) { APIContext.get().mouse().moveRandomly(); } } public void rotateCamera() { if(Random.nextInt(1, 20) < 3) { return; } int currentYaw = APIContext.get().camera().getY(); APIContext.get().camera().setYaw(currentYaw + getAmountToTurnCamera()); } public void clickBankAll() { status = "Clicking Bank all"; APIContext.get().bank().open(); Time.sleep(getShortSleepTime()); WidgetChild bankAllButton = APIContext.get().widgets().get(12).getChild(42); mouse().click(bankAllButton); } public Tile getTreeAreaTile() { int areaX = treeArea.getX(); int areaY = treeArea.getY(); int randomness = 2; int randomX = Random.nextInt(areaX - randomness, areaX + randomness); int randomY = Random.nextInt(areaY - randomness, areaY + randomness); return new Tile(randomX, randomY); } public void toggleRunEnergy() { if(APIContext.get().walking().getRunEnergy() > 50 && !APIContext.get().walking().isRunEnabled()) { APIContext.get().walking().setRun(true); } } public void walkToBank() { status = "Walking to Bank"; toggleRunEnergy(); APIContext.get().webWalking().walkTo(bankArea); Time.sleep(getSleepTime()); } public void walkToTreeLocation() { status = "Walking to Tree Location"; toggleRunEnergy(); APIContext.get().webWalking().walkTo(getTreeAreaTile()); Time.sleep(getShortSleepTime()); } private void handleCalculations() { if (startExperience == 0) { startExperience = getAPIContext().skills().get(Skill.Skills.WOODCUTTING).getExperience(); } else { experienceGained = getAPIContext().skills().get(Skill.Skills.WOODCUTTING).getExperience() - startExperience; } logsChopped = (int)(experienceGained / xpPerLog); } public boolean handleRandomEvent() { NPC randomNpc = APIContext.get().npcs().query().interactingWithMe().results().nearest(); if(randomNpc == null || !randomNpc.getInteracting().hasAction("Dismiss")) { return false; } System.out.println("[Logging Handle Random Event Npc]" +randomNpc.getName()); if(randomNpc.isInteractingWithMe()) { status = "Handling Random Event Npc"; System.out.println("[Logging Handle Random Event Npc]" +randomNpc.getName()); if(randomNpc.getName().equals("Genie") && !APIContext.get().inventory().isFull()) { randomNpc.interact("Talk-to"); return true; } Time.sleep(getSleepTime()); if(randomNpc.getInteracting().hasAction("Dismiss")) { randomNpc.interact("Dismiss"); return true; } } return false; } private String rsFormat(Integer number) { String[] suffix = new String[]{"K", "M", "B", "T"}; int size = (number != 0) ? (int) Math.log10(number) : 0; if (size >= 3) { while (size % 3 != 0) { size = size - 1; } } return (size >= 3) ? +(Math.round((number / Math.pow(10, size)) * 10) / 10d) + suffix[(size / 3) - 1] : +number + ""; } private int getHourlyRate(int i) { return (int) (i / (runTimer.getElapsed() / 3600000.0D)); } @Override protected void onPaint(Graphics2D g, APIContext ctx) { PaintFrame scriptDetails = new PaintFrame("ELeetWoodcutter"); scriptDetails.addLine("[Timer]:", runTimer.toElapsedString()); scriptDetails.addLine("[Status]:", status); scriptDetails.addLine("", ""); scriptDetails.addLine("[Logs Per Hour]:", getHourlyRate(logsChopped)); scriptDetails.addLine("[Xp Per Hour]:", rsFormat(getHourlyRate((int)experienceGained))); scriptDetails.addLine("", ""); scriptDetails.addLine("[Xp Gained]:", experienceGained); scriptDetails.addLine("[Logs Chopped]:", logsChopped); if(!scriptBanksLogs) { scriptDetails.addLine("[Logs Dropped]:", logsDropped); } else { scriptDetails.addLine("[Logs Banked]:", logsBanked); } scriptDetails.addLine("[Logs In Bank]:", logsInBank); scriptDetails.addLine("", ""); scriptDetails.addLine("[Total Logs Evaluation]:", (logsInBank * 289) + "gp"); scriptDetails.draw(g, 0, 0, ctx); } }
  10. Hello everyone. I am releasing all of the custom scripts that I've made. They are probably not super great but they worked for me just messing around. Might be able to find some useful stuff I suppose. I am a java game developer and just took these on for fun. I don't really play anymore though so I thought I'd release it all for everyone else to hopefully get some use out of. If you want a custom script feel free to message me. I don't mind helping out where I can. This is just a basic script for fishing/banking. Hope you can find it useful. import com.epicbot.api.shared.APIContext; import com.epicbot.api.shared.GameType; import com.epicbot.api.shared.entity.*; import com.epicbot.api.shared.methods.IInventoryAPI; import com.epicbot.api.shared.model.Skill; 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 com.epicbot.api.shared.methods.*; import com.epicbot.api.shared.util.time.Timer; import java.awt.*; import static java.awt.event.KeyEvent.VK_SHIFT; @ScriptManifest(name = "ELeetFisher", gameType = GameType.OS) public class ELeetFisher extends LoopScript { @Override public boolean onStart(String... strings) { return true; } private final Timer runTimer = new Timer(0); private int fishDropped = 0; private int fishBanked = 0; private String status = "Starting"; private Tile fishArea = new Tile(2459, 2891); private Tile bankArea = new Tile(2569, 2864); private Tile fishArea2 = new Tile(2457, 2892); private boolean scriptBankFish = true; private String[] fishType = {"Raw tuna", "Raw swordfish"}; private double experienceGained, startExperience = 0; private Skill.Skills trainedSkill = Skill.Skills.FISHING; public IInventoryAPI inventory() { return getAPIContext().inventory(); } public IWidgetsAPI widgets() { return getAPIContext().widgets(); } public IMouseAPI mouse() { return getAPIContext().mouse(); } public ILocalPlayerAPI player() { return getAPIContext().localPlayer(); } public IBankAPI bank() { return getAPIContext().bank(); } public ITabsAPI tabs() { return getAPIContext().tabs(); } public IObjectsAPI objects() { return getAPIContext().objects(); } public INPCsAPI npcs() { return getAPIContext().npcs(); } public ISkillsAPI skills() { return getAPIContext().skills(); } @Override protected int loop() { handleCalculations(); if(!playerHasFishingSupplies()) { walkToBank(); bankFish(); } if(!player().isAnimating()) { if (inventory().isFull()) { if(!scriptBankFish) { rotateCamera(); shiftDropFish(); } else { walkToBank(); bankFish(); } rotateCamera(); moveMouse(); } for(int i = 0; i < fishType.length; i++) { if(!inventory().contains(fishType[i]) && playerHasFishingSupplies()) { walkToFishLocation(); } } rotateCamera(); if(!inventory().isFull() && playerHasFishingSupplies()) { takeABreak(); clickFishingSpot(); } moveMouse(); Time.sleep(getSleepTime()); moveMouse(); rotateCamera(); } return 3; } private void handleCalculations() { if (startExperience == 0) { startExperience = skills().get(trainedSkill).getExperience(); } else { experienceGained = skills().get(trainedSkill).getExperience() - startExperience; } } private void takeABreak() { if(Random.nextInt(1, 66) == 1) { status = "Taking a break"; Time.sleep(getLongSleepTime()); } } public static int getLongSleepTime() { int SLEEP_MIN = 175000; int SLEEP_MAX = 210000; return Random.nextInt(SLEEP_MIN, SLEEP_MAX); } public static int getSleepTime() { int SLEEP_MIN = 4222; int SLEEP_MAX = 7500; return Random.nextInt(SLEEP_MIN, SLEEP_MAX); } public static int getShortSleepTime() { int SLEEP_MIN = 460; int SLEEP_MAX = 950; return Random.nextInt(SLEEP_MIN, SLEEP_MAX); } public static int getAmountToTurnCamera() { return Random.nextInt(-1000, 1000); } public void bankFish() { status = "Banking Fish"; int amountInInventory = 0; for(int i = 0; i < fishType.length; i++) { amountInInventory += inventory().getCount(fishType[i]); } rotateCamera(); GameEntity bankBooth = objects().query().named("Bank booth").results().nearest(); bankBooth.interact("Bank"); Time.sleep(getShortSleepTime()); WidgetChild bankAllButton = widgets().get(12).getChild(42); mouse().click(bankAllButton); withdrawFishingSupplies(); fishBanked += amountInInventory; } public void withdrawFishingSupplies() { status = "Withdrawing fishing supplies"; Time.sleep(getShortSleepTime()); if(!bank().isOpen()) { bank().open(); } bank().withdraw(1, "Harpoon"); Time.sleep(getShortSleepTime()); APIContext.get().bank().close(); } public void dropFish() { status = "Dropping Fish"; int amount = 0; for(int i = 0; i < fishType.length; i++) { amount = inventory().getCount(fishType[i]); inventory().dropAll(fishType[i]); } fishDropped += amount; } public void clickFishingSpot() { status = "Fishing"; int fishSpotId2 = 7946; GameEntity entity = npcs().query().id(fishSpotId2).results().nearest(); entity.interact("Harpoon"); if(!tabs().isOpen(ITabsAPI.Tabs.INVENTORY)) { tabs().open(ITabsAPI.Tabs.INVENTORY); } Time.sleep(getShortSleepTime()); } private int getHourlyRate(int i) { return (int) (i / (runTimer.getElapsed() / 3600000.0D)); } public void moveMouse() { if(Random.nextInt(1, 10) < 3) { APIContext.get().mouse().moveRandomly(); } } public void rotateCamera() { if(Random.nextInt(1, 10) > 2) { return; } int currentYaw = APIContext.get().camera().getYaw(); APIContext.get().camera().setYaw(currentYaw + getAmountToTurnCamera()); } public Tile getFishAreaTile() { int x; int y; int randomness = 0; if(Random.nextInt(1,2) == 2) { x = fishArea2.getX(); y = fishArea2.getY(); } else { x = fishArea.getX(); y = fishArea.getY(); } int randomX = Random.nextInt(x - randomness, x + randomness); int randomY = Random.nextInt(y - randomness, y + randomness); return new Tile(randomX, randomY); } /*public void toggleRunEnergy() { if(APIContext.get().walking().getRunEnergy() > 50 && !APIContext.get().walking().isRunEnabled()) { APIContext.get().walking().setRun(true); } }*/ public void walkToFishLocation() { status = "Walking to Fish Location"; /*toggleRunEnergy();*/ APIContext.get().webWalking().walkTo(getFishAreaTile()); Time.sleep(getShortSleepTime()); } public void shiftDropFish() { int counter = 0; status = "Shift Dropping Items"; APIContext.get().keyboard().pressKey(VK_SHIFT); for(ItemWidget item : APIContext.get().inventory().getItems()) { if(!item.getName().contains("Raw")) { continue; } counter++; mouse().click(item); Time.sleep(137); } APIContext.get().keyboard().releaseKey(VK_SHIFT); moveMouse(); fishDropped += counter; } public void walkToBank() { status = "Walking to bank"; APIContext.get().webWalking().walkTo(getBankTile()); /*if(!APIContext.get().walking().isRunEnabled() && APIContext.get().walking().getRunEnergy() > 50) { APIContext.get().walking().setRun(true); }*/ Time.sleep(getShortSleepTime()); } public Tile getBankTile() { int x = bankArea.getX(); int y = bankArea.getY(); int randomness = 0; int randomX = Random.nextInt(x - randomness, x + randomness); int randomY = Random.nextInt(y - randomness, y + randomness); return new Tile(randomX, randomY); } private String rsFormat(Integer number) { String[] suffix = new String[]{"K", "M", "B", "T"}; int size = (number != 0) ? (int) Math.log10(number) : 0; if (size >= 3) { while (size % 3 != 0) { size = size - 1; } } return (size >= 3) ? +(Math.round((number / Math.pow(10, size)) * 10) / 10d) + suffix[(size / 3) - 1] : +number + ""; } public boolean playerHasFishingSupplies() { return inventory().contains("Harpoon"); } @Override protected void onPaint(Graphics2D g, APIContext ctx) { PaintFrame frame = new PaintFrame("ELeetFisher"); frame.addLine("[Timer]:", runTimer.toElapsedString()); frame.addLine("[Status]:", status); frame.addLine("[Xp Gained]:", rsFormat((int)experienceGained)); frame.addLine("[Fish Per Hour]:", getHourlyRate(fishBanked)); frame.addLine("[Xp Per Hour]:", rsFormat(getHourlyRate((int)experienceGained))); if(!scriptBankFish) { frame.addLine("[Fish Dropped]:", fishDropped); } else { frame.addLine("[Fish Banked]:", fishBanked); } frame.draw(g, 0, 220, ctx); } }
  11. Hello everyone. I am releasing all of the custom scripts that I've made. They are probably not super great but they worked for me just messing around. Might be able to find some useful stuff I suppose. I am a java game developer and just took these on for fun. I don't really play anymore though so I thought I'd release it all for everyone else to hopefully get some use out of. If you want a custom script feel free to message me. I don't mind helping out where I can. This is just a basic script for smelting bars. Hope you can find it useful. import com.epicbot.api.shared.APIContext; import com.epicbot.api.shared.GameType; import com.epicbot.api.shared.entity.*; import com.epicbot.api.shared.methods.IInventoryAPI; import com.epicbot.api.shared.model.Skill; 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 com.epicbot.api.shared.methods.*; import com.epicbot.api.shared.util.time.Timer; import misc.Misc; import java.awt.*; import static java.awt.event.KeyEvent.VK_3; import static java.awt.event.KeyEvent.VK_4; @ScriptManifest(name = "ELeetSmelter", gameType = GameType.OS) public class ELeetSmelter extends LoopScript { @Override public boolean onStart(String... strings) { return true; } private final Timer runTimer = new Timer(0); private String status = "Starting"; private Tile furnaceArea = new Tile(3274, 3186); private Tile bankArea = new Tile(3269, 3168); private boolean scriptBankFish = true; private String[] oreType = {"Iron ore", "Coal"}; private String barType = "Steel bar"; private int barsMade = 0; private double xpPerBar = 17.5; private double experienceGained, startExperience = 0; private Skill.Skills trainedSkill = Skill.Skills.SMITHING; public IInventoryAPI inventory() { return getAPIContext().inventory(); } public ILocalPlayerAPI player() { return getAPIContext().localPlayer(); } public IBankAPI bank() { return getAPIContext().bank(); } public IMouseAPI mouse() { return getAPIContext().mouse(); } public IWidgetsAPI widgets() { return getAPIContext().widgets(); } public IObjectsAPI objects() { return getAPIContext().objects(); } public IWebWalkingAPI webWalking() { return getAPIContext().webWalking(); } public IKeyboardAPI keyboard() { return getAPIContext().keyboard(); } public ICameraAPI camera() { return getAPIContext().camera(); } public ISkillsAPI skills() { return getAPIContext().skills(); } @Override protected int loop() { handleCalculations(); rotateCamera(); if(levelUpInterfacePresent()) { if(playerStillHasOresToSmelt()) { clickFurnace(); rotateCamera(); moveMouse(); if (smeltingInterfaceOpen()) { sendNumberForOreSelection(); moveMouse(); rotateCamera(); } } if(!playerStillHasOresToSmelt()) { rotateCamera(); walkToBank(); rotateCamera(); openBank(); } } if(shouldWalkToFurnace()) { walkToFurnace(); moveMouse(); rotateCamera(); if (isReadyToSmelt()) { clickFurnace(); rotateCamera(); moveMouse(); if (smeltingInterfaceOpen()) { sendNumberForOreSelection(); moveMouse(); rotateCamera(); } } } else { walkToBank(); rotateCamera(); moveMouse(); openBank(); moveMouse(); rotateCamera(); } return 60; } private boolean levelUpInterfacePresent() { boolean bool = false; if(widgets().get(233).isVisible()) { System.out.println("Found Level Up Interface"); bool = true; } return bool; } private void handleCalculations() { if (startExperience == 0) { startExperience = skills().get(trainedSkill).getExperience(); } else { experienceGained = skills().get(trainedSkill).getExperience() - startExperience; } } private void walkToBank() { status = "Walking to bank"; webWalking().walkTo(Misc.getRandomTile(bankArea, 1)); } private void walkToFurnace() { status = "Walking to furnace"; webWalking().walkTo(Misc.getRandomTile(furnaceArea, 0)); } private void openBank() { status = "Opening bank"; GameEntity bank = objects().query().named("Bank Booth").results().nearest(); bank.interact("Bank"); doBanking(); } private void doBanking() { status = "Doing banking"; Time.sleep(getSleepTime()); WidgetChild bankAllButton = widgets().get(12).getChild(42); mouse().click(bankAllButton); Time.sleep(getShortSleepTime()); bank().withdraw(9, oreType[0]); Time.sleep(getShortSleepTime()); bank().withdrawAll(oreType[1]); Time.sleep(getShortSleepTime()); bank().close(); } private void clickFurnace() { if(smeltingInterfaceOpen()) { return; } status = "Clicking furnace"; GameEntity furnace = objects().query().named("Furnace").results().nearest(); furnace.interact("Smelt"); } private void sendNumberForOreSelection() { if(!inventory().isFull()) { return; } keyboard().holdKey(VK_4, getShortSleepTime()); while(inventory().contains(oreType[0]) && inventory().contains(oreType[1]) && !levelUpInterfacePresent()) { Time.sleep(); } } public boolean shouldWalkToFurnace() { return inventory().contains(oreType[0]) && inventory().contains(oreType[1]) && inventory().isFull() && !inventory().contains(barType); } public boolean isReadyToSmelt() { return inventory().isFull() && inventory().contains(oreType[0]) && inventory().contains(oreType[1]) && player().getLocation().equals(furnaceArea); } public boolean playerStillHasOresToSmelt() { return inventory().getCount(oreType[0]) >= 1 && inventory().getCount(oreType[1]) >= 2; } public boolean smeltingInterfaceOpen() { boolean bool = false; if(widgets().get(270).getChild(1).isVisible()) { System.out.println("Found smelting interface open"); bool = true; } return bool; } public static int getSleepTime() { int SLEEP_MIN = 1750; int SLEEP_MAX = 3211; return Random.nextInt(SLEEP_MIN, SLEEP_MAX); } public static int getShortSleepTime() { int SLEEP_MIN = 250; int SLEEP_MAX = 400; return Random.nextInt(SLEEP_MIN, SLEEP_MAX); } public static int getAmountToTurnCamera() { return Random.nextInt(-1000, 1000); } private int getHourlyRate(int i) { return (int) (i / (runTimer.getElapsed() / 3600000.0D)); } public void moveMouse() { if(Random.nextInt(1, 22) < 3) { mouse().moveRandomly(); } } public void rotateCamera() { if(Random.nextInt(1, 15) < 2) { return; } int currentYaw = camera().getYaw(); camera().setYaw(currentYaw + getAmountToTurnCamera()); } private String rsFormat(Integer number) { String[] suffix = new String[]{"K", "M", "B", "T"}; int size = (number != 0) ? (int) Math.log10(number) : 0; if (size >= 3) { while (size % 3 != 0) { size = size - 1; } } return (size >= 3) ? +(Math.round((number / Math.pow(10, size)) * 10) / 10d) + suffix[(size / 3) - 1] : +number + ""; } @Override protected void onPaint(Graphics2D g, APIContext ctx) { PaintFrame frame = new PaintFrame("ELeetSmelter"); frame.addLine("[Timer]:", runTimer.toElapsedString()); frame.addLine("[Status]:", status); frame.addLine("", ""); frame.addLine("[Xp Gained]:", rsFormat((int)experienceGained)); frame.addLine("[Xp Per Hour]:", rsFormat(getHourlyRate((int)experienceGained))); frame.addLine("",""); frame.addLine("[Bars Made]:", rsFormat((int)(experienceGained/xpPerBar))); frame.addLine("[Bars Per Hour]:", rsFormat(getHourlyRate((int)(experienceGained/xpPerBar)))); frame.addLine("",""); frame.draw(g, 0, 220, ctx); } }
  12. Hello everyone. I am releasing all of the custom scripts that I've made. They are probably not super great but they worked for me just messing around. Might be able to find some useful stuff I suppose. I am a java game developer and just took these on for fun. I don't really play anymore though so I thought I'd release it all for everyone else to hopefully get some use out of. If you want a custom script feel free to message me. I don't mind helping out where I can. This is just a basic script for banking/firemaking (It sometimes bugs out a bit so you'll need to baby-sit this one) import com.epicbot.api.shared.APIContext; import com.epicbot.api.shared.GameType; import com.epicbot.api.shared.entity.*; import com.epicbot.api.shared.methods.IInventoryAPI; import com.epicbot.api.shared.model.Skill; 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.methods.*; import com.epicbot.api.shared.util.time.Time; import com.epicbot.api.shared.util.time.Timer; import javafx.scene.Scene; import java.awt.*; @ScriptManifest(name = "ELeetFiremaking", gameType = GameType.OS) public class ELeetFiremaking extends LoopScript { @Override public boolean onStart(String... strings) { return true; } private final Timer runTimer = new Timer(0); private String status = "Starting"; private double experienceGained, startExperience = 0; private Skill.Skills trainedSkill = Skill.Skills.FIREMAKING; private Tile fireArea = new Tile(3208,3428); private Tile fireArea2 = new Tile(3208,3429); private Tile bankArea = new Tile(3185,3436); private String logType = "Willow logs"; private String fireType = "Fire"; public IInventoryAPI inventory() { return getAPIContext().inventory(); } public IMouseAPI mouse() { return getAPIContext().mouse(); } public ILocalPlayerAPI player() { return getAPIContext().localPlayer(); } public IGroundItemsAPI groundItems() { return getAPIContext().groundItems(); } public IObjectsAPI objects() { return getAPIContext().objects(); } public IBankAPI bank() { return getAPIContext().bank(); } public IWidgetsAPI widgets() { return getAPIContext().widgets(); } public IWalkingAPI walking() { return getAPIContext().walking(); } public IWebWalkingAPI webWalking() { return getAPIContext().webWalking(); } public ICameraAPI camera() { return getAPIContext().camera(); } public ISkillsAPI skills() { return getAPIContext().skills(); } @Override protected int loop() { handleCalculations(); if(playerOutOfBounds()) { walkToFiremakingSpot(); } if(groundContainsFire()) { walkWest(); rotateCamera(); } if(!inventoryContainsLogs()) { moveMouseRandomly(); walkToBank(); rotateCamera(); openBank(); withdrawLogs(); } if(inventoryIsFull() && inventoryContainsTinderbox()) { walkToFiremakingSpot(); rotateCamera(); } if(!groundContainsFire()) { moveMouseRandomly(); lightFire(); rotateCamera2(); } return 3; } private void handleCalculations() { if (startExperience == 0) { startExperience = skills().get(trainedSkill).getExperience(); } else { experienceGained = skills().get(trainedSkill).getExperience() - startExperience; } } public static int getSleepTime() { int sleepMin = 1222; int sleepMax = 2662; return Random.nextInt(sleepMin, sleepMax); } public static int getShortSleepTime() { int sleepMin = 650; int sleepMax = 1448; return Random.nextInt(sleepMin, sleepMax); } public static int getAmountToTurnCamera() { return Random.nextInt(-1000, 1000); } public boolean groundContainsFire() { SceneObject fire = objects().query().named(fireType).located(player().getLocation()).results().nearest(); if(fire != null) { return true; } return false; } public boolean inventoryIsFull() { return inventory().isFull(); } public boolean inventoryContainsLogs() { boolean bool = false; for(ItemWidget item : inventory().getItems()) { if(item.getName().equals(logType)) { bool = true; } } return bool; } public boolean playerOutOfBounds() { boolean bool = false; if(player().getLocation().getY() <= 3427) { bool = true; } return bool; } public void walkWest() { SceneObject fire = objects().query().named("Fire").located(player().getLocation()).results().first(); if(!fire.isValid()) { return; } status = "Walking west"; Tile tileSouth = new Tile(player().getX() - 1, player().getY()); webWalking().walkTo(tileSouth); } public boolean inventoryContainsTinderbox() { return inventory().contains("Tinderbox"); } public void walkToFiremakingSpot() { status = "Walking to firemaking location"; webWalking().walkTo(getFireTile()); if(!walking().isRunEnabled() && walking().getRunEnergy() > 50) { walking().setRun(true); } } public void walkToBank() { status = "Walking to bank"; webWalking().walkTo(getBankTile()); if(!walking().isRunEnabled() && walking().getRunEnergy() > 50) { walking().setRun(true); } Time.sleep(getShortSleepTime()); } public Tile getFireTile() { int x; int y; int randomness = 0; if(Random.nextInt(1,2) == 1) { x = fireArea.getX(); y = fireArea.getY(); } else { x = fireArea2.getX(); y = fireArea2.getY(); } int randomX = Random.nextInt(x - randomness, x + randomness); int randomY = Random.nextInt(y - randomness, y + randomness); return new Tile(randomX, randomY); } public Tile getBankTile() { int x = bankArea.getX(); int y = bankArea.getY(); int randomness = 0; int randomX = Random.nextInt(x - randomness, x + randomness); int randomY = Random.nextInt(y - randomness, y + randomness); return new Tile(x, y); } public void rotateCamera() { if(Random.nextInt(1, 10) != 1) { return; } Time.sleep(getShortSleepTime()); int currentYaw = camera().getYaw(); camera().setYaw(currentYaw + getAmountToTurnCamera()); } public void rotateCamera2() { if(Random.nextInt(1, 25) != 1) { return; } Time.sleep(getShortSleepTime()); int currentYaw = camera().getYaw(); camera().setYaw(currentYaw + getAmountToTurnCamera()); } public void lightFire() { status = "Lighting fire"; ItemWidget tinderbox = inventory().getItem("Tinderbox"); mouse().click(tinderbox); Time.sleep(getShortSleepTime()); ItemWidget log = inventory().getItem(logType); mouse().click(log); Time.sleep(getShortSleepTime()); while(player().isAnimating() && !groundContainsFire()) { Time.sleep(); } } public void openBank() { status = "Opening bank"; GameEntity bank = objects().query().named("Bank booth").distance(5.0).results().nearest(); bank.interact("Bank"); Time.sleep(getSleepTime()); } public void withdrawLogs() { status = "Withdrawing logs"; bank().withdraw(27, logType); Time.sleep(getShortSleepTime()); if(!inventoryContainsTinderbox()) { bank().withdraw(1, "Tinderbox"); Time.sleep(getShortSleepTime()); } } public void clickBankAll() { status = "Clicking Bank all"; bank().open(); Time.sleep(getShortSleepTime()); WidgetChild bankAllButton = widgets().get(12).getChild(42); mouse().click(bankAllButton); } public void moveMouseRandomly() { if(Random.nextInt(1, 500) == 2) { mouse().moveRandomly(); } } private String rsFormat(Integer number) { String[] suffix = new String[]{"K", "M", "B", "T"}; int size = (number != 0) ? (int) Math.log10(number) : 0; if (size >= 3) { while (size % 3 != 0) { size = size - 1; } } return (size >= 3) ? +(Math.round((number / Math.pow(10, size)) * 10) / 10d) + suffix[(size / 3) - 1] : +number + ""; } private int getHourlyRate(int i) { return (int) (i / (runTimer.getElapsed() / 3600000.0D)); } @Override protected void onPaint(Graphics2D g, APIContext ctx) { PaintFrame frame = new PaintFrame("ELeetFiremaking"); frame.addLine("[Time running]:", runTimer.toElapsedString()); frame.addLine("[Status]:", status); frame.addLine("", ""); frame.addLine("[Xp Gained]:", experienceGained); frame.addLine("[Xp Per Hour]:", rsFormat(getHourlyRate((int)experienceGained))); frame.draw(g, 0, 155, ctx); } }
  13. Hello everyone. I am releasing all of the custom scripts that I've made. They are probably not super great but they worked for me just messing around. Might be able to find some useful stuff I suppose. I am a java game developer and just took these on for fun. I don't really play anymore though so I thought I'd release it all for everyone else to hopefully get some use out of. If you want a custom script feel free to message me. I don't mind helping out where I can. This is just a basic script for banking/burying bones. import com.epicbot.api.shared.APIContext; import com.epicbot.api.shared.GameType; import com.epicbot.api.shared.entity.GameEntity; import com.epicbot.api.shared.entity.ItemWidget; import com.epicbot.api.shared.entity.WidgetChild; import com.epicbot.api.shared.methods.*; import com.epicbot.api.shared.model.Skill; 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 com.epicbot.api.shared.util.time.Timer; import java.awt.*; @ScriptManifest(name = "ELeetBoneBurier", gameType = GameType.OS) public class ELeetBoneBurier extends LoopScript { @Override public boolean onStart(String... strings) { return true; } private int bonesBuried = 0; private double xpGained = 0.0; private static String status = "STARTING"; private final Timer runTimer = new Timer(0); private String boneType = "Big bones"; private Skill.Skills skill = Skill.Skills.PRAYER; private double experienceGained, startExperience = 0; private double xpPerBone = 15.0; public IInventoryAPI inventory() { return getAPIContext().inventory(); } public IWidgetsAPI widgets() { return getAPIContext().widgets(); } public IMouseAPI mouse() { return getAPIContext().mouse(); } public ILocalPlayerAPI player() { return getAPIContext().localPlayer(); } public IObjectsAPI objects() { return getAPIContext().objects(); } public ICameraAPI camera() { return getAPIContext().camera(); } public IBankAPI bank() { return getAPIContext().bank(); } @Override protected int loop() { handleCalculations(); if(!playerInventoryContainsBones()) { openBank(); withdrawBones(); } else { buryBones(); } return 60; } public static int getSleepTime() { int sleepMin = 1000; int sleepMax = 2250; return Random.nextInt(sleepMin, sleepMax); } public static int getShortSleepTime() { int sleepMin = 445; int sleepMax = 887; return Random.nextInt(sleepMin, sleepMax); } public static int getAmountToTurnCamera() { return Random.nextInt(-224, 779); } public void buryBones() { if(bank().isOpen()) { bank().close(); Time.sleep(getShortSleepTime()); } status = "Burying Bones"; rotateCamera(); ItemWidget bone = inventory().getItem(boneType); if(bone.isValid()) { bone.interact("Bury"); } Time.sleep(getShortSleepTime()); moveMouse(); } public void openBank() { if(player().isMoving()) { Time.sleep(getShortSleepTime()); return; } status = "Opening bank"; GameEntity bank = objects().query().named("Bank booth").results().nearest(); if(bank.isValid()) { bank.interact("Bank"); } Time.sleep(getShortSleepTime()); } private void withdrawBones() { bank().withdraw(28, boneType); Time.sleep(getShortSleepTime()); bank().close(); } public void clickBankAll() { status = "Clicking Bank all"; bank().open(); Time.sleep(getShortSleepTime()); WidgetChild bankAllButton = widgets().get(12).getChild(42); mouse().click(bankAllButton); } private boolean playerInventoryContainsBones() { boolean bool = false; if(inventory().contains(boneType)) { bool = true; } return bool; } public void rotateCamera() { if(Random.nextInt(1, 50) < 3) { int currentYaw = camera().getY(); camera().setYaw(currentYaw + getAmountToTurnCamera()); } } public void moveMouse() { if(Random.nextInt(1, 35) < 3) { mouse().moveRandomly(); } } private String rsFormat(Integer number) { String[] suffix = new String[]{"K", "M", "B", "T"}; int size = (number != 0) ? (int) Math.log10(number) : 0; if (size >= 3) { while (size % 3 != 0) { size = size - 1; } } return (size >= 3) ? +(Math.round((number / Math.pow(10, size)) * 10) / 10d) + suffix[(size / 3) - 1] : +number + ""; } private int getHourlyRate(int i) { return (int) (i / (runTimer.getElapsed() / 3600000.0D)); } private void handleCalculations() { if (startExperience == 0) { startExperience = getAPIContext().skills().get(skill).getExperience(); } else { experienceGained = getAPIContext().skills().get(skill).getExperience() - startExperience; } bonesBuried = (int)(experienceGained / xpPerBone); } @Override protected void onPaint(Graphics2D g, APIContext ctx) { PaintFrame scriptDetails = new PaintFrame("ELeetBoneBurier"); scriptDetails.addLine("[Timer]:", runTimer.toElapsedString()); scriptDetails.addLine("[Status]:", status); scriptDetails.addLine("", ""); scriptDetails.addLine("[Bones Buried]", bonesBuried); scriptDetails.addLine("[Xp Per Hour]", rsFormat(getHourlyRate((int)experienceGained))); scriptDetails.draw(g, 0, 0, ctx); } }
×
×
  • Create New...