Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.59 KB | None | 0 0
  1. import org.rsbot.script.Script;
  2. import org.rsbot.script.ScriptManifest;
  3. import org.rsbot.script.wrappers.RSObject;
  4. import org.rsbot.script.wrappers.RSTile;
  5. import org.rsbot.script.wrappers.RSArea;
  6.  
  7. @ScriptManifest(authors = "Themanhunt", name = "AirCrafter", version = 1.0, description = "AirCrafter")
  8. public class airCrafter extends Script{
  9.    
  10.     public int ruinID = 2452; //Run id.
  11.     public int bankBoothID = 11402; //Bank booth id.
  12.     public int airAltarID = 2478; //Altar id.
  13.     public int portalID = 2465;  //Portal id.
  14.     public RSArea bankArea = new RSArea(new RSTile(3182, 3433), new RSTile(3184, 3437)); //The bank area
  15.     public RSTile bankToRuin[] = new RSTile[] { new RSTile(3181, 3430), new RSTile(3171, 3429), new RSTile(3162, 3421), new RSTile(3153, 3417), new RSTile(3143, 3414), new RSTile(3134, 3408), new RSTile(3129, 3405),}; //Bank to altar path
  16.  
  17.    
  18.     //Walk randomly to the bank.
  19.     private void bankToAir() {
  20.         log("Walking to airaltar");
  21.         walking.walkPathMM(bankToRuin);
  22.         sleep(100);
  23.     }
  24.    
  25.     //At the bank
  26.     private boolean atBank() {
  27.             return(bankArea.contains(getMyPlayer().getLocation()));
  28.     }
  29.    
  30.  
  31.     //What happens when the script start.    
  32.     public boolean onStart() {
  33.         log("Welcome to AirCrafter.");
  34.         return true;
  35.  
  36.     }
  37.  
  38.    
  39.     //What happens when script stops.
  40.     public void onFinish() {
  41.         log("Air Crafter stopped.");
  42.     }
  43.  
  44.     //The loop.
  45.     public int loop() {
  46.        
  47.         if (atBank()) {
  48.             log("We are at the bank.");
  49.             bankToAir();
  50.         }else if (!atBank())
  51.             bankToAir();
  52.         return (random(650, 950));
  53.     }
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement