Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.36 KB | None | 0 0
  1. import org.rsbot.script.ScriptManifest;
  2. import org.rsbot.script.Script;
  3. import org.rsbot.script.wrappers.RSObject;
  4. import org.rsbot.script.wrappers.RSTile;
  5. import org.rsbot.script.wrappers.RSArea;
  6. import org.rsbot.script.wrappers.RSTilePath;
  7. import org.rsbot.event.listeners.PaintListener;
  8.  
  9. import java.awt.*;
  10.  
  11. import org.rsbot.script.wrappers.RSNPC;
  12.  
  13. import org.rsbot.script.wrappers.RSComponent;
  14. import org.rsbot.script.wrappers.RSInterface;
  15.  
  16. @ScriptManifest(authors = { "boyyo11" }, keywords = { "the blood pact" }, name = "The Blood Pact", version = 1.0, description = "This bot does the quest: The Blood Pact, for you.")
  17. public class thebloodpact extends Script implements PaintListener {
  18.  
  19. private RSArea lumbridgeTombs = new RSArea(new RSTile(3238, 3193), new RSTile(3248, 3202));
  20. private RSArea lumbridge = new RSArea(new RSTile(3215, 3200), new RSTile(3238, 3233)); //Lumbridge area we might have to be walking
  21. private RSArea lumbyCastle = new RSArea(new RSTile(3216, 3209),new RSTile(3226, 3228));
  22.  
  23. //if(interfaces.canContinue()){
  24. // interfaces.clickContinue();
  25. // sleep(random(1000, 1500));
  26. //}
  27.  
  28.  
  29. public boolean onStart(){
  30. log("Script starting");
  31. return true;
  32. }
  33.  
  34. public int loop(){
  35. RSNPC xeniaNPC = npcs.getNearest(9633);
  36. RSInterface whatdoyou = interfaces.get(232);
  37. RSInterface clicktocontinue1 = interfaces.get(242);
  38. RSInterface clicktocontinue2 = interfaces.get(243);
  39. RSInterface clicktocontinue3 = interfaces.get(64);
  40. RSInterface illhelp = interfaces.get(234);
  41. if(lumbyCastle.contains(getMyPlayer().getLocation())){
  42. walking.walkTo(new RSTile(3242, 3198));
  43. } else if(lumbridge.contains(getMyPlayer().getLocation())){
  44. walking.walkTo(new RSTile(3242, 3198));
  45. } else if(lumbridgeTombs.contains(getMyPlayer().getLocation())){
  46. if(clicktocontinue1.isValid()){
  47. clicktocontinue1.getComponent(6).doClick();
  48. sleep(random(2000, 2500));
  49. if(whatdoyou.isValid()){
  50. whatdoyou.getComponent(2).doClick();
  51. sleep(random(1000, 1500));
  52. if(clicktocontinue3.isValid()){
  53. clicktocontinue3.getComponent(5).doClick();
  54. sleep(random(2000, 2500));
  55. if(clicktocontinue2.isValid()){
  56. clicktocontinue2.getComponent(7).doClick();
  57. sleep(random(2000, 2500));
  58. if(interfaces.canContinue()){
  59. interfaces.clickContinue();
  60. sleep(random(2000, 2500));
  61. if(illhelp.isValid()){
  62. illhelp.getComponent(2).doClick();
  63. sleep(random(2000, 2500));
  64.  
  65. mouse.click(170, 307, 4, 3, true);
  66. sleep(random(5000, 6500));
  67. if(interfaces.canContinue()){
  68. interfaces.clickContinue();
  69. sleep(random(2000, 2500));
  70. if(interfaces.canContinue()){
  71. interfaces.clickContinue();
  72. sleep(random(2000, 2500));
  73. if(interfaces.canContinue()){
  74. interfaces.clickContinue();
  75. sleep(random(2000, 2500));
  76. }
  77. }
  78. }
  79. }
  80. }
  81. }
  82. }
  83. }
  84. }
  85. else {
  86. xeniaNPC.doAction("Talk-to");
  87. }
  88. /*
  89. if(interfaces.canContinue()){
  90. interfaces.clickContinue();
  91. sleep(random(1000, 1500));
  92. }
  93. else{
  94. xeniaNPC.doAction("Talk-to");
  95. sleep(600,900);
  96. }
  97. }
  98. */
  99. }
  100. return random(100, 200);
  101. }
  102.  
  103. public void onFinish(){
  104.  
  105. }
  106.  
  107. @Override
  108. public void onRepaint(Graphics render) {
  109. // TODO Auto-generated method stub
  110.  
  111. }
  112. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement