justanotherkid Posted April 22, 2016 Share Posted April 22, 2016 (edited) jak's Free Gold Amulet (u) Crafter 33k Crafting Exp/hr ~80k+ Profit/hr F2P Features: Start from any location (Uses webwalking) Will log out when you run out of gold bars in the bank Requirements: Lv8 Crafting Amulet mould and Gold bars (have required items in inventory or bank) Progress Reports Download Link If you'd like to show your appreciation, a proggy would be nice http://www.mediafire.com/download/lmw047jaet804bf/30crafting.jar [OPENSOURCE] import java.awt.Color; import java.awt.Font; import java.awt.Graphics2D; import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.api.ui.Skill; import org.osbot.rs07.event.WalkingEvent; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.Condition; import org.osbot.rs07.utility.ConditionalSleep; @ScriptManifest(author = "justanotherkid", info = "", name = "Gold Amulet Crafter", version = 1.0, logo = "") public class main extends Script { long totalgold; String state; long startTime; Area alkharid = new Area(new Position[] { new Position(3274,3188,0), new Position(3284,3188,0), new Position(3285,3179,0), new Position(3280,3179,0), new Position(3280,3165,0), new Position(3280,3164,0), new Position(3279,3163,0), new Position(3269,3165,0), new Position(3269,3178,0), new Position(3276,3178,0), new Position(3276,3183,0), new Position(3274,3184,0),}); Position[] path2bank = new Position[] { new Position(3274,3186,0), new Position(3278,3179,0), new Position(3273,3167,0), new Position(3269,3167,0),}; Position bank = new Position (3269,3167,0); Position furnace = new Position (3274,3186,0); Position[] path2furnace = new Position[] { new Position(3272,3167,0), new Position(3275,3174,0), new Position(3279,3181,0), new Position(3274,3186,0),}; @Override public void onStart() { startTime = System.currentTimeMillis(); for(Skill skill : new Skill[]{Skill.CRAFTING}) { getExperienceTracker().start(skill); } } private enum State { BANKAMULETS,MAKEAMULETS,IDLE,WALK2ALKHARID } private State getState() { if(getSkills().getDynamic(Skill.CRAFTING) >= 8 && !alkharid.contains(myPlayer())) { return State.WALK2ALKHARID; } if(getSkills().getDynamic(Skill.CRAFTING) >= 8 && alkharid.contains(myPlayer()) && !getInventory().contains("Amulet mould") || !getInventory().contains("Gold bar")) { return State.BANKAMULETS; } if(getSkills().getDynamic(Skill.CRAFTING) >= 8 && alkharid.contains(myPlayer()) && getInventory().contains("Amulet mould", "Gold bar")) { return State.MAKEAMULETS; } return State.IDLE; } @Override public int onLoop() throws InterruptedException { WalkingEvent walkingEvent1 = new WalkingEvent(bank); walkingEvent1.setBreakCondition(new Condition() { @Override public boolean evaluate() { return bank.distance(myPosition()) <= 6; } }); WalkingEvent walkingEvent2 = new WalkingEvent(furnace); walkingEvent2.setBreakCondition(new Condition() { @Override public boolean evaluate() { return furnace.distance(myPosition()) <= 4; } }); switch(getState()) { case WALK2ALKHARID: state = "Walking To Alkharid"; getWalking().webWalk(alkharid); break; case BANKAMULETS: state = "Walking To The Bank"; execute(walkingEvent1); state = "Banking"; getObjects().closest("Bank booth").interact("Bank"); new ConditionalSleep(2500) { @Override public boolean condition() throws InterruptedException { return getBank().isOpen(); } }.sleep(); sleep(random(300,600)); if(getBank().isOpen()) { totalgold = getInventory().getAmount("Gold bar") + getBank().getAmount("Gold bar"); if(totalgold < 1) { getBank().close(); sleep(random(75,150)); getLogoutTab().open(); sleep(random(75,150)); getLogoutTab().logOut(); stop(); } getBank().depositAllExcept("Amulet mould"); sleep(random(100,200)); if(!getInventory().contains("Amulet mould")) { getBank().withdraw("Amulet mould", 1); sleep(random(100,200)); } getBank().withdrawAll("Gold bar"); sleep(random(100,200)); getBank().close(); } break; case MAKEAMULETS: state = "Walking To The Furnace"; execute(walkingEvent2); state = "Crafting Amulets"; if(getWidgets().isVisible(446, 32)) { getWidgets().interact(446,32,"Make-X"); sleep(random(1200,2100)); long amount = getInventory().getAmount("Gold bar"); String amount1 = String.valueOf(amount); getKeyboard().typeString(amount1, true); sleep(random(1000,2300)); new ConditionalSleep(50000) { @Override public boolean condition() throws InterruptedException { return !getInventory().contains("Gold bar") || getDialogues().inDialogue(); } }.sleep(); } else { Entity furnace = objects.closest("Furnace"); getInventory().interact("Use", "Gold bar"); sleep(random(150,300)); furnace.interact("Use"); new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return getWidgets().isVisible(446, 32); } }.sleep(); sleep(random(300,900)); } break; case IDLE: state = "You do not have lv8 Crafting!"; break; } return random(300,600); } @Override public void onExit() { } @Override public void onPaint(Graphics2D g) { long ss = (System.currentTimeMillis() - startTime) / 1000; long mm = ss / 60; long hh = mm / 60; Font font = new Font("Sans-Serif", Font.BOLD, 14); g.setColor(Color.BLACK); g.setFont(font); g.drawString("EXP Gained: " + getExperienceTracker().getGainedXP(Skill.CRAFTING) + " (" + getExperienceTracker().getGainedXPPerHour(Skill.CRAFTING) + ")", 8, 333); g.drawString("Run time: " + hh + "h" + ":" + mm%60 + "m" + ":" + ss%60 + "s" , 8, 318); g.drawString("Status: " + state, 8, 303); } } Edited April 25, 2016 by justanotherkid 2 Quote Link to comment Share on other sites More sharing options...
solvingpi Posted April 22, 2016 Share Posted April 22, 2016 Well done on the release! Quote Link to comment Share on other sites More sharing options...
The Hero of Time Posted April 22, 2016 Share Posted April 22, 2016 Quote Link to comment Share on other sites More sharing options...
Czar Posted April 23, 2016 Share Posted April 23, 2016 (edited) edit: Fixed: Edited April 23, 2016 by Czar Quote Link to comment Share on other sites More sharing options...
helphelp Posted April 23, 2016 Share Posted April 23, 2016 Nice script. Quote Link to comment Share on other sites More sharing options...
justanotherkid Posted April 23, 2016 Author Share Posted April 23, 2016 thx czar for fixing my pic Quote Link to comment Share on other sites More sharing options...
scaoj Posted April 24, 2016 Share Posted April 24, 2016 This looks great, i'll try it later and post results Quote Link to comment Share on other sites More sharing options...
Czar Posted April 24, 2016 Share Posted April 24, 2016 Open source is always great, kudos for sharing the script source, should prove to be useful to new scripters Quote Link to comment Share on other sites More sharing options...
justanotherkid Posted April 24, 2016 Author Share Posted April 24, 2016 has no one used it? Quote Link to comment Share on other sites More sharing options...
Lahney Posted April 24, 2016 Share Posted April 24, 2016 (edited) Here ya go! Nice two hourish progress report. In 2 hours and 20 minutes I got 77k xp at (33.1k an hour) It crafts about 1100 amulets an hour Edited April 24, 2016 by Lahney Quote Link to comment Share on other sites More sharing options...
Lahney Posted April 25, 2016 Share Posted April 25, 2016 Heres another progress report I managed to save for you Quote Link to comment Share on other sites More sharing options...
justanotherkid Posted April 25, 2016 Author Share Posted April 25, 2016 Heres another progress report I managed to save for you thanks 1 Quote Link to comment Share on other sites More sharing options...
semanji Posted May 8, 2016 Share Posted May 8, 2016 Broken at the moment. Use widget 446, 34 instead of 446,32 =] Quote Link to comment Share on other sites More sharing options...
JouxRS Posted May 8, 2016 Share Posted May 8, 2016 80k/hour is decent F2P, I'm surprised not more people are interested in this. Does anyone know if there is a trade limit on gold amulets / gold bars? Quote Link to comment Share on other sites More sharing options...
amkate2 Posted May 20, 2016 Share Posted May 20, 2016 ya it not working it go smith and click on bar to smith then dont makes the amulets Quote Link to comment Share on other sites More sharing options...