Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package winterTodt;
- import org.dreambot.api.methods.Calculations;
- import org.dreambot.api.methods.interactive.GameObjects;
- import org.dreambot.api.methods.map.Area;
- import org.dreambot.api.script.AbstractScript;
- import org.dreambot.api.script.ScriptManifest;
- import org.dreambot.api.script.Category;
- import org.dreambot.api.wrappers.interactive.GameObject;
- import org.dreambot.api.wrappers.interactive.Player;
- @ScriptManifest(author = "themcpker", name = "winterbank", version = 0.1, description = "does the wintertodt skilling boss", category = Category.MONEYMAKING)
- public class main extends AbstractScript {
- Area bankarea = new Area(1638, 3943, 1640, 3945);
- Area Entrance = new Area(1628, 3963, 1632, 3957);
- Area Bossarea = new Area(1638, 3988, 1641, 3999);
- Area Exit = new Area(1632, 3969, 1628, 3975);
- Area Spawn = new Area(1634, 3978, 1626, 3985);
- public Boolean gottaBank = true;
- GameObject bank;
- GameObject gate;
- GameObject brazier;
- GameObject Burningbrazier;
- GameObject roots;
- public enum State{
- BANK, GETREADY, PLAY, ERROR
- }
- public State getstate()
- {
- if (gottaBank)
- {
- log("State = BANK");
- return State.BANK;
- }
- else if (Spawn.contains(getLocalPlayer()))
- {
- log("Going to play the mini-game");
- return State.PLAY;
- }
- else if (!gottaBank)
- {
- return State.GETREADY;
- }
- return State.GETREADY;
- }
- public void onStart()
- {
- log("Script has started without problems");
- }
- public void onStop(){
- log("Script has stopped");
- }
- @Override
- public int onLoop() {
- switch (getstate())
- {
- case BANK:
- if(bankarea.contains(getLocalPlayer()))
- {
- log("Bot is in the bank area and wil bank");
- bank = getGameObjects().closest("Bank chest");
- bank.interact("bank");
- sleep(Calculations.random(500, 2000));
- getBank().depositAllItems();
- sleep(Calculations.random(500, 2000));
- getBank().withdraw("Adamant axe");
- sleep(Calculations.random(500, 1000));
- getBank().withdraw("Knife");
- sleep(Calculations.random(1000, 2000));
- getBank().withdraw("Jug of wine", 5);
- sleep(Calculations.random(1000, 3000));
- getBank().close();
- gottaBank = false;
- }
- else if(!bankarea.contains(getLocalPlayer()))
- {
- log("Bot will walk to the bank");
- getWalking().walk(bankarea.getRandomTile());
- sleep(500, 2000);
- }
- break;
- case PLAY:
- if(!Bossarea.contains(getLocalPlayer()))
- {
- getWalking().walk(getLocalPlayer());
- sleep(2000, 5000);
- }
- else if(true)
- {
- }
- break;
- case GETREADY:
- {
- if(!Entrance.contains(getLocalPlayer()))
- {
- getWalking().walk(Entrance.getRandomTile());
- }
- }
- break;
- case ERROR:
- log("Script has ran into a error");
- break;
- default:
- break;
- }
- return Calculations.random(500, 1000);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement