Guest User

Untitled

a guest
Jun 19th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. package com.scripts;
  2.  
  3. import java.awt.*;
  4. import com.kbot2.scriptable.Script;
  5. import com.kbot2.scriptable.methods.wrappers.NPC;
  6. import com.kbot2.scriptable.methods.wrappers.GroundItem;
  7. import com.kbot2.scriptable.methods.wrappers.Tile;
  8. import com.kbot2.scriptable.methods.data.Skills;
  9. import com.kbot2.handlers.eventSystem.eventListeners.PaintListener;
  10.  
  11. /**
  12. * Created by IntelliJ IDEA.
  13. * User: Henry
  14. * Date: 30-May-2009
  15. * Time: 22:30:28
  16. * To change this template use File | Settings | File Templates.
  17. */
  18.  
  19.  
  20.  
  21. public class FlaxSpinner extends Script implements PaintListener {
  22.  
  23.  
  24.  
  25. Tile frontOfdoorTile = newTile(2307, 3214);
  26.  
  27.  
  28. @Override
  29. public boolean onStart() {
  30. Status = "Starting Up";
  31. log("Welcome to ILiked's Flax Spineer");
  32. startTime = System.currentTimeMillis();
  33. return true;
  34. }
  35.  
  36. public String getName() {
  37. return "FlaxSpinner";
  38. }
  39.  
  40. public String getAuthor() {
  41. return "ILikedRSBot";
  42. }
  43.  
  44. public String getDescription() {
  45. return "Spins Flax at lumbridge, start in Lumbridge bank";
  46. }
  47.  
  48. /* Your created methods, specific for this script goes under here */
  49.  
  50. /* Main Loop */
  51. public int loop() {
  52.  
  53. if(!isLoggedIn()) {
  54. random(100, 200);
  55. }
  56. while(getMyPlayer().isMoving()) sleep(500);
  57.  
  58. }
  59.  
  60. if (getMyPlayer().isMoving()) {
  61. sleep(250,500));
  62.  
  63. Point stairsPoint = getCalculations().tileToScreen(new Tile(3205, 3208));
  64. clickMouse(stairsPoint, 10, 10, true);
  65.  
  66. return random(200,300);
  67.  
  68. if(!tileOnScreen(frontOfdoorTile))
  69. walkTileMM(frontOfdoorTile);
  70.  
  71. }
  72. }
Add Comment
Please, Sign In to add comment