Guest User

Untitled

a guest
Jun 22nd, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. public class TestScript implements Script {
  2. private ScriptToolkit st = getScriptToolkit();
  3. private GameNPC cachedNpc;
  4.  
  5. public void start(String[] args) {
  6. getSubroutines().add(NPCFinder, AntiBan);
  7. }
  8.  
  9. public void stop() {
  10. //Onstop
  11. }
  12.  
  13. public void pause() {
  14. //On pause
  15. }
  16.  
  17. public void resume() {
  18. //On resume
  19. }
  20.  
  21. public void loop() {
  22. if(cachedNpc != null) cachedNpc.atNpc("Attack");
  23. }
  24.  
  25. public Subroutine NPCFinder = new Subroutine(){
  26. public void run() {
  27. cachedNpc = st.getNPCs().findNpc(String name, int id);
  28. }
  29. }
  30.  
  31. public Subroutine AntiBan = new Subroutine() {
  32. public void run() {
  33. st.getInput().moveMouse(random(150,500),random(100,500));
  34. }
  35. }
  36. }
Add Comment
Please, Sign In to add comment