Advertisement
Guest User

s

a guest
Dec 1st, 2014
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.29 KB | None | 0 0
  1. package scripts.paa1.paa1InstructsReq;
  2.  
  3. import java.awt.Graphics;
  4.  
  5. import org.tribot.api2007.Banking;
  6. import org.tribot.api2007.Player;
  7. import org.tribot.script.Script;
  8.  
  9. import scripts.paa0.paa2ScriptReq.OverScript;
  10. import scripts.pzz8.paa1Utility.Interaction;
  11. import scripts.pzz8.paa1Utility.Utility;
  12.  
  13. public abstract class Instruct {
  14.    
  15.     InstructHandler IH = new InstructHandler();
  16.     public Graphics g = null;
  17.     protected boolean walking = false;
  18.    
  19.    
  20.     public Instruct(Script script){
  21.         OverScript.setScriptSource(script, this);
  22.     }
  23.    
  24.    
  25.    
  26.     public void update(){      
  27.         while(true){
  28.         IH.update(this);
  29.         }
  30.     }
  31.    
  32.     public final void doTask(Utility utility){
  33.         if(utility.set){
  34.                            
  35.                 if(isBanking()){
  36.                     whileBanking(utility);             
  37.                 }else
  38.                 if(isWalking()){
  39.                     whileWalking(utility);                 
  40.                 }else{         
  41.                     whilePlaying(utility);
  42.                 }
  43.                            
  44.             }  
  45.     }
  46.  
  47.     public abstract void whileWalking(Utility utility);
  48.    
  49.     public abstract void whileBanking(Utility utility);
  50.    
  51.     public abstract void whilePlaying(Utility utility);
  52.    
  53.     public boolean isInteracting() {       
  54.         return Interaction.hasTask();
  55.     }
  56.    
  57.     public boolean isWalking(){
  58.         return walking;
  59.     }
  60.    
  61.     public boolean isBanking(){
  62.         return Banking.isBankScreenOpen() || Banking.isDepositBoxOpen();
  63.     }
  64.    
  65.    
  66.  
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement