lolnyancats 0 Share Posted March 18, 2019 here is the code i have so far, it chops the trees and when the inventory is full, it runs to the bank, deposits it, then sits there. And I'm trying to have it walk back to Lumbridge and chop more trees across the river, where the goblins are. //import org.dreambot.api.methods.Calculations; import org.dreambot.api.methods.map.Area; import org.dreambot.api.methods.map.Tile; //import org.dreambot.api.methods.map.Tile; import org.dreambot.api.script.AbstractScript; import org.dreambot.api.script.Category; import org.dreambot.api.script.ScriptManifest; import org.dreambot.api.wrappers.interactive.GameObject; @ScriptManifest(category = Category.MISC, author = "Jakey G", name = "Farm all the Trees", version = 1.0, description = "Fish Grabber from PowerFishers") public class Main extends AbstractScript { @Override public int onLoop() { if (!getLocalPlayer().isAnimating()) { if (getInventory().isFull()) { GameObject lumbybb = getGameObjects().closest("Bank booth"); if (!getBank().isOpen()) { ClosestBank b = new ClosestBank(); Area closestBankArea = b.getClosestBank(getLocalPlayer()); getWalking().walk(closestBankArea.getRandomTile()); } if (lumbybb != null) { lumbybb.interact("Bank"); if (getBank().isOpen()) { getBank().depositAllExcept("Bronze axe"); getBank().close(); } } } else { log("running to tree"); GameObject tree = getGameObjects().closest("Tree"); Tile treeTile = new Tile(tree.getX(),tree.getY()); //part im messing up, it doesnt run back to the closest tree if (tree != null) { getWalking().walk(treeTile); if (getMap().canReach(tree)) { tree.interact("Chop down"); } } } } return 1000; } } Link to comment Share on other sites More sharing options...
Pseudo 178 Share Posted March 18, 2019 Your logic is pretty scuffed, hence why it doesn't work. AsBakedAsCake and Peso 2 Link to comment Share on other sites More sharing options...
AsBakedAsCake 200 Share Posted March 18, 2019 start here bro: You should be able to get banking in no time. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now