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

EssHounds

By: a guest on May 2nd, 2012  |  syntax: Java  |  size: 0.83 KB  |  hits: 24  |  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. /**
  2. Imports Omitted
  3. **/
  4.  
  5.  
  6.  
  7. @Manifest(authors = { "merakit" }, name="Law Siphon", description = "Gets ESS from lawhounds.")
  8. public class RuneSpan extends ActiveScript {
  9.  
  10.  
  11.  
  12.         int master = 15413;
  13.  
  14.  
  15.  
  16.         @Override
  17.         protected void setup(){
  18.                 provide(new Strategy(new Siphon(),new Siphon()));
  19.         }
  20.  
  21.         private class Siphon implements Task, Condition {
  22.                 @Override
  23.                 public void run(){
  24.                         final NPC esshound = NPCs.getNearest(master);
  25.                         if(esshound != null){
  26.                                 if(esshound.isOnScreen()) {
  27.                                         esshound.getLocation();
  28.                                         Camera.turnTo(esshound);
  29.                                         esshound.interact("Siphon");
  30.                                 } else if(!esshound.isOnScreen()) {
  31.                                         esshound.getLocation();
  32.                                         Camera.turnTo(esshound);
  33.                                 }
  34.                         }
  35.                         Time.sleep(2000);
  36.                 }
  37.  
  38.                 @Override
  39.                 public boolean validate() {
  40.                         return Players.getLocal().getAnimation() == -1;
  41.                 }
  42.         }
  43. }