lolnyancats 0 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; } }
AsBakedAsCake 204 Posted March 18, 2019 start here bro: You should be able to get banking in no time.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.