Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. import org.powerbot.core.script.ActiveScript;
  2. import org.powerbot.core.script.job.Task;
  3. import org.powerbot.game.api.Manifest;
  4. import org.powerbot.game.api.methods.Walking;
  5. import org.powerbot.game.api.methods.interactive.NPCs;
  6. import org.powerbot.game.api.methods.interactive.Players;
  7. import org.powerbot.game.api.methods.tab.Attack;
  8. import org.powerbot.game.api.util.Random;
  9. import org.powerbot.game.api.wrappers.interactive.NPC;
  10.  
  11. @Manifest(authors = { "scribble" }, name = "~$~ Citizen-Herder", description =
  12. "kills canifis citizens and collects wolf bones... be sure to start with a wolfbane equipted")
  13.  
  14. public class WolfHerder extends ActiveScript{
  15.  
  16. public static boolean start;
  17. public static int[] Wolfman = {6032, 6028, 6034, 6030, 6031};
  18.  
  19. @Override
  20. public int loop() {
  21.  
  22. if(Attack.validate())
  23. Attack.run();
  24. return Random.nextInt(200, 300);
  25. }
  26.  
  27. public static boolean validate(){
  28. return start == false;
  29. }
  30.  
  31. public static class Attack{
  32. public static void run(){
  33. NPC MAN = NPCs.getNearest(Wolfman);
  34. if(Players.getLocal().isIdle()){
  35. if(MAN != null){
  36. if(MAN.isOnScreen()){
  37. if(!MAN.isInCombat()){
  38. MAN.interact("Attack");
  39. Task.sleep(500,950);
  40. }
  41. }else{
  42. Walking.walk(MAN);
  43. Task.sleep(500,550);
  44. }
  45. }
  46. }
  47. }
  48. public static boolean validate(){
  49. return start;
  50. }
  51. }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement