RSboTTER9 0 Share Posted May 28, 2020 Hello everyone, need some help for starters. I am very familiar with Java, as I am a programmer myself. However, I wanted to know why my script doesn't walk back to the Lumbridge tree location? It just keeps depositing? Am I missing anything? as I have a walk back to location parameter. Any help is appreciated. import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.*; import org.dreambot.api.methods.container.impl.bank.BankLocation; import org.dreambot.api.methods.map.Tile; //import org.dreambot.api.methods.Calculations; import org.dreambot.api.script.AbstractScript; import org.dreambot.api.script.ScriptManifest; import org.dreambot.api.wrappers.interactive.GameObject; import org.dreambot.api.script.Category; //logs ID = 1511 @ScriptManifest(author = "CENSOR", name = "Tree Chopper", version = 1.0, description = "Chops Only Regular Tree", category = Category.WOODCUTTING) public class main extends AbstractScript { public void onStart() { log("WoodChopper"); } public void onExit() { } public static final Tile TreeLocation = new Tile(9752,7231); @Override public int onLoop() { GameObject Oak_tree = getGameObjects().closest("Tree"); if(!getLocalPlayer().isAnimating() && !getLocalPlayer().isMoving() ) { if(getInventory().isFull()){ getBank().open(BankLocation.LUMBRIDGE); getBank().depositAllExcept("Bronze Axe"); getBank().depositAllExcept("Iron Axe"); getBank().depositAllExcept("Steel Axe"); getBank().depositAllExcept("Black Axe"); getBank().depositAllExcept("Mithril Axe"); getBank().depositAllExcept("Adamant Axe"); getBank().depositAllExcept("Rune Axe"); getBank().depositAllExcept("Dragon Axe"); } else { if(Oak_tree != null) { getWalking().walk(TreeLocation); Oak_tree.interact("Chop Down"); } } } return 1000; } } Link to comment Share on other sites More sharing options...
Pandemic 2803 Share Posted May 29, 2020 When you're depositing into the bank, you're actually making the client deposit 8 times (once for each depositAllExcept call). You'd want to combine that into one, something like: getBank().depositAllExcept(item -> item.getName().contains("axe")); Link to comment Share on other sites More sharing options...
RSboTTER9 0 Author Share Posted May 29, 2020 5 minutes ago, Pandemic said: When you're depositing into the bank, you're actually making the client deposit 8 times (once for each depositAllExcept call). You'd want to combine that into one, something like: getBank().depositAllExcept(item -> item.getName().contains("axe")); Gotcha, Thanks!! I didn't know they detected that for one word "axe". As, for exiting the lumbridge castle, and going down stairs, how can I enable that? Many thanks for the tip! Link to comment Share on other sites More sharing options...
Pandemic 2803 Share Posted May 29, 2020 12 minutes ago, RSboTTER9 said: Gotcha, Thanks!! I didn't know they detected that for one word "axe". As, for exiting the lumbridge castle, and going down stairs, how can I enable that? The tree location tile you're trying to walk to looks wrong to me, go back to that tree and try to get the correct one Link to comment Share on other sites More sharing options...
RSboTTER9 0 Author Share Posted May 29, 2020 11 hours ago, Pandemic said: The tree location tile you're trying to walk to looks wrong to me, go back to that tree and try to get the correct one Thank you good sir! It works perfect now! Mind removing my screenshot, please? I forgot to censor my game name.. (although its a throw away account lol) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.