Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.08 KB | None | 0 0
  1.  
  2. import com.rsbuddy.script.methods.Npcs;
  3. import com.rsbuddy.script.util.Random;
  4. import com.rsbuddy.script.wrappers.Npc;
  5. import nz.uberdungeon.common.Plugin;
  6. import nz.uberdungeon.dungeon.MyPlayer;
  7. import nz.uberdungeon.misc.GameConstants;
  8. import nz.uberdungeon.utils.MyMovement;
  9.  
  10.  
  11. public class AsteaFrostweb extends Plugin
  12. {
  13.     public boolean isValid() {
  14.         return Npcs.getNearest(GameConstants.ASTEA_FROSTWEB) != null;
  15.     }
  16.  
  17.  
  18.     public int loop() {
  19.         Npc frostWeb = Npcs.getNearest(GameConstants.ASTEA_FROSTWEB);
  20.         if (MyPlayer.hp() < 60)
  21.             MyPlayer.eat(GameConstants.GOOD_FOODS);
  22.         if (frostWeb.isOnScreen()) {
  23.             frostWeb.interact("Attack");
  24.             sleep(Random.nextInt(700, 1500));
  25.         }
  26.         else
  27.             MyMovement.turnTo(frostWeb);
  28.         return Random.nextInt(500, 800);
  29.     }
  30.  
  31.     public String getStatus() {
  32.         return "Killing " + getName();
  33.     }
  34.  
  35.     public String getAuthor() {
  36.         return "UberMouse";
  37.     }
  38.  
  39.     public String getName() {
  40.         return "Astea Frostweb";
  41.     }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement