LANCER 31 Posted February 25, 2015 maybe get 10k feathers ever hour, 3gp each only 30k an hour and thats not even if the prices drop from the ge (most likely will)
mattjewww 1 Author Posted February 25, 2015 I can write you one if I find time tonight Please do. Thanks!
Fran 99 Posted February 25, 2015 Please do. Thanks! Hi Matt, I wrote it (its simply loots feathers), haven't tested it as I am at work, please let me know if it works as expected Note: You will have to save it & run as Local import org.dreambot.api.methods.Calculations; import org.dreambot.api.script.AbstractScript; import org.dreambot.api.script.Category; import org.dreambot.api.script.ScriptManifest; import org.dreambot.api.wrappers.interactive.Player; import org.dreambot.api.wrappers.items.GroundItem; @ScriptManifest(author = "Franjey", category = Category.MONEYMAKING, name = "Feather Looter", version = 0.1, description = "Loots Feathers") public class featherLooter extends AbstractScript { private State state = null; private enum State{ LOOT, SLEEP } private State getState(){ if(getLocalPlayer().isInCombat()){ return State.SLEEP; } else{ GroundItem gi = getGroundItems().getClosest("Feather"); return State.LOOT; } } @Override public void onStart(){ log("Time to loot feathers!"); } public void onExit() { log("Ending script"); } @Override public int onLoop() { Player myPlayer = getPlayers().myPlayer(); if(!getWalking().isRunEnabled() && getWalking().getRunEnergy() > Calculations.random(30,50)){ getWalking().toggleRun(); } getDialogues().clickContinue(); state = getState(); switch(state){ case LOOT: GroundItem feather = getGroundItems().getClosest("Feather"); if(feather != null){ if(feather.isOnScreen()){ feather.interact("Take"); sleep(900,1200); } else{ getWalking().walk(feather.getTile()); } } break; case SLEEP: sleep(200,400); break; } return Calculations.random(300, 600); } }
Vlad 216 Posted February 25, 2015 Hi Matt, I wrote it (its simply loots feathers), haven't tested it as I am at work, please let me know if it works as expected Note: You will have to save it & run as Local import org.dreambot.api.methods.Calculations; import org.dreambot.api.script.AbstractScript; import org.dreambot.api.script.Category; import org.dreambot.api.script.ScriptManifest; import org.dreambot.api.wrappers.interactive.Player; import org.dreambot.api.wrappers.items.GroundItem; @ScriptManifest(author = "Franjey", category = Category.MONEYMAKING, name = "Feather Looter", version = 0.1, description = "Loots Feathers") public class featherLooter extends AbstractScript { private State state = null; private enum State{ LOOT, SLEEP } private State getState(){ if(getLocalPlayer().isInCombat()){ return State.SLEEP; } else{ GroundItem gi = getGroundItems().getClosest("Feather"); return State.LOOT; } } @Override public void onStart(){ log("Time to loot feathers!"); } public void onExit() { log("Ending script"); } @Override public int onLoop() { Player myPlayer = getPlayers().myPlayer(); if(!getWalking().isRunEnabled() && getWalking().getRunEnergy() > Calculations.random(30,50)){ getWalking().toggleRun(); } getDialogues().clickContinue(); state = getState(); switch(state){ case LOOT: GroundItem feather = getGroundItems().getClosest("Feather"); if(feather != null){ if(feather.isOnScreen()){ feather.interact("Take"); sleep(900,1200); } else{ getWalking().walk(feather.getTile()); } } break; case SLEEP: sleep(200,400); break; } return Calculations.random(300, 600); } } What are the click continue and myPlayer lines for? You are wasting resources by leaving those unnecessary things in your script. You are also doing GroundItem feather = getGroundItems().getClosest("Feather"); twice. Sure, in a small script it doesn't make a big difference but if you continue this habit and make bigger scripts it will add up and your scripts will be more resource hungry than others. Also IMO you don't even need to use states for this. You only really need the following in you onLoop(): GroundItem feather = getGroundItems().getClosest("Feather"); if(feather != null){ if(feather.isOnScreen()){ feather.interact("Take"); sleep(900,1200); }else{ getWalking().walk(feather); } and getWalking().setRunThreshold(Calculations.random(30,50)); in your onStart() for this script.
mattjewww 1 Author Posted February 25, 2015 Hi Matt, I wrote it (its simply loots feathers), haven't tested it as I am at work, please let me know if it works as expected Note: You will have to save it & run as Local import org.dreambot.api.methods.Calculations; import org.dreambot.api.script.AbstractScript; import org.dreambot.api.script.Category; import org.dreambot.api.script.ScriptManifest; import org.dreambot.api.wrappers.interactive.Player; import org.dreambot.api.wrappers.items.GroundItem; @ScriptManifest(author = "Franjey", category = Category.MONEYMAKING, name = "Feather Looter", version = 0.1, description = "Loots Feathers") public class featherLooter extends AbstractScript { private State state = null; private enum State{ LOOT, SLEEP } private State getState(){ if(getLocalPlayer().isInCombat()){ return State.SLEEP; } else{ GroundItem gi = getGroundItems().getClosest("Feather"); return State.LOOT; } } @Override public void onStart(){ log("Time to loot feathers!"); } public void onExit() { log("Ending script"); } @Override public int onLoop() { Player myPlayer = getPlayers().myPlayer(); if(!getWalking().isRunEnabled() && getWalking().getRunEnergy() > Calculations.random(30,50)){ getWalking().toggleRun(); } getDialogues().clickContinue(); state = getState(); switch(state){ case LOOT: GroundItem feather = getGroundItems().getClosest("Feather"); if(feather != null){ if(feather.isOnScreen()){ feather.interact("Take"); sleep(900,1200); } else{ getWalking().walk(feather.getTile()); } } break; case SLEEP: sleep(200,400); break; } return Calculations.random(300, 600); } } I'm new to this. How do I get it onto my client? Appreciate your help dearly, Franjey.
Fran 99 Posted February 25, 2015 What are the click continue and myPlayer lines for? You are wasting resources by leaving those unnecessary things in your script. You are also doing GroundItem feather = getGroundItems().getClosest("Feather"); twice. Sure, in a small script it doesn't make a big difference but if you continue this habit and make bigger scripts it will add up and your scripts will be more resource hungry than others. Also IMO you don't even need to use states for this. You only really need the following in you onLoop(): GroundItem feather = getGroundItems().getClosest("Feather"); if(feather != null){ if(feather.isOnScreen()){ feather.interact("Take"); sleep(900,1200); }else{ getWalking().walk(feather); } and getWalking().setRunThreshold(Calculations.random(30,50)); in your onStart() for this script. Click Continue is to handle dialogue boxes (in case any random appears that involves dialogues). Declared myPlayer in case I need to use it but I could just remove. As for the getWalking().set... it works properly Btw, I am still in the learning stage I'm new to this. How do I get it onto my client? Appreciate your help dearly, Franjey. Hey Matt, to add this script you can try perhaps copying this into a notepad, changing the extension to .java and then saving it in the bot client -> Scripts If you have any doubts, please dont hesitate to ask, I will be glad to help
Vlad 216 Posted February 25, 2015 I CBF waiting 24+ hours for such a shitty script upload so: .jar Link: https://hostr.co/6JDyjsS6SpQE Paste it at C:\Users\YourUsernameHere\DreamBot\Scripts\ EDIT: Click Continue is to handle dialogue boxes (in case any random appears that involves dialogues). Declared myPlayer in case I need to use it but I could just remove. As for the getWalking().set... it works properly Btw, I am still in the learning stage Hey Matt, to add this script you can try perhaps copying this into a notepad, changing the extension to .java and then saving it in the bot client -> Scripts If you have any doubts, please dont hesitate to ask, I will be glad to help When you're looting feathers you can't get dialogue since DreamBot doesn't do randoms. Also what you said above will not work. DreamBot will only read .jar files. You will need to save the code as "featherLooter.java" and then Google how to make .java files into a .jar file.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.