Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package osbotOS;
- import java.util.ArrayList;
- import java.util.Collections;
- import org.osbot.rs07.script.Script;
- import Methods.BankingMethods;
- import Methods.Core;
- import Methods.PositionMethods;
- import Methods.PouchMethods;
- public class ActivityOutOfBank extends Node {
- public boolean pouchesFull = false;
- public boolean bankingIsDone = false;
- public static ArrayList<Node> subnodes = new ArrayList<>();
- public boolean[] pouchesInUse = new boolean[] { false, false, false, false };
- private ActivityInBank inBank = new ActivityInBank(this.script);
- public BankingMethods bankMethods = new BankingMethods();
- public PositionMethods positionMethods = new PositionMethods();
- public PouchMethods pouchMethods = new PouchMethods();
- public Core coreMethods = new Core();
- public ActivityOutOfBank(Script script) {
- super(script);
- // TODO Auto-generated constructor stub
- }
- @Override
- public void execute() {
- Collections.addAll(subnodes, new SubActivityOutOfBankUnnoteEss(
- this.script), new SubActivityOutOfBankFixPouches(this.script)); //add all nodes to the ArrayList
- while (!this.bankingIsDone) {
- for (Node node : subnodes) {
- if (node.validate()) {
- node.execute();
- }
- }
- this.coreMethods.waitTime(50);
- }
- }
- @Override
- public boolean validate() {
- return this.inBank.bankingIsDone /* && this.inBank.nearBank */;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement