Guest User

ExmplsCowKiller

a guest
Jul 10th, 2012
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.20 KB | None | 0 0
  1. import org.powerbot.concurrent.Task;
  2. import org.powerbot.concurrent.strategy.Strategy;
  3. import org.powerbot.game.api.ActiveScript;
  4. import org.powerbot.game.api.Manifest;
  5. import org.powerbot.game.api.methods.interactive.NPCs;
  6. import org.powerbot.game.api.methods.interactive.Players;
  7. import org.powerbot.game.api.util.Time;
  8. import org.powerbot.game.api.wrappers.interactive.NPC;
  9.  
  10.  
  11. @Manifest(authors = { "Exmpl" }, name = "ExmplsCowKiller", description = "Kills cows with swag", version = 1.0)
  12. public class ExmplsCowKiller extends ActiveScript {
  13.    
  14.     //Variables
  15.     final int Cow[] = {12362, 12363, 12364, 12365};
  16.            
  17.     @Override
  18.     protected void setup() {
  19.         provide(new Attack());
  20.         provide(new AntibanTask());
  21.     }
  22.    
  23.     private class Attack extends Strategy implements Task {
  24.  
  25.         @Override
  26.         public void run() {
  27.             NPC COW = NPCs.getNearest(Cow);
  28.                 if (Players.getLocal().getAnimation() == -1){
  29.                     COW.interact("Attack");
  30.                     Time.sleep(600,800);
  31.                     while (Players.getLocal().isMoving()) {
  32.                         Time.sleep(100,200);
  33.                     }
  34.                 }
  35.            
  36.         }
  37.    
  38.     @Override
  39.     public boolean validate() {
  40.         NPC COW = NPCs.getNearest(Cow);
  41.         return COW != null && COW.isOnScreen();
  42.        
  43.     }
  44.    
  45.     }
  46.    
  47. //TODO Paint
  48.    
  49.  
  50. }
Advertisement
Add Comment
Please, Sign In to add comment