Guest User

Untitled

a guest
Jul 17th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.24 KB | None | 0 0
  1. /*
  2. * Script made by Kets!
  3. * Proud to be Dutch!
  4. * DON'T STEAL THIS SCRIPT
  5. *
  6. * Cool Mouse Animation: MHTY
  7. * Help Credits:
  8. * BOOL
  9. * Mouchicc
  10. *
  11. * FIXED and updated by SLAVEN
  12. */
  13.  
  14. import java.awt.Color;
  15. import java.awt.Font;
  16. import java.awt.Graphics;
  17. import java.awt.Point;
  18. import java.awt.event.KeyEvent;
  19. import java.util.ArrayList;
  20. import java.util.List;
  21. import java.util.Map;
  22.  
  23. import org.rsbot.bot.Bot;
  24. import org.rsbot.event.events.ServerMessageEvent;
  25. import org.rsbot.event.listeners.PaintListener;
  26. import org.rsbot.event.listeners.ServerMessageListener;
  27. import org.rsbot.script.*;
  28. import org.rsbot.script.wrappers.*;
  29.  
  30.  
  31. @ScriptManifest(authors = { "Kets and Slaven" }, category = "Combat", name = "FIXED Mystic Ogre Ranger", version = 2.0, description = "<head><style type='text/css'> hr {color: white} p {margin-left: 20px}</style></head><body><center><b><font size='5' color='red'>FIXED Mystic Ogre Ranger v 2.0 </font></b><br><b><font size='4' color='red'>By Kets, fixed by Slaven</font></b><br></center><center><table border='0'><tr><td colspan='2'><center><font size='4'><b>~~ Script Settings ~~</b></font></center></td></tr><tr><td colspan='2'><hr></td></tr><tr><td><tr><td><b>Start at King Lathas Training Ground</b></td><td><center><tr><td><b>Use Paint:</b></td><td><center><input type='checkbox' name='ShowPaint' value='true'> Yes<tr><td><b>Hit Predictor:</b></td><td><center><input type='checkbox' name='ShowHit' value='true'> Yes<tr><td><b>Use Range Potions (broken):</b></td><td><center><input type='checkbox' name='Potions' value='true'> Yes<tr><td><b>Grab Seeds:</b></td><td><center><input type='checkbox' name='Seed' value='true'> Yes<tr><td><b>Use AntiBan (broken):</b></td><td><center><input type='checkbox' name='AntiBan' value='true'> Yes<tr><td><b>Use SafeTele (unconfirmed):</b></td><td><center><input type='checkbox' name='Tele' value='true'> Yes<tr><td><b>Food ID (unconfirmed):</b></td><td><center><input type='text' name='foodid'></table></center></body></html>")
  32. public class FIXEDMysticOgreRanger extends Script implements ServerMessageListener,
  33. PaintListener {
  34.  
  35. final ScriptManifest properties = getClass().getAnnotation(
  36. ScriptManifest.class);
  37.  
  38. // Local Settings
  39. RSTile StartSpot;
  40. int MONSTER = 2801;
  41. boolean AntiBan = false;
  42. int SettingTele = 10;
  43. boolean ActivateTele = false;
  44. int LawRune = 563;
  45. int AirRune = 556;
  46. int Ardougne = 8011;
  47.  
  48. // Eating
  49. boolean Eating = false;
  50. int FoodID;
  51. int EatAT = 20;
  52.  
  53. // AntiBan
  54. public int currenttab;
  55. public int GambleInt;
  56. public int checkTime, checkTime1 = random(240000, 480000);
  57. public int speed = 300;
  58. public int walkSpeed = 300;
  59. public long lastCheck = -1, lastcheck1 = -1, lastCheck2,
  60. lastCheck3 = System.currentTimeMillis();
  61. public Point mousePos;
  62.  
  63. // Potion Support
  64. int[] RangePotion = { 169, 170, 171, 172, 173, 174, 2444, 2445, 11509,
  65. 11510, 11511, 11512 };
  66. int EmptyVial = 229;
  67. boolean Potions = false;
  68.  
  69. // Seeds
  70. int GotSeed;
  71. boolean Seed = false;
  72. int RanarrID = 5295;
  73. int WaterID = 5321;
  74. int SnapeID = 5300;
  75. int KwuarmID = 5299;
  76. int LimpID = 5100;
  77. int StrawbID = 5323;
  78. int LoopkID = 987;
  79. int ToothkID = 985;
  80. int ToadfID = 5296;
  81. int[] totalSeeds = {RanarrID, WaterID, SnapeID, KwuarmID, LimpID,
  82. StrawbID, LoopkID, ToothkID, ToadfID};
  83.  
  84. // Paint Settings
  85. long startTime = System.currentTimeMillis();
  86. int StartXP = skills.getCurrentSkillExp(Constants.STAT_RANGE);
  87. int StartLVL = skills.getCurrentSkillLevel(Constants.STAT_RANGE);
  88. boolean ShowPaint = false;
  89. boolean HitCalc = false;
  90. int Profit;
  91. GEItemInfo PriceKw = grandExchange.loadItemInfo(KwuarmID);
  92. GEItemInfo PriceWa = grandExchange.loadItemInfo(WaterID);
  93. GEItemInfo PriceSn = grandExchange.loadItemInfo(SnapeID);
  94. GEItemInfo PriceRa = grandExchange.loadItemInfo(RanarrID);
  95. GEItemInfo PriceLi = grandExchange.loadItemInfo(LimpID);
  96. GEItemInfo PriceLK = grandExchange.loadItemInfo(LoopkID);
  97. GEItemInfo PriceTK = grandExchange.loadItemInfo(ToothkID);
  98. GEItemInfo PriceSt = grandExchange.loadItemInfo(StrawbID);
  99. GEItemInfo PriceTo = grandExchange.loadItemInfo(ToadfID);
  100.  
  101. // HIT Predictor
  102. int back2zerorng = 0;
  103. double rnghit;
  104. int rng1 = 0;
  105. int rng2 = 0;
  106. int rng3 = 0;
  107. int range1 = 0;
  108. int range2 = 0;
  109.  
  110. // SCRIPT
  111. public boolean onStart(Map<String, String> args) {
  112.  
  113. StartSpot = getMyPlayer().getLocation();
  114. if (args.get("ShowPaint") != null) {
  115. ShowPaint = true;
  116. }
  117. if (args.get("Potions") != null && inventoryContains(RangePotion)) {
  118. Potions = true;
  119. }
  120. if (args.get("AntiBan") != null) {
  121. AntiBan = true;
  122. }
  123. if (args.get("Seed") != null && inventoryContains(LawRune)
  124. && inventoryContains(AirRune)) {
  125. Seed = true;
  126. }
  127. if (args.get("Tele") != null && inventoryContains(Ardougne)) {
  128. ActivateTele = true;
  129. }
  130. if (args.get("foodid").equals("")) {
  131. Eating = false;
  132. } else {
  133. Eating = true;
  134. FoodID = Integer.parseInt(args.get("foodid"));
  135. }
  136. if (args.get("ShowHit") != null) {
  137. HitCalc = true;
  138. }
  139. return true;
  140. }
  141.  
  142. public void onFinish() {
  143. return;
  144. }
  145.  
  146. // Method edited so it doesnt open the inventorytab always <-- MOUCHICC
  147. @Override
  148. public RSInterfaceChild getInventoryInterface() {
  149. if (getInterface(Constants.INVENTORY_COM_X).isValid()) {
  150. return RSInterface.getChildInterface(Constants.INVENTORY_COM_X,
  151. Constants.INVENTORY_COM_Y);
  152. }
  153.  
  154. return RSInterface.getChildInterface(Constants.INVENTORY_X,
  155. Constants.INVENTORY_Y);
  156. }
  157.  
  158. private boolean ATTACKNPC(final RSNPC npc, final String action) {
  159. final RSTile tile = npc.getLocation();
  160. tile.randomizeTile(1, 1);
  161. try {
  162. final int hoverRand = random(8, 13);
  163. for (int i = 0; i < hoverRand; i++) {
  164. final Point screenLoc = npc.getScreenLocation();
  165. if (!pointOnScreen(screenLoc)) {
  166. setCameraRotation(getCameraAngle() + random(-35, 150));
  167. return true;
  168. }
  169.  
  170. moveMouse(screenLoc, 15, 15);
  171.  
  172. final List<String> menuItems = getMenuItems();
  173. if (menuItems.isEmpty() || menuItems.size() <= 1) {
  174. continue;
  175. }
  176. if (menuItems.get(0).toLowerCase().contains(
  177. npc.getName().toLowerCase())
  178. && getMyPlayer().getInteracting() == null) {
  179. clickMouse(true);
  180. return true;
  181. } else {
  182. for (int a = 1; a < menuItems.size(); a++) {
  183. if (menuItems.get(a).toLowerCase().contains(
  184. npc.getName().toLowerCase())
  185. && getMyPlayer().getInteracting() == null) {
  186. clickMouse(false);
  187. return atMenu(action);
  188. }
  189. }
  190. }
  191. }
  192.  
  193. } catch (final Exception e) {
  194. log.warning("ATTACKNPC(RSNPC, String) error: " + e);
  195. return false;
  196. }
  197. return false;
  198. }
  199.  
  200. private boolean clickInventoryArray(int[] itemID, String option) {
  201. if (getCurrentTab() != TAB_INVENTORY
  202. && !RSInterface.getInterface(INTERFACE_BANK).isValid()
  203. && !RSInterface.getInterface(INTERFACE_STORE).isValid()) {
  204. openTab(TAB_INVENTORY);
  205. }
  206. int[] items = getInventoryArray();
  207. java.util.List<Integer> possible = new ArrayList<Integer>();
  208. for (int X = 0; X < itemID.length; X++) {
  209. for (int i = 0; i < items.length; i++) {
  210. if (items[i] == itemID[X]) {
  211. possible.add(i);
  212. }
  213. }
  214. }
  215. if (possible.size() == 0) {
  216. return false;
  217. } else {
  218. int IDE = random(0, possible.size());
  219. int idx = possible.get(IDE);
  220. Point t = getInventoryItemPoint(idx);
  221. clickMouse(t, 5, 5, false);
  222. return atMenu(option);
  223. }
  224. }
  225.  
  226. public void checkForLevelUpMessage() {
  227. if (RSInterface.getInterface(INTERFACE_LEVELUP).isValid()) {
  228. wait(random(800, 2000));
  229. atInterface(INTERFACE_LEVELUP, 3);
  230. wait(random(1000, 2000));
  231. }
  232. }
  233.  
  234. public boolean CheckSeed() {
  235. RSTile Ranarr = getGroundItemByID(5295);
  236. RSTile Water = getGroundItemByID(5321);
  237. RSTile Snape = getGroundItemByID(5300);
  238. RSTile Kwuarm = getGroundItemByID(5299);
  239. RSTile Strawb = getGroundItemByID(5323);
  240. RSTile Toothk = getGroundItemByID(985);
  241. RSTile Loopk = getGroundItemByID(987);
  242. RSTile Limp = getGroundItemByID(5100);
  243. RSTile Toadf = getGroundItemByID(5296);
  244.  
  245. if (Seed) {
  246. if (Ranarr != null || Water != null || Snape != null
  247. || Kwuarm != null || Limp != null || Strawb != null
  248. || Toothk != null || Loopk != null || Limp != null
  249. || Toadf != null) {
  250. return false;
  251. }
  252. }
  253. return true;
  254. }
  255.  
  256. public boolean Safe() {
  257. int Hp = skills.getCurrentSkillLevel(STAT_HITPOINTS);
  258. int TeleAt = random(SettingTele, (SettingTele + 3));
  259. if (Hp <= TeleAt) {
  260. return true;
  261. }
  262. return false;
  263. }
  264.  
  265. public void hpCheck() {
  266. int curHP = skills.getCurrentSkillLevel(STAT_HITPOINTS);
  267. int eat = random(EatAT, (EatAT + 5));
  268. if (curHP <= eat && getInventoryCount(FoodID) > 0) {
  269. atInventoryItem(FoodID, "Eat");
  270. }
  271. }
  272.  
  273. public boolean rightClickTile(RSTile tile, String action) {
  274. Point p = Calculations.tileToScreen(tile);
  275. clickMouse(p, false);
  276. wait(random(500, 800));
  277. return atMenu(action);
  278. }
  279.  
  280. @Override
  281. public int loop() {
  282. if (distanceTo(StartSpot) > 3) {
  283. walkTileMM(StartSpot);
  284. }
  285.  
  286. {
  287. checkForLevelUpMessage();
  288. hpCheck();
  289. }
  290.  
  291. if (Safe() && ActivateTele) {
  292. openTab(Constants.TAB_INVENTORY);
  293. if (getCurrentTab() == Constants.TAB_INVENTORY) {
  294. atInventoryItem(Ardougne, "Break");
  295. }
  296. }
  297.  
  298. if (Seed) {
  299. RSTile Ranarr = getGroundItemByID(RanarrID);
  300. RSTile Water = getGroundItemByID(WaterID);
  301. RSTile Snape = getGroundItemByID(SnapeID);
  302. RSTile Kwuarm = getGroundItemByID(KwuarmID);
  303. RSTile Limp = getGroundItemByID(LimpID);
  304. RSTile Strawb = getGroundItemByID(StrawbID);
  305. RSTile Toothk = getGroundItemByID(ToothkID);
  306. RSTile Loopk = getGroundItemByID(LoopkID);
  307. RSTile Toadf = getGroundItemByID(ToadfID);
  308.  
  309. if (Toadf != null) {
  310. openTab(Constants.TAB_MAGIC);
  311. if (getCurrentTab() == Constants.TAB_MAGIC) {
  312. castSpell(Constants.SPELL_TELEKINETIC_GRAB);
  313. rightClickTile(Toadf, "Grab -> Toadflax");
  314. GotSeed++;
  315. openTab(Constants.TAB_INVENTORY);
  316. wait(random(1400, 2200));
  317. }
  318. }
  319. if (Ranarr != null) {
  320. openTab(Constants.TAB_MAGIC);
  321. if (getCurrentTab() == Constants.TAB_MAGIC) {
  322. castSpell(Constants.SPELL_TELEKINETIC_GRAB);
  323. rightClickTile(Ranarr, "Grab -> Ranarr");
  324. GotSeed++;
  325. openTab(Constants.TAB_INVENTORY);
  326. wait(random(1400, 2200));
  327. }
  328. }
  329. if (Loopk != null) {
  330. openTab(Constants.TAB_MAGIC);
  331. if (getCurrentTab() == Constants.TAB_MAGIC) {
  332. castSpell(Constants.SPELL_TELEKINETIC_GRAB);
  333. rightClickTile(Loopk, "Grab -> Loop");
  334. GotSeed++;
  335. openTab(Constants.TAB_INVENTORY);
  336. wait(random(1400, 2200));
  337. }
  338. }
  339. if (Toothk != null) {
  340. openTab(Constants.TAB_MAGIC);
  341. if (getCurrentTab() == Constants.TAB_MAGIC) {
  342. castSpell(Constants.SPELL_TELEKINETIC_GRAB);
  343. rightClickTile(Toothk, "Grab -> Tooth");
  344. GotSeed++;
  345. openTab(Constants.TAB_INVENTORY);
  346. wait(random(1400, 2200));
  347. }
  348. }
  349. if (Strawb != null) {
  350. openTab(Constants.TAB_MAGIC);
  351. if (getCurrentTab() == Constants.TAB_MAGIC) {
  352. castSpell(Constants.SPELL_TELEKINETIC_GRAB);
  353. rightClickTile(Strawb, "Grab -> Strawberry");
  354. GotSeed++;
  355. openTab(Constants.TAB_INVENTORY);
  356. wait(random(1400, 2200));
  357. }
  358. }
  359. if (Water != null) {
  360. openTab(Constants.TAB_MAGIC);
  361. if (getCurrentTab() == Constants.TAB_MAGIC) {
  362. castSpell(Constants.SPELL_TELEKINETIC_GRAB);
  363. rightClickTile(Water, "Grab -> Watermelon");
  364. GotSeed++;
  365. openTab(Constants.TAB_INVENTORY);
  366. wait(random(1400, 2200));
  367. }
  368. }
  369. if (Snape != null) {
  370. openTab(Constants.TAB_MAGIC);
  371. if (getCurrentTab() == Constants.TAB_MAGIC) {
  372. castSpell(Constants.SPELL_TELEKINETIC_GRAB);
  373. rightClickTile(Snape, "Grab -> Snapdragon");
  374. GotSeed++;
  375. openTab(Constants.TAB_INVENTORY);
  376. wait(random(1400, 2200));
  377. }
  378. }
  379. if (Kwuarm != null) {
  380. openTab(Constants.TAB_MAGIC);
  381. if (getCurrentTab() == Constants.TAB_MAGIC) {
  382. castSpell(Constants.SPELL_TELEKINETIC_GRAB);
  383. rightClickTile(Kwuarm, "Grab -> Kwuarm");
  384. GotSeed++;
  385. openTab(Constants.TAB_INVENTORY);
  386. wait(random(1400, 2200));
  387. }
  388. }
  389. if (Limp != null) {
  390. openTab(Constants.TAB_MAGIC);
  391. if (getCurrentTab() == Constants.TAB_MAGIC) {
  392. castSpell(Constants.SPELL_TELEKINETIC_GRAB);
  393. rightClickTile(Limp, "Grab -> Limp");
  394. GotSeed++;
  395. openTab(Constants.TAB_INVENTORY);
  396. wait(random(1400, 2200));
  397. }
  398. }
  399. }
  400. if (Potions) {
  401. if (skills.getCurrentSkillLevel(Constants.STAT_RANGE) == skills
  402. .getRealSkillLevel(Constants.STAT_RANGE)
  403. && getInventoryCount(RangePotion) != 0) {
  404. clickInventoryArray(RangePotion, "Drink");
  405. wait(random(1457, 2757));
  406. }
  407. }
  408.  
  409. if (CheckSeed() && getMyPlayer().getInteracting() == null
  410. && getNearestFreeNPCByID(MONSTER) != null) {
  411. ATTACKNPC(getNearestFreeNPCByID(MONSTER), "Attack");
  412. }
  413.  
  414. if (AntiBan) {
  415. AntiBan();
  416. }
  417. return 800;
  418. }
  419.  
  420. public void serverMessageRecieved(ServerMessageEvent e) {
  421. String message = e.getMessage();
  422. if (message.contains("There is no ammo left in your quiver.")) {
  423. log("No Arrows!!");
  424. stopScript();
  425. }
  426. if (message.contains("That was your last one!")) {
  427. log("No knives!!");
  428. stopScript();
  429. }
  430. }
  431.  
  432. public boolean activateCondition() {
  433. if (getMyPlayer().isMoving()) {
  434. return random(1, walkSpeed) == 1;
  435. } else {
  436. return random(1, speed) == 1;
  437. }
  438. }
  439.  
  440. public int AntiBan() {
  441. if (!bank.getInterface().isValid()) {
  442. if (System.currentTimeMillis() - lastCheck2 >= checkTime) {
  443. lastCheck2 = System.currentTimeMillis();
  444. checkTime = random(300000, 700000);
  445. wait(random(300, 500));
  446. mousePos = getMouseLocation();
  447. currenttab = getCurrentTab();
  448. openTab(random(0, 13));
  449. wait(random(300, 500));
  450. turnCamera();
  451. wait(random(300, 500));
  452. openTab(currenttab);
  453. wait(random(300, 500));
  454. moveMouse(mousePos, 7, 7);
  455. wait(random(100, 200));
  456. }
  457. GambleInt = random(1, 8);
  458. switch (GambleInt) {
  459. case 1: // Camera Rotation
  460. mousePos = getMouseLocation();
  461. moveMouse(random(0, 450), random(0, 450));
  462. wait(random(1000, 1500));
  463. moveMouse(mousePos, 7, 7);
  464. return -1;
  465.  
  466. case 2: // Move mouse & come back to original mouse location &
  467. // Camera Rotation
  468. final int xA = random(0, 750);
  469. final int yA = random(0, 500);
  470. mousePos = getMouseLocation();
  471. moveMouse(xA, yA);
  472. wait(random(800, 1500));
  473. moveMouse(mousePos, 7, 7);
  474. wait(random(100, 200));
  475. turnCamera();
  476. return -1;
  477.  
  478. case 3: // Inventory Tab Selection & Camera Rotation
  479. if (getCurrentTab() != Constants.TAB_INVENTORY) {
  480. currenttab = getCurrentTab();
  481. openTab(Constants.TAB_INVENTORY);
  482. wait(random(900, 1500));
  483. }
  484. return -1;
  485.  
  486. case 4: // Checks the bones, then cancel
  487. RSTile Bone = getGroundItemByID(532);
  488. if (Bone != null) {
  489. rightClickTile(Bone, "Cancel");
  490. }
  491. return -1;
  492.  
  493. case 5: // Camera Rotation & Move mouse & come back to original
  494. // mouse location
  495. wait(random(300, 500));
  496. final int xB = random(0, 750);
  497. final int yB = random(0, 500);
  498. mousePos = getMouseLocation();
  499. moveMouse(xB, yB);
  500. wait(random(900, 1500));
  501. moveMouse(mousePos, 7, 7);
  502. return -1;
  503.  
  504. case 6: // Camera Rotation
  505. turnCamera();
  506. return -1;
  507.  
  508. case 7: // Open different tab and go back to original tab
  509. mousePos = getMouseLocation();
  510. currenttab = getCurrentTab();
  511. openTab(random(0, 13));
  512. wait(random(300, 500));
  513. openTab(currenttab);
  514. wait(random(1300, 1600));
  515. moveMouse(mousePos, 7, 7);
  516. return -1;
  517.  
  518. case 8: // Move mouse && come back to original mouse location
  519. mousePos = getMouseLocation();
  520. moveMouse(random(0, 450), random(0, 450));
  521. wait(random(1200, 1600));
  522. moveMouse(mousePos, 7, 7);
  523. return -1;
  524. }
  525. }
  526. return -1;
  527. }
  528.  
  529. public void turnCamera() {
  530. char[] LR = new char[] { KeyEvent.VK_LEFT, KeyEvent.VK_RIGHT };
  531. char[] UD = new char[] { KeyEvent.VK_DOWN, KeyEvent.VK_UP };
  532. char[] LRUD = new char[] { KeyEvent.VK_LEFT, KeyEvent.VK_RIGHT,
  533. KeyEvent.VK_UP, KeyEvent.VK_UP };
  534. int random2 = random(0, 2);
  535. int random1 = random(0, 2);
  536. int random4 = random(0, 4);
  537.  
  538. if (random(0, 3) == 0) {
  539. Bot.getInputManager().pressKey(LR[random1]);
  540. try {
  541. Thread.sleep(random(100, 400));
  542. } catch (Exception e) {
  543. }
  544. Bot.getInputManager().pressKey(UD[random2]);
  545. try {
  546. Thread.sleep(random(300, 600));
  547. } catch (Exception e) {
  548. }
  549. Bot.getInputManager().releaseKey(UD[random2]);
  550. try {
  551. Thread.sleep(random(100, 400));
  552. } catch (Exception e) {
  553. }
  554. Bot.getInputManager().releaseKey(LR[random1]);
  555. } else {
  556. Bot.getInputManager().pressKey(LRUD[random4]);
  557. if (random4 > 1) {
  558. try {
  559. Thread.sleep(random(300, 600));
  560. } catch (Exception e) {
  561. }
  562. } else {
  563. try {
  564. Thread.sleep(random(500, 900));
  565. } catch (Exception e) {
  566. }
  567. }
  568. Bot.getInputManager().releaseKey(LRUD[random4]);
  569. }
  570. }
  571.  
  572. public int CalcProfit(int ID, int Price) {
  573. int Total = 0;
  574. if (getInventoryCount(ID) >= 1) {
  575. Total = getInventoryCount(ID) * Price;
  576. // log("Prijs: " + ID + " " + Price);
  577. return Total;
  578. }
  579. return -1;
  580. }
  581.  
  582. public void onRepaint(Graphics g) {
  583. if (isLoggedIn()) {
  584. if (ShowPaint) {
  585. long millis = System.currentTimeMillis() - startTime;
  586. long seconds = millis / 1000 % 60;
  587. long minutes = millis / (1000 * 60) % 60;
  588. long hours = millis / (1000 * 60 * 60) % 24;
  589.  
  590. int percentage = skills
  591. .getPercentToNextLevel(Constants.STAT_RANGE);
  592. int expGained = skills.getCurrentSkillExp(Constants.STAT_RANGE)
  593. - StartXP;
  594.  
  595. Profit = CalcProfit(RanarrID, PriceRa.getMarketPrice())
  596. + CalcProfit(KwuarmID, PriceKw.getMarketPrice())
  597. + CalcProfit(WaterID, PriceWa.getMarketPrice())
  598. + CalcProfit(SnapeID, PriceSn.getMarketPrice())
  599. + CalcProfit(StrawbID, PriceSt.getMarketPrice())
  600. + CalcProfit(ToothkID, PriceTK.getMarketPrice())
  601. + CalcProfit(LimpID, PriceLi.getMarketPrice())
  602. + CalcProfit(ToadfID, PriceTo.getMarketPrice())
  603. + CalcProfit(LoopkID, PriceLK.getMarketPrice());
  604.  
  605.  
  606. Point Point = getMouseLocation();
  607. long timeSince = Bot.getClient().getMouse().getMousePressTime();
  608. if (timeSince > System.currentTimeMillis() - 500) {
  609. g.setColor(new Color(255, 255, 255, 125));
  610. }else{
  611. g.setColor(new Color(0, 0, 0, 150));
  612. }
  613. g.drawLine(0, Point.y, 762, Point.y);
  614. g.drawLine(Point.x, 0, Point.x, 500);
  615.  
  616. g.setColor(new Color(0, 0, 0, 200));
  617. g.fillRect(520, 0, 245, 168);
  618.  
  619. g.setColor(Color.RED);
  620. g.drawString("Mystic Ogre Ranger" + " v " + properties.version(),
  621. 530 + 1, 20 + 1);
  622. g.setColor(Color.WHITE);
  623. g.drawString("Mystic Ogre Ranger" + " v " + properties.version(),
  624. 530, 20);
  625. g.drawString("Run Time: " + hours + ":" + minutes + ":"
  626. + seconds, 530, 40);
  627. g.drawString("Seeds: " + GotSeed, 530, 60);
  628. g.drawString("Current Level: "
  629. + skills.getRealSkillLevel(Constants.STAT_RANGE)
  630. + " - (" + percentage + "%)", 530, 80);
  631. g.drawString("Gained: " + expGained + " EXP", 530, 100);
  632. if (Seed) {
  633. g.drawString("Profit: " + Profit + " GP", 530, 120);
  634. } else {
  635. g.drawString("Profit: 0", 530, 120);
  636. }
  637.  
  638. if (HitCalc) {
  639. // HIT Predictor
  640. if (range1 == 0) {
  641. range1 = skills.getCurrentSkillExp(STAT_RANGE);
  642. range2 = 0;
  643. rng1 = range1;
  644. back2zerorng = 40;
  645. }
  646. if (range2 == 0) {
  647. if ((range1 != 0)
  648. && (range1 != skills.getCurrentSkillExp(STAT_RANGE))) {
  649. range2 = skills.getCurrentSkillExp(STAT_RANGE);
  650. rng2 = range2;
  651. range1 = 0;
  652. range2 = 0;
  653. back2zerorng = 40;
  654. }
  655. }
  656. if ((rng2 - rng1 != 0)) {
  657. rng3 = rng2 - rng1;
  658. rnghit = rng3 * 0.25;
  659. rnghit = Math.round(rnghit);
  660. back2zerorng = 40;
  661. }
  662. if (back2zerorng <= 0) {
  663. rnghit = 0;
  664. }
  665. back2zerorng--;
  666.  
  667. // Hit Predictor Text
  668. g.setColor(new Color(0, 0, 0, 150));
  669. g.fill3DRect(410, 7, 90, 20, true);
  670. g.setColor(Color.WHITE);
  671. g.drawString("Next Hit: " + rnghit, 413, 22);
  672. }
  673. }
  674. }
  675. }
  676. }
Add Comment
Please, Sign In to add comment