Advertisement
Guest User

Untitled

a guest
Jan 29th, 2015
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.84 KB | None | 0 0
  1. import static org.rev317.min.api.methods.Players.getMyPlayer;
  2.  
  3. import java.awt.*;
  4.  
  5. import java.io.IOException;
  6. import java.net.URL;
  7.  
  8. import org.parabot.environment.api.utils.Time;
  9. import org.parabot.environment.scripts.Category;
  10. import org.parabot.environment.scripts.Script;
  11. import org.parabot.environment.scripts.ScriptManifest;
  12. import org.parabot.environment.scripts.framework.LoopTask;
  13. import org.rev317.min.api.methods.Inventory;
  14. import org.rev317.min.api.methods.Menu;
  15. import org.rev317.min.api.methods.Players;
  16. import org.rev317.min.api.methods.Skill;
  17. import org.rev317.min.api.wrappers.Character;
  18. import org.rev317.min.api.wrappers.Item;
  19. import org.rev317.min.api.wrappers.Player;
  20.  
  21. @ScriptManifest(author = "God Poe X D",
  22. category = Category.COMBAT, description = "Makes you santaly",
  23. name = "AutoEater",
  24. servers = { "Ikov" },
  25. version = 0.3)
  26.  
  27. public class Autoeater extends Script implements LoopTask {
  28.  
  29. public static boolean ragbot420 = true;
  30.  
  31. public static int superRestoreID = 14416;
  32. public static int saradominBrewID = 14129;
  33.  
  34. @Override
  35. public int loop() {
  36.  
  37. int i = (int) (290 + (90 * Math.random()));
  38. Time.sleep(i);
  39.  
  40. if (ragbot420 == true) {
  41.  
  42. if (Inventory.containts(14129, 14127, 14125, 14123, 14420, 14418) //check to see if i still have brews
  43. && Inventory.containts(14416, 14414, 14412, 14410, 14408, 14406)) { //check to see if i still have restores
  44.  
  45. if (Skill.PRAYER.getLevel() < 1) { //if smited then try to tele, need to improve this cuz tb + zbow = ez divine
  46.  
  47. teleToHome(); //tries to tele
  48.  
  49. while (Skill.PRAYER.getLevel() < 20) {
  50. drinkRestore(); //spams restore, it's a while loop so that it wont brew
  51. }
  52.  
  53. reactivatePray();
  54. }
  55.  
  56. if (Skill.PRAYER.getLevel() < 66) { //check if i need to ppot
  57. drinkRestore();
  58. }
  59.  
  60. if (Skill.HITPOINTS.getLevel() < 99) { //check if i need to eat
  61. drinkBrew();
  62. }
  63.  
  64. if (Skill.RANGE.getLevel() < 66) { //check if i need to restore, not with ppot part because this is lower priority/importance than hp/brew
  65. drinkRestore();
  66. }
  67.  
  68. } else { //either no brews or restores, so you need to tele, gf divine if tbed #pm5wayin
  69.  
  70. teleToHome();
  71.  
  72. }
  73. }
  74. return 0;
  75. }
  76.  
  77.  
  78.  
  79.  
  80.  
  81. void drinkRestore() {
  82.  
  83. if (Inventory.getCount(superRestoreID) > 0) { //check to make sure that you have a potion of that dose before you try drinking it
  84. Item[] superRes = Inventory.getItems(superRestoreID);
  85. Menu.sendAction(74, superRestoreID - 1, superRes[0].getSlot(), 3214, 2106, 4); //drinks restore
  86. }
  87.  
  88. superRestoreID -=2; //cycles through restore IDs (ie various doses)
  89.  
  90. if (superRestoreID < 14406) {
  91. superRestoreID = 14416;
  92. }
  93. }
  94.  
  95.  
  96.  
  97. void drinkBrew() {
  98.  
  99. if (Inventory.getCount(saradominBrewID) > 0) { //check to make sure that you have a potion of that dose before you try drinking it
  100. Item[] saraBrews = Inventory.getItems(saradominBrewID);
  101. Menu.sendAction(74, saradominBrewID - 1, saraBrews[0].getSlot(), 3214, 2106, 4); //drinks brew
  102. }
  103.  
  104. if (saradominBrewID == 14123) { //these two if statements
  105. saradominBrewID = 14420; //cycle through the IDs of
  106. } else { //sara brew doses
  107. saradominBrewID -=2;
  108. }
  109.  
  110. if (saradominBrewID == 14416) {
  111. saradominBrewID = 14129;
  112. }
  113. }
  114.  
  115.  
  116.  
  117. void teleToHome() {
  118. Menu.sendAction(646, 343, 512, 30000, 598, 1); //home tele in spellbook
  119. Menu.sendAction(315, 255, 350, 2461, 1088, 1); //click on teleport to home (as opposed to other option, market)
  120. }
  121.  
  122.  
  123.  
  124. void reactivatePray() {
  125.  
  126. }
  127.  
  128. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement