Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 27th, 2012  |  syntax: None  |  size: 2.02 KB  |  hits: 39  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. //error pic http://i918.photobucket.com/albums/ad28/Alfansor/rsboterror.jpg
  2. import org.rsbot.script.Script;
  3. import org.rsbot.script.ScriptManifest;
  4. import org.rsbot.script.methods.Skills;
  5. import org.rsbot.script.util.Timer;
  6. import org.rsbot.script.wrappers.RSObject;
  7. import org.rsbot.script.wrappers.RSNPC;
  8. import org.rsbot.event.events.ServerMessageEvent;
  9. import org.rsbot.event.listeners.*;
  10. import java.awt.*;
  11.  
  12. @ScriptManifest(authors = "Alfansor", name = "Alfies TeaStealer", version = 0.1, description = "Just go to the tea stall beside Varrock East bank and start the script.")
  13. public class AlfiesTeaStealer extends Script {
  14.  
  15.         int stallID = 635 ;
  16.         Thread abThread;
  17.        
  18.         public boolean onStart() {
  19.                 log("Welcome to Alfies Tea Stealer");
  20.                 abThread = new Thread(new antiBan());
  21.                 abThread.start();
  22.                 return true;
  23.  
  24.         }
  25.  
  26.  
  27.         private void Steal() {
  28.                 RSObject stall = objects.getNearest(stallID);
  29.                 if(getMyPlayer().getAnimation() == -1)
  30.                         stall.doAction("Steal");
  31.         }
  32.  
  33.  
  34.         public void dropTea() {
  35.                 if (inventory.isFull()) {
  36.                         dropTea();
  37.                 } else if (!inventory.isFull()) {
  38.                         Steal();
  39.  
  40.                 }
  41.         }
  42.  
  43.         public int loop() {
  44.                 if (inventory.isFull()) {
  45.                         dropTea();
  46.                 } else if (!inventory.isFull()) {
  47.                         Steal();
  48.  
  49.                 }  
  50.                 return random(650, 1250);
  51.         }
  52.  
  53.         class antiBan extends Thread {
  54.                 public void run() {
  55.                        
  56.                         while (abThread !=null) {
  57.                                 try {
  58.                                 int state = random(0, 8);
  59.                                 switch (state) {
  60.                                 case 1:
  61.                                         int currTab = game.getCurrentTab();
  62.                                         game.openTab(random(0, 5));
  63.                                         Thread.sleep(random(1000, 4000));
  64.                                         game.openTab(currTab);
  65.                                         break;
  66.                                 case 2:
  67.                                         camera.setAngle(random(0, 360));
  68.                                         break;
  69.                                 case 3:
  70.                                         camera.setPitch(random(0, 100));
  71.                                         break;
  72.                                 case 4:
  73.                                         mouse.moveSlightly();
  74.                                         Thread.sleep(random(850, 1150));
  75.                                         mouse.moveSlightly();
  76.                                         break;
  77.                                 }
  78.                                 Thread.sleep(5000);
  79.  
  80.                         } catch (InterruptedException e) {
  81.                                 log
  82.                                                 .severe("Alfies Tea Stealer's antiban has encountered an error. Error:"
  83.                                                                 + e);
  84.                         }
  85.                 }
  86.         }
  87. }
  88. }