Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Arrays;
- import org.dreambot.api.methods.Calculations;
- import org.dreambot.api.methods.container.impl.bank.BankLocation;
- import org.dreambot.api.methods.container.impl.bank.BankTab;
- import org.dreambot.api.methods.container.impl.bank.BankType;
- import org.dreambot.api.script.AbstractScript;
- import org.dreambot.api.script.ScriptManifest;
- import org.dreambot.api.script.Category;
- import org.dreambot.api.wrappers.interactive.Entity;
- import org.dreambot.api.wrappers.interactive.GameObject;
- @ScriptManifest(author = "You", name = "BankBOT", version = 0.4, description = "Bank bot test", category = Category.MONEYMAKING)
- public class bankBOT extends AbstractScript {
- public static final int BUCKET = 1925;
- public static final int BUCKET_NOTE = 1926;
- public static final int BUCKET_WATER = 1229;
- public static final int BUCKET_WATER_NOTE = 1230;
- public void onStart() {
- log("Starting script...");
- }
- public void onExit() {
- }
- @Override
- public int onLoop() {
- GameObject bankChest = getGameObjects().closest("Bank chest");
- GameObject fountain = getGameObjects().closest("Fountain");
- //Walks there
- getWalking().walk(getBank().getClosestBank(BankType.CHEST));
- if (getBank().isOpen() && getInventory().isFull())
- {
- log("Bank is open");
- while(getInventory().isFull())
- {
- bankChest.interact();
- getBank().depositAllExcept(1926);
- if (getInventory().isEmpty())
- {
- break;
- }
- }
- sleep(1000);
- log("Depot!");
- sleep(2500);
- }
- else if (getInventory().isEmpty())
- {
- log("Inventory is empty");
- getWalking().walk(getBank().getClosestBank(BankType.CHEST));
- sleep(1500);
- bankChest.interact();
- log("Withdraw");
- while(getInventory().isEmpty())
- {
- getBank().withdrawAll(BUCKET);
- if (getInventory().isFull())
- {
- break;
- }
- }
- sleep(1000);
- log("Moving to fountain...");
- getWalking().walk(fountain);
- sleep(2500);
- log("fountian interaction");
- fountain.interact();
- }
- else {
- log("Bank not open");
- bankChest.interact();
- log("Opening bank!");
- sleep(1000);
- }
- return Calculations.random(500, 600);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement