Guest User

Untitled

a guest
Jun 21st, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. package com.scripts;
  2.  
  3. import com.kbot2.handlers.eventSystem.eventListeners.PaintListener;
  4. import com.kbot2.handlers.eventSystem.eventListeners.RandomListener;
  5. import com.kbot2.handlers.eventSystem.eventListeners.TextPaintListener;
  6. import com.kbot2.scriptable.Script;
  7. import com.kbot2.scriptable.Random;
  8. import com.kbot2.UI.BotUI;
  9.  
  10. import java.awt.*;
  11.  
  12. /**
  13. * Created by IntelliJ IDEA.
  14. * User: Jan Ove / Kosaki
  15. * Date: 16.apr.2009
  16. * Time: 21:24:58
  17. */
  18. public class DebugAnimation extends Script implements TextPaintListener, RandomListener {
  19. public boolean active() {
  20. return true;
  21. }
  22.  
  23. @Override
  24. public boolean onStart() {
  25. BotUI.setInputEnabled(getBot(), true);
  26. return true;
  27. }
  28.  
  29. @Override
  30. public String[] getTags() {
  31. return new String[]{"Debug", "Animations"};
  32. }
  33.  
  34. public int loop() {
  35. return 1000;
  36. }
  37.  
  38. public String getName() {
  39. return "Debug Animation";
  40. }
  41.  
  42. public String getAuthor() {
  43. return "Kosaki";
  44. }
  45.  
  46. public String getDescription() {
  47. return "Paints the animation int";
  48. }
  49.  
  50. /**
  51. * Used to make random counters or/and cancel randoms.
  52. *
  53. * @param random an instance of the random.
  54. * You may use the methods to get name and description.
  55. * And you can cast it to get internal methods for the random.
  56. * @return if the random shall run or not.
  57. * Leaving this to false without handling the random yourself may be dangerous!
  58. */
  59. public boolean onRandomActivate(Random random) {
  60. return false; // Its a debug script...
  61. }
  62.  
  63. /**
  64. * Gets called on each repaint.
  65. *
  66. * @return array of strings to paint. 1 per line.
  67. */
  68. public String[] onTextRepaint() {
  69. return new String[]{"Animation = "+ getMyPlayer().getAnimation()};
  70. }
  71. }
Add Comment
Please, Sign In to add comment