pekkseleii 0 Posted March 20, 2023 Would you like to see shit? Look no further... Thought I would train mining... mining gems so I tried and failed. Anyway this shit works but is not the best one (5- 10 minutes to get it run from scratch). Ran it around 30 minutes the xp and profit was not there. So the "code" is what it is... Instead went and created ironpowerminer ~50k/ hour xp. Pl0x rate my shit. Quote public class TestScript extends AbstractScript { String action = "IDLE"; int inventory_space = Inventory.getEmptySlots(); int gem_id = -1; int cut_id = -1; int m_start_xp = Skill.MINING.getExperience(); int c_start_xp = Skill.CRAFTING.getExperience(); int f_start_xp = Skill.CRAFTING.getExperience(); long timeBegan = System.currentTimeMillis(); @Override public int onLoop() { // rocks = 11380 AND 11381 //Logger.log("action => " + this.action); //Logger.log("gem id => " + this.gem_id); long m_xp_delta = Skill.MINING.getExperience() - this.m_start_xp; long c_xp_delta = Skill.CRAFTING.getExperience() - this.c_start_xp; long f_xp_delta = Skill.CRAFTING.getExperience() - this.f_start_xp; int m_xphour = (int)(m_xp_delta / ((System.currentTimeMillis() - timeBegan) / 3600000.0D)); int c_xphour = (int)(c_xp_delta / ((System.currentTimeMillis() - timeBegan) / 3600000.0D)); int f_xphour = (int)(f_xp_delta / ((System.currentTimeMillis() - timeBegan) / 3600000.0D)); Logger.log(m_xphour +" : " + c_xphour +" : "+ f_xphour); if (this.action == "IDLE" && Inventory.contains(1633)) { Inventory.dropAll(1633, 1627, 1611); } if (this.action == "IDLE") { this.cut_id = -1; this.gem_id = -1; } if (Inventory.isItemSelected()) { Inventory.deselect(); } GameObject rock = GameObjects.closest(11380, 11381); if (this.cut_id != -1) { if (!Inventory.contains(this.cut_id)) { this.cut_id = -1; this.action = "IDLE"; } else { return 100; } } if (this.gem_id != -1) { if (!Inventory.contains(this.gem_id)) { this.gem_id = -1; this.action = "IDLE"; } else { return 100; } } if (rock != null && this.action == "IDLE" && !Inventory.isFull()) { rock.interact(); this.action = "MINING"; this.inventory_space = Inventory.getEmptySlots(); return 100; } if (Inventory.isFull() || rock == null) { this.action = "CUTTING"; } if (this.action == "MINING") { int i_space = Inventory.getEmptySlots(); if (i_space < this.inventory_space) { this.action = "IDLE"; this.inventory_space = i_space; return 100; } } if (this.action == "CUTTING" && this.gem_id == -1) { // 1625, 1623, 1627, 1629, 1619, 1617, 1621 if (Inventory.contains(1625)) this.gem_id = 1625; // if (Inventory.contains(1627)) this.gem_id = 1627;1611 if (Inventory.contains(1623)) this.gem_id = 1623; if (Inventory.contains(1629)) this.gem_id = 1629; if (Inventory.contains(1619)) this.gem_id = 1619; if (Inventory.contains(1617)) this.gem_id = 1617; if (Inventory.contains(1621)) this.gem_id = 1621; } if (Inventory.isFull() || this.gem_id == -1 && this.action == "CUTTING") { this.action = "TIPPING"; // 1609, 1607, 1613, 1611, 1603, 1601, 1605 if (Inventory.contains(1609)) this.cut_id = 1609; if (Inventory.contains(1607)) this.cut_id = 1607; if (Inventory.contains(1613)) this.cut_id = 1613; // if (Inventory.contains(1611)) this.cut_id = 1611; if (Inventory.contains(1603)) this.cut_id = 1603; if (Inventory.contains(1601)) this.cut_id = 1601; if (Inventory.contains(1605)) this.cut_id = 1605; } if (Inventory.contains(this.cut_id)) { Inventory.use(1755); Sleep.sleep(250); Inventory.use(this.cut_id); Sleep.sleep(1000); Keyboard.type(" "); return 100; } if (Inventory.contains(this.gem_id)) { Inventory.use(1755); Sleep.sleep(250); Inventory.use(this.gem_id); Sleep.sleep(1000); Keyboard.type(" "); return 100; } return 100; } }
Recommended Posts
Archived
This topic is now archived and is closed to further replies.