Guest User

Untitled

a guest
Jul 19th, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. import com.kbotpro.scriptsystem.runnable.Script;
  2. import com.kbotpro.scriptsystem.events.PaintEventListener;
  3. import com.kbotpro.scriptsystem.interfaces.Looped;
  4.  
  5. import java.awt.*;
  6.  
  7. /**
  8. * Created by Adam using IntelliJ IDEA.
  9. * Date: Nov 30, 2009
  10. * All code below is free for use in:
  11. * Personal or private work
  12. * Open source projects
  13. * Free programs
  14. * *Kbot
  15. */
  16. public class StayLoggedIn extends Script implements PaintEventListener {
  17. public Looped mainLoop;
  18. public int x;
  19. public int y;
  20. public int gamble;
  21. public int gambleTop;
  22. public int gambleLow;
  23. public int selectTab = 0;
  24.  
  25. public boolean canStart() {
  26. if (game.isLoggedIn()) {
  27. return true;
  28. } else {
  29. return false;
  30. }
  31. }
  32. public String getName() {
  33. return "Stay Logged In";
  34. }
  35. public String getAuthor() {
  36. return "ToshiXZ";
  37. }
  38. public void onRepaint(Graphics g) {
  39.  
  40. }
  41. public void stop() {
  42.  
  43. }
  44. public void onStart() {
  45.  
  46. }
  47. public void pause() {
  48.  
  49. }
  50. public void registerWorkers() {
  51. createWorker(mainLoop = new Looped() {
  52. public int loop() {
  53. gambleTop = random(10,50);
  54. gambleLow = random(0, gambleTop);
  55. gamble = random(0, gambleTop + (gambleTop - gambleLow));
  56. if (gamble <= gambleLow) {
  57. x = random(0, botEnv.appletWidth);
  58. y = random(7, botEnv.appletHeight);
  59. mouse.moveMouse(x, y);
  60. } else if (gamble >= gambleTop) {
  61. while(selectTab != game.getCurrentTab()) {
  62. selectTab = random(1, 28);
  63. }
  64. game.openTab(selectTab);
  65. } else {
  66. // Rotate Screen code here maybe.. rofl
  67. }
  68. return random(71, 23415);
  69. }
  70. });
  71. }
  72. }
Add Comment
Please, Sign In to add comment