Advertisement
elliottdehn

Untitled

Apr 27th, 2015
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. package osbotOS;
  2.  
  3. import java.util.ArrayList;
  4. import java.util.Collections;
  5.  
  6. import org.osbot.rs07.script.Script;
  7.  
  8. import Methods.BankingMethods;
  9. import Methods.Core;
  10. import Methods.PositionMethods;
  11. import Methods.PouchMethods;
  12.  
  13. public class ActivityOutOfBank extends Node {
  14.  
  15. public boolean pouchesFull = false;
  16. public boolean bankingIsDone = false;
  17. public static ArrayList<Node> subnodes = new ArrayList<>();
  18.  
  19. public boolean[] pouchesInUse = new boolean[] { false, false, false, false };
  20. private ActivityInBank inBank = new ActivityInBank(this.script);
  21.  
  22. public BankingMethods bankMethods = new BankingMethods();
  23. public PositionMethods positionMethods = new PositionMethods();
  24. public PouchMethods pouchMethods = new PouchMethods();
  25. public Core coreMethods = new Core();
  26.  
  27. public ActivityOutOfBank(Script script) {
  28. super(script);
  29. // TODO Auto-generated constructor stub
  30. }
  31.  
  32. @Override
  33. public void execute() {
  34. Collections.addAll(subnodes, new SubActivityOutOfBankUnnoteEss(
  35. this.script), new SubActivityOutOfBankFixPouches(this.script)); //add all nodes to the ArrayList
  36. while (!this.bankingIsDone) {
  37. for (Node node : subnodes) {
  38. if (node.validate()) {
  39. node.execute();
  40. }
  41. }
  42. this.coreMethods.waitTime(50);
  43. }
  44.  
  45. }
  46.  
  47. @Override
  48. public boolean validate() {
  49. return this.inBank.bankingIsDone /* && this.inBank.nearBank */;
  50. }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement