Advertisement
zamaro

Humdifiy fixed!

Apr 2nd, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.19 KB | None | 0 0
  1. { Humidify Script, made on December 31, 2013 by samerdl. Happy new year
  2. Updated and posted on January 11, 2014.
  3. Have a great civilian year.
  4.  
  5.  
  6.  
  7. **** Instructions ****
  8. 1) Have the Humidify spell runes: Water staff, Fire & astral runes.
  9. 2) Make or buy a fishbowl (42 crafting), place it in Inv slot #5.
  10. 3) Ease up your PC's CPU usage, memory leaks can mess it up.
  11. 4) Stand at spots with no random events I.E: GWD, PC bank/boat.
  12. 5) Setup the script and launch.
  13. **** Topic ****
  14. http://villavu.com/forum/showthread.php?t=107550&p=1279873#post1279873
  15.  
  16. First script in a while
  17.  
  18. Thanks for everything SRL
  19.  
  20. Hi Hoodz Hi Wilco
  21. {* *}
  22.  
  23. program Humidify;
  24. {$DEFINE SMART8}
  25. {$I SRL-OSR/SRL.Simba}
  26. {$i SRL-OSR\SRL\misc\debug.simba}
  27. {$i SRL-OSR\SRL\misc\SmartGraphics.simba}
  28. {$I SRL-OSR/SRL/misc/al_functions.simba}
  29. {$I SRL-OSR/SRL/core/antirandoms/C_AntiRandoms.simba}
  30. {$I SRL-OSR/SRL/misc/MiniReflection.simba}
  31.  
  32. var
  33. worldshopped, w, messedup, Cast, timer: integer;
  34. TimeTillBreak: string;
  35.  
  36. const
  37. {Fail Safes}
  38. Breakhandler = true; // Breaks settings.
  39. BreakTime1 = 45; // how long to play before breaking.
  40. BreakTime2 = 120; // ----
  41. BreakWait1 = 15; // how long to break for.
  42. BreakWait2 = 30; // -----
  43.  
  44.  
  45.  
  46. {Fail Safes}
  47. SpellColor= 9861723; // Humidify Color at the coords: 565,248, change it.
  48. debugScolor = false; // Debugs the Humidify Spell Color at the start.
  49. SafeTimer = 25000; // Maximum Fail Safe timer, logs out when it passes.
  50. AreaCheck = false; // assign a polygon area as 'your area'
  51. decoords = false; // Debugs your Coords from reflection to debugbox.
  52. XCord1 = 2920; // coords for the polygon.
  53. Xcord2 = 2940; // if script isn't inside coords, it will terminate.
  54. YCord1 = 5340; // a fail safe, can be disabled.
  55. YCord2 = 5360; // Uses reflection of course.
  56. RuneCheck = true; // Checks if you've run out of runes.
  57. HopPlayers= true; // hops worlds if another player appears in the area.
  58. Dotected = 1; // If More than X white dots, script Hops worlds.
  59. TermCheck = true; // If errors compile, it allows for termination.
  60.  
  61.  
  62. Procedure PlayerSetup;
  63. Begin
  64. HowManyPlayers := 1;
  65. NumberOfPlayers(HowManyPlayers);
  66. CurrentPlayer := 0;
  67. With Players[0] Do
  68. Begin
  69. Name := '';
  70. Pass := '';
  71. Nick := '';
  72. LampSkill := Skill_Agility;
  73. Active := True;
  74. End;
  75. End;
  76.  
  77. {Credits to SRL OSR Dev Team, i just added the Green Color to locate magic}
  78.  
  79. function GetGreenUptext: string;
  80. var
  81. WhiteT, BlueT, YellowT, OrangeT, GreenT, FoundText: string;
  82. begin
  83. WhiteT := GetTextAtExWrap(8, 8, 80, 21, 0, 5, 1, 14541281, 55, 'UpChars07');
  84. BlueT := GetTextAtExWrap(35, 8, 150, 21, 0, 5, 1, 13423640, 65, 'UpChars07');
  85. YellowT := GetTextAtExWrap(35, 8, 150, 21, 0, 5, 1, 1235160, 40, 'UpChars07');
  86. OrangeT := GetTextAtExWrap(35, 8, 150, 21, 0, 5, 1, 4687583, 53, 'UpChars07');
  87. GreenT := GetTextAtExWrap(8, 8, 150, 21, 0, 5, 1, 120577, 65, 'UpChars07');
  88. FoundText := WhiteT + ' ' + BlueT + YellowT + OrangeT + GreenT;
  89. FoundText := ReplaceWrap(FoundText, '.', '', [rfReplaceAll]);
  90. FoundText := ReplaceWrap(FoundText, '/', '', [rfReplaceAll]);
  91. FoundText := ReplaceWrap(FoundText, '\', '', [rfReplaceAll]);
  92. FoundText := ReplaceWrap(FoundText, ',', '', [rfReplaceAll]);
  93. FoundText := ReplaceWrap(FoundText, '*', '', [rfReplaceAll]);
  94. FoundText := ReplaceWrap(FoundText, '^', '', [rfReplaceAll]);
  95. FoundText := ReplaceWrap(FoundText, '"', '', [rfReplaceAll]);
  96. Result := FoundText;
  97. end;
  98.  
  99. {had to add this, so the command wouldn't break, only added green color}
  100.  
  101. function IsUpTextMultiCustom2(Text: TStringArray): Boolean;
  102. var
  103. TheText: string;
  104. i, n: Integer;
  105. begin
  106. TheText := GetGreenUptext;
  107. n := High(Text);
  108. for i := 0 to n do
  109. if (Pos(Text[i], TheText) > 0) then
  110. begin
  111. Result := True;
  112. Exit;
  113. end;
  114. end;
  115.  
  116. {Same as above}
  117. function WaitUpTextMulti2(S: TStringArray; Time: Integer): Boolean;
  118. var
  119. T: Integer;
  120. begin
  121. Result := false;
  122. T := GetSystemTime + Time;
  123. while (GetSystemTime < T) do
  124. begin
  125. if (IsUpTextMultiCustom2(S)) then
  126. begin
  127. Result := True;
  128. Exit;
  129. end;
  130. Wait(20 + Random(20));
  131. end;
  132. end;
  133.  
  134.  
  135.  
  136. procedure StartTime;
  137. begin // generates a random time for breaking, after a break is done this command is run again to generate next break time.
  138. Timer := GetTimeRunning + RandomRange(BreakTime1 * 60000, BreakTime2 * 60000);
  139. end;
  140.  
  141. procedure takebreaks;
  142. var
  143. T, BreakTimer: integer;
  144. Times: string;
  145. begin
  146. if (Breakhandler = false) then // If breaking is false then it exists.
  147. exit;
  148. if (GetTimeRunning >= Timer) then // If its time to break then...
  149. begin
  150. writeln('its time to take a break....');
  151. BreakTimer := Randomrange(BreakWait1 * 60000, BreakWait2 * 60000); // generates a break time between break1/2
  152. Times := (MsToTime(BreakTimer, Time_Formal)); // Converts the number to Hours/minutes
  153. writeln('Breaking for: ' + Times); // Prints the time we will be breaking for.
  154. marktime(t); // Marks time and logs out.
  155. repeat
  156. wait(400);
  157. logout;
  158. if not loggedin then
  159. break;
  160. until (not (loggedin));
  161. if (not (loggedin)) then // and the break begins...
  162. begin
  163. repeat
  164. wait(1000);
  165. if (TimeFromMark(t) >= BreakTimer) then
  166. break;
  167. until (TimeFromMark(t) >= BreakTimer);
  168. if (TimeFromMark(T) >= BreakTimer) then // if break is over then it restarts script
  169. begin
  170. writeln('break time is over, back to the script');
  171. StartTime; // loads the next timer for a break.
  172. exit;
  173. end;
  174. end;
  175. end;
  176. end;
  177.  
  178.  
  179. {random time - of waittime for activities}
  180. procedure WaitShortClick;
  181. begin
  182. if (not (loggedin)) then
  183. exit;
  184. case random(600) of
  185. 1..450: Wait(RandomRange(100, 150));
  186. 451..570: Wait(RandomRange(150, 200));
  187. 571..590: Wait(RandomRange(200, 250));
  188. 591..600: Wait(RandomRange(250, 400));
  189. end;
  190. end;
  191.  
  192. procedure WaitShortClick2;
  193. begin
  194. if (not (loggedin)) then
  195. exit;
  196. case random(600) of
  197. 1..450: Wait(RandomRange(400, 450));
  198. 451..570: Wait(RandomRange(450, 500));
  199. 571..590: Wait(RandomRange(500, 550));
  200. 591..600: Wait(RandomRange(550, 600));
  201. end;
  202. end;
  203.  
  204. procedure WaitHumanClick;
  205. begin
  206. if (not (loggedin)) then
  207. exit;
  208. case random(600) of
  209. 1..450: Wait(RandomRange(600, 650));
  210. 451..570: Wait(RandomRange(650, 700));
  211. 571..590: Wait(RandomRange(700, 750));
  212. 591..600: Wait(RandomRange(750, 800));
  213. end;
  214. end;
  215.  
  216. procedure WaitHumanClick2;
  217. begin
  218. if (not (loggedin)) then
  219. exit;
  220. case random(600) of
  221. 1..450: Wait(RandomRange(800, 1000));
  222. 451..570: Wait(RandomRange(1000, 1200));
  223. 571..590: Wait(RandomRange(1200, 1400));
  224. 591..600: Wait(RandomRange(1400, 2000));
  225. end;
  226. end;
  227.  
  228.  
  229. function NotchatTabAll: boolean;
  230. var
  231. Monster: TpointArray;
  232. TmpCts: Integer;
  233. begin
  234. if (not (loggedin)) then
  235. exit;
  236. tmpCTS := GetColorToleranceSpeed;
  237. ColorToleranceSpeed(2);
  238. SetColorSpeed2Modifiers(0.10, 0.34); // Looks for the Color on Chat tab activity "all"
  239. result := FindColorsTolerance(Monster, 4213586, 6, 482, 60, 497, 11); // If color isn't present, i.e chat tab changed, then its false and clicks chat tab to all
  240. ColorToleranceSpeed(0);
  241. SetColorSpeed2Modifiers(0.2, 0.2); // This is used to find text of the 'magic word' so when we run out of runes..
  242. end;
  243.  
  244.  
  245.  
  246. procedure MakeMyChatTabAll;
  247. begin
  248. if (not (loggedin)) then
  249. exit;
  250. writeln('Our chat Tab is not set to all, making chat tab to all');
  251. mousebox(12, 485, 45, 497, 1); // CLicks teh chat tab.
  252. end;
  253.  
  254. procedure ProgressReport;
  255. var
  256. Timeleft, XpPerhour, Casts, CastsPH: Integer;
  257. begin
  258. if (not (loggedin)) then
  259. exit;
  260. ClearDebug;
  261. FindNonInventoryRandoms(); // finds randoms.
  262. findnoninventoryrandoms; // and prints progress report.
  263. findcustomrandoms;
  264. XpPerhour := (3600 * (Cast) / ((GetTimeRunning / 1000)));
  265. Casts := (Cast) CastsPH := (3600 * (Casts) / ((GetTimeRunning / 1000)));
  266. timeleft := ((Timer) - (GetTimeRunning));
  267. TimeTillBreak := (MsToTime(timeleft, Time_Formal));
  268. WriteLn('* FHumidify v 1.0');
  269. WriteLn('* Runtime: ' + TimeRunning);
  270. Writeln('*');
  271. writeln('* No.Of Casts: ' + IntToStr(Cast) + ' Casts P/H: ' + IntToStr(XpPerhour) + ' Times messed up ' + IntToStr(messedup));
  272. if (Breakhandler = true) then
  273. Writeln('* Time till break : ' + (TimeTillBreak));
  274. end;
  275.  
  276.  
  277. { Simple anti ban that moves mosue to NPC yellow dots}
  278. function procedure;
  279. var
  280. I: Tpointarray;
  281. P: Integer;
  282. begin
  283. if (not (loggedin)) then
  284. exit;
  285. I := GetMiniMapDots('npc'); // Finds the mini map npc dots.
  286. if (length(I) > 0) then // Failsafe, if there are NPC dots then..
  287. begin
  288. SortTPAFrom(i, Point(MMCX, MMCY)); // Sorts them from center point. and enerates a mouse position for them using the tpa.
  289. P := random(length(I)) Mmouse(I[0].x, I[0].y, 3, 3); // Moves mosue to the center point! doesn't click.
  290. // This was made as a Boolean sometime during april last 2013 modified april 2014 to procedure as there is no boolean functionality in it.
  291. end;
  292. end;
  293.  
  294. procedure Keyboards;
  295. begin
  296. case random(5) of
  297. 0..2: // keyboard antibans
  298. begin
  299. KeyDown(37);
  300. WaitShortClick KeyUp(37); // moves key up/down.
  301. WaitShortClick KeyDown(40);
  302. WaitShortClick KeyUp(40);
  303. end;
  304. 3..4:
  305. begin
  306. KeyDown(39);
  307. WaitShortClick KeyUp(39);
  308. WaitShortClick KeyDown(38);
  309. WaitShortClick KeyUp(38);
  310. end;
  311. 5:
  312. begin
  313. KeyDown(38);
  314. WaitShortClick KeyUp(38);
  315. WaitShortClick KeyDown(39);
  316. WaitShortClick KeyUp(39);
  317. end;
  318. end;
  319. end;
  320.  
  321. procedure Antiban;
  322. begin
  323. if (not (loggedin)) then // Our antiban,
  324. exit;
  325. case random(100) of
  326. 0..56:
  327. begin
  328. end;
  329. 57..100:
  330. begin
  331. case random(150) of
  332. 10: hoverskill(skill_magic, false);
  333. 20: BoredHuman;
  334. 30: MMouseOffClient('top');
  335. 40: MMouseOffClient('left');
  336. 50: MMouseOffClient('right');
  337. 60: MMouseOffClient('bottom');
  338. 70: SmallRandomMouse;
  339. 80: RandomAngle(1);
  340. 90: RandomAngle(2);
  341. 100: PickUpMouse;
  342. 110: CompassMovement(10, 70, true);
  343. 120: HoverNearbyNpc; // Thats the procedure above
  344. 130: Keyboards; // Same as above
  345. 140: MissMouse(250, 250);
  346. 150: RandomMovement; // Rest are from the include.
  347. 160: CompassMovement(240, 300, true);
  348. 170: AdjustMouseSpeed(3, 10, 20);
  349. 180: RandomFKeys(true);
  350. 190: RandomTab(true);
  351. end;
  352. end;
  353. end;
  354. end;
  355.  
  356. procedure Termination;
  357. begin
  358. if (TermCheck = false) then // Ends our script
  359. exit;
  360. if (loggedin) then
  361. begin
  362. Writeln('we ran out of runes, or something really went wrong?, terminating script');
  363. wait(randomrange(3000, 5000));
  364. repeat
  365. if (not (loggedin)) then
  366. break;
  367. logout; // logs us out and ends the script.
  368. waithumanclick;
  369. if (not (loggedin)) then
  370. break;
  371. until (not (loggedin));
  372. if (not (loggedin)) then
  373. begin
  374. terminatescript;
  375. end;
  376. end;
  377. end;
  378.  
  379. function GotRunes: boolean;
  380. var
  381. x: integer;
  382. begin
  383. if (not (loggedin)) then
  384. exit;
  385. if (RuneCheck = false) then // If Its disabled by the user then exists.
  386. exit;
  387. if not GameTab(tab_magic) then // if we're not on mage tab then exists.
  388. exit;
  389. x := GetColor(565, 248) if (debugScolor = true) then // Finds the blue spell color
  390. begin
  391. writeln('Our Humidify Spell Color is: ' + IntToStr(x)); // If we're out of runes then it will be black and terminate.
  392. writeln('please set DebugSColor to false now');
  393. Termination; // ends our script.
  394. end;
  395. if (X = SpellColor) then // if Its blue then this is true!.
  396. result := true
  397. end;
  398.  
  399.  
  400.  
  401. function PlayersDetected: boolean;
  402. var
  403. P: Integer;
  404. begin
  405. if (not (loggedin)) then
  406. exit;
  407. if (HopPlayers = false) then
  408. exit;
  409. P := CountDots('white'); // counts player dots
  410. if (P > Dotected) then // if its more than the allowed amount, script will log out.
  411. begin
  412. writeln('we have more than one player on the map, logging out');
  413. result := true;
  414. end;
  415. end;
  416.  
  417. {Credits to Elffy & SRL OSR dev team, just had to copy paste it into script since
  418. Include didn't have it at the time}
  419.  
  420. Procedure OpenWScreen;
  421. begin // Opens our world screen.
  422. Result := False;
  423. if WorldScreen then // If its already there then exists
  424. exit; // IF we are logged in then exists.
  425. if Loggedin then
  426. Exit;
  427. if not WorldScreen then // If we're not on world screen Then it opens it.
  428. begin
  429. Mmouse(54, 475, 1, 1);
  430. WaitHumanClick;
  431. ClickMouse2(Mouse_Left); // There is no reason for this command to be a Boolean, so i changed it to a procedure.
  432. waithumanclick;
  433. end;
  434. end;
  435.  
  436. function whitecolor: boolean; // Detects the white color you would see once
  437. var // Your mouse is hovering a world
  438. Monster: TpointArray;
  439. TmpCts: Integer;
  440. begin
  441. tmpcts := GetColorToleranceSpeed;
  442. ColorToleranceSpeed(2);
  443. SetColorSpeed2Modifiers(0.22, 1.69);
  444. result := FindColorsTolerance(Monster, 9163999, 192, 67, 583, 469, 4);
  445. ColorToleranceSpeed(tmpcts);
  446. SetColorSpeed2Modifiers(0.2, 0.2);
  447. end;
  448.  
  449. {Our login loop}
  450. procedure loginloop;
  451. var
  452. badworlds: TIntegerArray;
  453. OurCurrentworld: Integer;
  454. begin
  455. badworlds := [308,316,325,337,365];
  456. OpenWorldScreen;
  457. repeat
  458. if whitecolor then // If we have our mouse hovering a clickable world then breaks the loop
  459. break;
  460. if not whitecolor then
  461. writeln('We have not hovered a world yet');
  462. case random(10) of
  463. 0..2: mouse(randomrange(397, 554), randomrange(78, 394), 1, 1, mouse_move);
  464. 3..4: mouse(randomrange(298, 462), randomrange(200, 392), 1, 1, mouse_move);
  465. 5..6: mouse(randomrange(205, 555), randomrange(80, 154), 1, 1, mouse_move);
  466. 7..10: mouse(randomrange(211, 555), randomrange(246, 367), 1, 1, mouse_move);
  467. end;
  468. until (whitecolor)
  469. if whitecolor then
  470. begin
  471. clickmouse2(mouse_left); // Clicks the world as it is selected.
  472. waithumanclick;
  473. currentworld;
  474. waithumanclick;
  475. OurCurrentworld := CurrentWorldLS // Finds what our current world is
  476. waithumanclick;
  477. if InIntArray(Badworlds,OurCurrentworld) then // If its a bad one then exists
  478. exit; // Bads are: f2p, Pvp and high risk world
  479. waithumanclick;
  480. loginplayer; // if not then it logs in and resumes script.
  481. exit;
  482. end;
  483. end;
  484.  
  485. procedure HopWorlds;
  486. begin
  487. if (HopPlayers = false) then // if world hopping is false then exists.
  488. exit;
  489. if (loggedin) then // if we are logged in then it starts..
  490. begin
  491. Writeln('We have detected a player nearby, hopping worlds');
  492. repeat
  493. if (not (loggedin)) then
  494. break;
  495. logout; // logs us out .
  496. waithumanclick;
  497. if (not (loggedin)) then
  498. break;
  499. until (not (loggedin));
  500. if (not (loggedin)) then
  501. begin
  502. writeln(' we managed to log out after a player was detected.');
  503. end; // once we are logged, that's it, loginloop will take over and log us out.
  504. end;
  505. end;
  506.  
  507. function BowlWater: boolean;
  508. var
  509. TPA: TpointArray;
  510. begin
  511. if (not (loggedin)) then
  512. exit; // Finds the bowl Of water when its full
  513. ColorToleranceSpeed(2);
  514. SetColorSpeed2Modifiers(0.52, 1.09);
  515. result := FindColorsTolerance(TPA, 8415075, 565, 247, 592, 270, 1);
  516. ColorToleranceSpeed(1);
  517. SetColorSpeed2Modifiers(0.02, 0.2);
  518. end;
  519.  
  520. function InsideSafeSpot: boolean;
  521. begin
  522. if (not (loggedin)) then
  523. exit;
  524. result := R_inPolygon([point(xcord1, ycord1), point(Xcord1, ycord2), point(xcord2, ycord2), point(xcord2, ycord2)]);
  525. if (result = false) then
  526. begin // A fail safe using reflection, detects the position the player designed as his training area.
  527. writeln('we are lost!');
  528. termination; // if its not inside then it starts the termination procedure.
  529. end;
  530. end;
  531.  
  532.  
  533.  
  534.  
  535. procedure Clickbowl;
  536. begin
  537. if not loggedin then
  538. exit;
  539. if (AreaCheck = true) then
  540. InsideSafeSpot;
  541. if WaitUpTextMulti2(['Empty'], 300) then
  542. begin
  543. clickmouse2(mouse_left);
  544. case random(100) of
  545. 0..50: waithumanclick; // if the mouse is already on the bowl
  546. 50..60: waitshortclick;
  547. 61..80: waitshortclick2;
  548. 81..95: waithumanclick2;
  549. 96.100: antiban;
  550. end;
  551. exit;
  552. end;
  553. case random(100) of
  554. 0..50: waitshortclick; // Loads of wait times
  555. 50..60: waitshortclick2;
  556. 61..80: waithumanclick;
  557. 81..95: waithumanclick2;
  558. 96.100: antiban;
  559. end;
  560. case random(20) of
  561. 0..16: Mouse(RandomRange(572, 574), RandomRange(251, 253), random(1), random(1), mouse_move);
  562. 17..18: Mouse(RandomRange(575, 575), RandomRange(260, 262), random(1), random(1), mouse_move);
  563. 19..20: Mouse(RandomRange(572, 575), RandomRange(255, 270), random(1), random(1), mouse_move); // First inventory Slot,
  564. end;
  565. if WaitUpTextMulti2(['Empty'], 300) then
  566. begin
  567. clickmouse2(mouse_left);
  568. case random(100) of
  569. 0..50: waithumanclick; // Empties it and does wait/antibans.
  570. 50..60: waitshortclick;
  571. 61..80: waitshortclick2;
  572. 81..95: waithumanclick2;
  573. 96.100: antiban;
  574. end;
  575. end;
  576. end;
  577.  
  578. procedure clickmagic;
  579. var
  580. t: integer;
  581. begin
  582. if not loggedin then
  583. exit;
  584. if (AreaCheck = true) then
  585. InsideSafeSpot; // Goes to the magic tab and clicks the Humidify spell.
  586. if BowlWater then
  587. exit; // If we already have the bowl of water, we can't humidify it :p.
  588. case random(10) of
  589. 0..8: FTab(tab_magic); // Switches to mage tab.
  590. 9..10: GameTab(tab_magic);
  591. end;
  592. case random(100) of
  593. 0..50: waithumanclick;
  594. 50..60: waitshortclick;
  595. 61..80: waitshortclick2; // a small wait time or antiban.
  596. 81..95: waithumanclick2;
  597. 96.100: antiban;
  598. end;
  599. if gametab(tab_magic) then
  600. begin
  601. if not GotRunes then // if we're out of runes i.e no blue color on the spell then ends.
  602. Termination;
  603. case random(10) of
  604. 0..8: Mouse(RandomRange(571, 574), RandomRange(251, 253), random(1), random(1), mouse_move);
  605. 9..10: Mouse(RandomRange(560, 570), RandomRange(247, 260), random(1), random(1), mouse_move); // moves mouse to the humidify spot
  606. end;
  607. if WaitUpTextMulti2(['Cast Humidify'], 300) then // If the Cast option is in the uptext... We did it right!
  608. begin
  609. clickmouse2(mouse_left);
  610. case random(10) of
  611. 0..8: FTab(tab_Inv); // clicks on it, it doesn't automatically switch you to inv tab.
  612. 9..10: GameTab(tab_Inv);
  613. end;
  614. Inc(cast);
  615. progressreport; // Prints progress and begins a fail safe to see if it was done.
  616. marktime(t);
  617. repeat
  618. wait(400);
  619. if not loggedin then
  620. exit;
  621. if BowlWater then
  622. exit; // This is a short, just an extra fail safe.
  623. if not gametab(tab_inv) then // If we didn't find the bowl of water then we messed up!.
  624. gametab(tab_inv);
  625. until (TimeFromMark(t) >= SafeTimer) or (bowlwater);
  626. if (TimeFromMark(T) >= SafeTimer) then
  627. begin
  628. writeln('something went wrong, the bowl full of water never appeared');
  629. inc(messedup); // If we messed up somehow, we'll just log out and log back in. Just a really extra fail safe, should never happen.
  630. repeat
  631. wait(400);
  632. Logout;
  633. if not loggedin then
  634. exit;
  635. Logout;
  636. until (not loggedin)
  637. end;
  638. end
  639. else
  640. begin // We didn't find the Humidify cast in uptext.
  641. writeln('we messed up, we dont have cast humidify in select, probably a CPU leak issue from client side');
  642. Mouse(RandomRange(740, 755), RandomRange(290, 330), random(2), random(2), mouse_left);
  643. inc(messedup); // Clicks far right on the screen to unclick any mouse movement.
  644. case random(100) of
  645. 0..50: waithumanclick;
  646. 50..60: waitshortclick;
  647. 61..80: waitshortclick2;
  648. 81..95: waithumanclick2;
  649. 96.100: antiban;
  650. end;
  651. end;
  652. end;
  653. end;
  654.  
  655. {our second main loop}
  656. procedure magicloop;
  657. begin
  658. if not loggedin then // if we're not logged in then exit!
  659. exit;
  660. takebreaks;
  661. if PlayersDetected then // if players are detect then log us out and hop!
  662. HopWorlds;
  663. if NotchatTabAll then // if We're not on 'all' chat tab, then make it on all so we can know when we run out of runes.
  664. MakeMyChatTabAll;
  665. if (AreaCheck = true) then // if we enabled training area checks, then check it.
  666. InsideSafeSpot;
  667. if BowlWater then // If we have the bowl of water then empty it.
  668. clickbowl;
  669. if not BowlWater then // if we don't have the bowl of water then humidify it!.
  670. Clickmagic;
  671. end;
  672.  
  673. procedure mainloop;
  674. begin
  675. if not loggedin then // and it all breaks down to..
  676. exit;
  677. if loggedin then
  678. magicloop;
  679. end;
  680.  
  681. procedure DebugPosition;
  682. var
  683. t: integer;
  684. point1: tpoint; // Debugs our position so we can create polygon cords for safe spot.
  685. begin
  686. marktime(t);
  687. repeat
  688. wait(400);
  689. Point1 := R_GetTileGlobal;
  690. writeln(point1);
  691. FindNonInventoryRandoms();
  692. findnoninventoryrandoms;
  693. findcustomrandoms;
  694. until (TimeFromMark(t) >= SafeTimer);
  695. end;
  696.  
  697. procedure DebuggSColor;
  698. var
  699. t: integer;
  700. begin
  701. marktime(t); // Debugs the Blue Color when humidify is visible in magic tab. (I.E not black/out of runes).
  702. repeat
  703. wait(400);
  704. GotRunes;
  705. FindNonInventoryRandoms();
  706. findnoninventoryrandoms;
  707. findcustomrandoms;
  708. until (TimeFromMark(t) >= SafeTimer);
  709. end;
  710.  
  711. procedure startitup;
  712. begin
  713. Playersetup;
  714. SetupSRL;
  715. ActivateClient;
  716. SRL_CombatRandoms := False; // Starts our script up
  717. StartTime;
  718. if (decoords = true) then // if a user wants to debug cords..
  719. DebugPosition;
  720. if (debugScolor = true) then // if a user wants to debug the color.
  721. DebuggSColor; // after both are done, we'll get back to the script!.
  722. end;
  723.  
  724. begin
  725. startitup;
  726. repeat
  727. wait(400);
  728. if loggedin then
  729. mainloop;
  730. if not loggedin then
  731. loginplayer;
  732. until (false);
  733. writeln('how did we get here...');
  734. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement