Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. import org.rsbot.script.ScriptManifest;
  2. import org.rsbot.script.Script;
  3. import org.rsbot.script.wrappers.RSArea;
  4. import org.rsbot.script.wrappers.RSObject;
  5. import org.rsbot.script.wrappers.RSPlayer;
  6. import org.rsbot.script.wrappers.RSTile;
  7.  
  8. @ScriptManifest(authors = { "boyyo11" }, keywords = { "lecturn lighter pro" }, name = "Lecturn Lighter Pro", version = 1.0, description = "Allows a bot to lit your lecturn.")
  9. public class BurnerLighter extends Script {
  10.  
  11. private int X1 = 0;
  12. private int X2 = 0;
  13. private int Y1 = 0;
  14. private int Y2 = 0;
  15. private int pX = 0;
  16. private int pY = 0;
  17.  
  18. private RSArea LightingLocation = new RSArea(new RSTile(X1, Y1), new RSTile(X2, Y2));
  19.  
  20. private static final int MARRENTILL_ID = 251;
  21. private static final int GRIMYMARRENTILL_ID = 201;
  22. private static final int UNLIT_ID = 13212;
  23. private static final int LIT_ID = 13213;
  24. private static final int TINDERBOX_ID = 590;
  25.  
  26. private boolean playersinRoom = false;
  27. private boolean playerInRoom = false;
  28.  
  29. private int playersInt = 0;
  30.  
  31. public boolean onStart(){
  32. pX = getMyPlayer().getLocation().getX();
  33. pY = getMyPlayer().getLocation().getY();
  34. X1 = pX - 10;
  35. Y1 = pY - 10;
  36. X2 = pX + 10;
  37. Y2 = pY + 10;
  38. return true;
  39. }
  40.  
  41. public int loop(){
  42. if(playersInt >= 1){
  43. playerInRoom = true;
  44. }
  45. if(inventory.contains(TINDERBOX_ID)){
  46. if(inventory.contains(MARRENTILL_ID)){
  47. RSObject Lecturn = objects.getNearest(UNLIT_ID);
  48. if(playersinRoom == true){
  49. if(playerInRoom == true){
  50. if(Lecturn != null){
  51. camera.turnTo(Lecturn);
  52. Lecturn.interact("Light " + Lecturn.getName());
  53. sleep(random(600, 700));
  54. }
  55. }
  56. } else {
  57. if(Lecturn != null){
  58. camera.turnTo(Lecturn);
  59. Lecturn.interact("Light " + Lecturn.getName());
  60. sleep(random(600, 700));
  61. }
  62. }
  63. }
  64. } else {
  65. stopScript(false);
  66. }
  67. return random(100, 200);
  68. }
  69.  
  70. public void onFinish(){
  71.  
  72. }
  73. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement