zamaro

Fhumidify done

Apr 4th, 2014
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.83 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/Reflection/Reflection.simba}
  29. {$I SRL-OSR/SRL/misc/al_functions.simba}
  30.  
  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; // How many players are you using?
  65. NumberOfPlayers(HowManyPlayers);
  66. CurrentPlayer := 0;
  67. With Players[0] Do // What are the preferences for each player?
  68. Begin
  69. Name := 'zezima';
  70. Pass := 'iscool';
  71. Nick := 'ezim';
  72. LampSkill := Skill_Herblore;
  73. Active := True;
  74. End;
  75. End;
  76.  
  77.  
  78.  
  79. {Credits to SRL OSR Dev Team, i just added the Green Color to locate magic}
  80.  
  81. function GetGreenUptext: string;
  82. var
  83. WhiteT, BlueT, YellowT, OrangeT, GreenT, FoundText: string;
  84. begin
  85. WhiteT := GetTextAtExWrap(8, 8, 80, 21, 0, 5, 1, 14541281, 55, 'UpChars07');
  86. BlueT := GetTextAtExWrap(35, 8, 150, 21, 0, 5, 1, 13423640, 65, 'UpChars07');
  87. YellowT := GetTextAtExWrap(35, 8, 150, 21, 0, 5, 1, 1235160, 40, 'UpChars07');
  88. OrangeT := GetTextAtExWrap(35, 8, 150, 21, 0, 5, 1, 4687583, 53, 'UpChars07');
  89. GreenT := GetTextAtExWrap(8, 8, 150, 21, 0, 5, 1, 120577, 65, 'UpChars07');
  90. FoundText := WhiteT + ' ' + BlueT + YellowT + OrangeT + GreenT;
  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. FoundText := ReplaceWrap(FoundText, '^', '', [rfReplaceAll]);
  97. FoundText := ReplaceWrap(FoundText, '"', '', [rfReplaceAll]);
  98. Result := FoundText;
  99. end;
  100.  
  101. {had to add this, so the command wouldn't break, only added green color}
  102.  
  103. function IsUpTextMultiCustom2(Text: TStringArray): Boolean;
  104. var
  105. TheText: string;
  106. i, n: Integer;
  107. begin
  108. TheText := GetGreenUptext;
  109. n := High(Text);
  110. for i := 0 to n do
  111. if (Pos(Text[i], TheText) > 0) then
  112. begin
  113. Result := True;
  114. Exit;
  115. end;
  116. end;
  117.  
  118. {Same as above}
  119. function WaitUpTextMulti2(S: TStringArray; Time: Integer): Boolean;
  120. var
  121. T: Integer;
  122. begin
  123. Result := false;
  124. T := GetSystemTime + Time;
  125. while (GetSystemTime < T) do
  126. begin
  127. if (IsUpTextMultiCustom2(S)) then
  128. begin
  129. Result := True;
  130. Exit;
  131. end;
  132. Wait(20 + Random(20));
  133. end;
  134. end;
  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. {Termination makes sure we end our script at any cost, it still tries to end it safely first and if that fails, it ends it regardless}
  142. procedure Termination(const Status: string);
  143. begin
  144. if (TermCheck = false) then // Users can Enable/disable termination checks
  145. exit;
  146. writeln(Status); // Prints our reason for termination
  147. if loggedin then // if we're logged in, it will log us out.
  148. begin
  149. if WaitFunc(@ LogOut, 500, RandomRange(8000, 20000)) then // waits for the script to log out.
  150. terminatescript
  151. else
  152. terminatescript; // if it doesn't manage to log out, it ends anyway
  153. end else
  154. terminatescript; // and if we're not loggedin it ends.
  155. end;
  156.  
  157. function LogMeOut: boolean;
  158. begin
  159. writeln('Logging out..');
  160. if WaitFunc(@ LogOut, 500, RandomRange(8000, 20000)) then
  161. begin //Logging out is buggy right now on OSRS, it needs some extra time
  162. writeln('We have managed to log out');
  163. result := true;
  164. end else //ends script if we fail to logout
  165. termination('We have failed to log out, ending script');
  166. end;
  167.  
  168.  
  169. procedure TakeBreaks;
  170. var
  171. T, BreakTimer: integer;
  172. begin
  173. if (BreakHandler = false) then
  174. Exit;
  175. if (GetTimeRunning >= Timer) then // Checks if its time to break
  176. begin
  177. BreakTimer := Randomrange(BreakWait1 * 60000, BreakWait2 * 60000); // Calculates a time to break for
  178. MarkTime(T);
  179. writeln('It is time to take a break');
  180. WriteLn('Breaking for: ' + (MsToTime(BreakTimer, Time_Formal)));
  181. if LogMeOut then
  182. begin
  183. while (TimeFromMark(T) < BreakTimer) do // Credits & Props to P1ng for proper formating advise!
  184. Wait(RandomRange(1500, 2500)); // wait time is important so Simba can cycle throug the memory slowly without causing CPU leaks
  185. WriteLn('Completed break, re-starting script');
  186. StartTime; // Calculates next break's timer.
  187. end else // if it fails to log out then script ends.
  188. termination('We have failed to log out for our break, ending script');
  189. end;
  190. end;
  191.  
  192. {random time - of waittime for activities}
  193. procedure WaitShortClick;
  194. begin
  195. if (not (loggedin)) then
  196. exit;
  197. case random(600) of
  198. 1..450: Wait(RandomRange(100, 150));
  199. 451..570: Wait(RandomRange(150, 200));
  200. 571..590: Wait(RandomRange(200, 250));
  201. 591..600: Wait(RandomRange(250, 400));
  202. end;
  203. end;
  204.  
  205. procedure WaitShortClick2;
  206. begin
  207. if (not (loggedin)) then
  208. exit;
  209. case random(600) of
  210. 1..450: Wait(RandomRange(400, 450));
  211. 451..570: Wait(RandomRange(450, 500));
  212. 571..590: Wait(RandomRange(500, 550));
  213. 591..600: Wait(RandomRange(550, 600));
  214. end;
  215. end;
  216.  
  217. procedure WaitHumanClick;
  218. begin
  219. if (not (loggedin)) then
  220. exit;
  221. case random(600) of
  222. 1..450: Wait(RandomRange(600, 650));
  223. 451..570: Wait(RandomRange(650, 700));
  224. 571..590: Wait(RandomRange(700, 750));
  225. 591..600: Wait(RandomRange(750, 800));
  226. end;
  227. end;
  228.  
  229. procedure WaitHumanClick2;
  230. begin
  231. if (not (loggedin)) then
  232. exit;
  233. case random(600) of
  234. 1..450: Wait(RandomRange(800, 1000));
  235. 451..570: Wait(RandomRange(1000, 1200));
  236. 571..590: Wait(RandomRange(1200, 1400));
  237. 591..600: Wait(RandomRange(1400, 2000));
  238. end;
  239. end;
  240.  
  241. function NotchatTabAll: boolean;
  242. var
  243. Monster: TpointArray;
  244. TmpCts: Integer;
  245. begin
  246. if (not (loggedin)) then
  247. exit;
  248. tmpCTS := GetColorToleranceSpeed;
  249. ColorToleranceSpeed(2);
  250. SetColorSpeed2Modifiers(0.10, 0.34); // Looks for the Color on Chat tab activity "all"
  251. 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
  252. ColorToleranceSpeed(0);
  253. SetColorSpeed2Modifiers(0.2, 0.2); // This is used to find text of the 'magic word' so when we run out of runes..
  254. end;
  255.  
  256.  
  257. procedure MakeMyChatTabAll;
  258. begin
  259. if (not (loggedin)) then
  260. exit;
  261. writeln('Our chat Tab is not set to all, making chat tab to all');
  262. mousebox(12, 485, 45, 497, 1); // CLicks teh chat tab.
  263. end;
  264.  
  265. procedure ProgressReport;
  266. var
  267. Timeleft, XpPerhour, Casts, CastsPH: Integer;
  268. begin
  269. if (not (loggedin)) then
  270. exit;
  271. ClearDebug;
  272. FindNonInventoryRandoms(); // finds randoms.
  273. findnoninventoryrandoms; // and prints progress report.
  274. XpPerhour := (3600 * (Cast) / ((GetTimeRunning / 1000)));
  275. Casts := (Cast) CastsPH := (3600 * (Casts) / ((GetTimeRunning / 1000)));
  276. timeleft := ((Timer) - (GetTimeRunning));
  277. TimeTillBreak := (MsToTime(timeleft, Time_Formal));
  278. WriteLn('* FHumidify v 1.0');
  279. WriteLn('* Runtime: ' + TimeRunning);
  280. Writeln('*');
  281. writeln('* No.Of Casts: ' + IntToStr(Cast) + ' Casts P/H: ' + IntToStr(XpPerhour) + ' Times messed up ' + IntToStr(messedup));
  282. if (Breakhandler = true) then
  283. Writeln('* Time till break : ' + (TimeTillBreak));
  284. end;
  285.  
  286. procedure HoverNearbyNpc;
  287. var
  288. I: Tpointarray;
  289. P: Integer;
  290. begin
  291. if (not (loggedin)) then
  292. exit;
  293. I := GetMiniMapDots('npc'); // Gets all the NPC dots on the screen
  294. if (length(I) > 0) then // If the Length of the TPA is Larger than 0 then continues..
  295. begin
  296. SortTPAFrom(i, Point(MMCX, MMCY)); // Sorts them from Middle points of minimaps
  297. P := random(length(I)); // Assigns a length to the TPA
  298. Mmouse(I[0].x, I[0].y, 3, 3); // Moves mouse on the NPC mini map dot.
  299. end;
  300. end;
  301.  
  302. procedure Keyboards;
  303. begin
  304. case random(5) of
  305. 0..2: // keyboard antibans
  306. begin
  307. KeyDown(37);
  308. WaitShortClick KeyUp(37); // moves key up/down.
  309. WaitShortClick KeyDown(40);
  310. WaitShortClick KeyUp(40);
  311. end;
  312. 3..4:
  313. begin
  314. KeyDown(39);
  315. WaitShortClick KeyUp(39);
  316. WaitShortClick KeyDown(38);
  317. WaitShortClick KeyUp(38);
  318. end;
  319. 5:
  320. begin
  321. KeyDown(38);
  322. WaitShortClick KeyUp(38);
  323. WaitShortClick KeyDown(39);
  324. WaitShortClick KeyUp(39);
  325. end;
  326. end;
  327. end;
  328.  
  329. procedure Antiban;
  330. begin
  331. if (not (loggedin)) then // Our antiban,
  332. exit;
  333. case random(100) of
  334. 0..56:
  335. begin
  336. end;
  337. 57..100:
  338. begin
  339. case random(150) of
  340. 10: hoverskill(skill_magic, false);
  341. 20: BoredHuman;
  342. 30: MMouseOffClient('top');
  343. 40: MMouseOffClient('left');
  344. 50: MMouseOffClient('right');
  345. 60: MMouseOffClient('bottom');
  346. 70: SmallRandomMouse;
  347. 80: RandomAngle(1);
  348. 90: RandomAngle(2);
  349. 100: PickUpMouse;
  350. 110: CompassMovement(10, 70, true);
  351. 120: HoverNearbyNpc; // Thats the procedure above
  352. 130: Keyboards; // Same as above
  353. 140: MissMouse(250, 250);
  354. 150: RandomMovement; // Rest are from the include.
  355. 160: CompassMovement(240, 300, true);
  356. 170: AdjustMouseSpeed(3, 10, 20);
  357. 180: RandomFKeys(true);
  358. 190: RandomTab(true);
  359. end;
  360. end;
  361. end;
  362. end;
  363.  
  364.  
  365. function GotRunes: boolean;
  366. var
  367. x: integer;
  368. begin
  369. if (not (loggedin)) then
  370. exit;
  371. if (RuneCheck = false) then // If Its disabled by the user then exists.
  372. exit;
  373. if not GameTab(tab_magic) then // if we're not on mage tab then exists.
  374. exit;
  375. x := GetColor(565, 248) if (debugScolor = true) then // Finds the blue spell color
  376. begin
  377. writeln('Our Humidify Spell Color is: ' + IntToStr(x)); // If we're out of runes then it will be black and terminate.
  378. writeln('please set DebugSColor to false now');
  379. Termination('We have received the correct color for the Humidify spell spot, please edit it and disable Rune color debugging');
  380. end;
  381. if (X = SpellColor) then // if Its blue then this is true!.
  382. result := true
  383. end;
  384.  
  385. function PlayersDetected: boolean;
  386. var
  387. P: Integer;
  388. begin
  389. if (not (loggedin)) then
  390. exit;
  391. if (HopPlayers = false) then
  392. exit;
  393. P := CountDots('white'); // counts player dots
  394. if (P > Dotected) then // if its more than the allowed amount, script will log out.
  395. begin
  396. writeln('we have more than one player on the map, logging out');
  397. result := true;
  398. end;
  399. end;
  400.  
  401. {Credits to Elffy & SRL OSR dev team, just had to copy paste it into script since
  402. Include didn't have it at the time}
  403.  
  404. Procedure OpenWScreen;
  405. begin // Opens our world screen.
  406. if WorldScreen then // If its already there then exists
  407. exit; // IF we are logged in then exists.
  408. if Loggedin then
  409. Exit;
  410. if not WorldScreen then // If we're not on world screen Then it opens it.
  411. begin
  412. Mmouse(54, 475, 1, 1);
  413. ClickMouse2(Mouse_Left);
  414. waithumanclick;
  415. end;
  416. end;
  417.  
  418. function whitecolor: boolean; // Detects the white color you would see once
  419. var // Your mouse is hovering a world
  420. Monster: TpointArray;
  421. TmpCts: Integer;
  422. begin
  423. tmpcts := GetColorToleranceSpeed;
  424. ColorToleranceSpeed(2);
  425. SetColorSpeed2Modifiers(0.22, 1.69);
  426. result := FindColorsTolerance(Monster, 9163999, 192, 67, 583, 469, 4);
  427. ColorToleranceSpeed(tmpcts);
  428. SetColorSpeed2Modifiers(0.2, 0.2);
  429. end;
  430.  
  431.  
  432. procedure loginloop;
  433. var
  434. badworlds: TIntegerArray;
  435. OurCurrentworld: Integer;
  436. begin
  437. badworlds := [308, 316, 325, 337, 365];
  438. OpenWorldScreen;
  439. waithumanclick;
  440. repeat
  441. if whitecolor then
  442. break;
  443. if not whitecolor then
  444. writeln('We have not hovered a world yet');
  445. case random(10) of
  446. 0..2: mouse(randomrange(397, 554), randomrange(78, 394), 1, 1, mouse_move);
  447. 3..4: mouse(randomrange(298, 462), randomrange(200, 392), 1, 1, mouse_move);
  448. 5..6: mouse(randomrange(205, 555), randomrange(80, 154), 1, 1, mouse_move);
  449. 7..10: mouse(randomrange(211, 555), randomrange(246, 367), 1, 1, mouse_move);
  450. end; // Obviously its bad to just randomly move mouse.. I've tried and fail in creating a proper math formula to resolve this
  451. until (whitecolor); // The above works perfectly :).
  452. if whitecolor then
  453. begin
  454. clickmouse2(mouse_left); // Clicks the world as it is selected.
  455. waithumanclick;
  456. currentworld;
  457. waithumanclick;
  458. OurCurrentworld := CurrentWorldLS;
  459. waithumanclick; // Finds what our current world is
  460. if InIntArray(Badworlds, OurCurrentworld) then //If its a bad one then exists
  461. exit; // Bads are: f2p, Pvp and high risk world, it exists and repeats process
  462. waithumanclick;
  463. loginplayer; // if not then it logs in and resumes script.
  464. exit; // This is a bit useless but just another extra fail safe.
  465. end;
  466. end;
  467.  
  468. function BowlWater: boolean;
  469. var
  470. TPA: TpointArray;
  471. begin
  472. if (not (loggedin)) then
  473. exit; // Finds the bowl Of water when its full
  474. ColorToleranceSpeed(2);
  475. SetColorSpeed2Modifiers(0.52, 1.09);
  476. result := FindColorsTolerance(TPA, 8415075, 565, 247, 592, 270, 1);
  477. ColorToleranceSpeed(1);
  478. SetColorSpeed2Modifiers(0.02, 0.2);
  479. end;
  480.  
  481. function InsideSafeSpot: boolean;
  482. begin
  483. if (not (loggedin)) then
  484. exit;
  485. result := R_inPolygon([point(xcord1, ycord1), point(Xcord1, ycord2), point(xcord2, ycord2), point(xcord2, ycord2)]);
  486. if (result = false) then
  487. begin // A fail safe using reflection, detects the position the player designed as his training area.
  488. writeln('we are lost!');
  489. termination('We are not in Safe spot, terminating, if you dont wish to use Safe spot detection then set it to false!');; // if its not inside then it starts the termination procedure.
  490. end;
  491. end;
  492.  
  493. procedure Clickbowl;
  494. begin
  495. if not loggedin then
  496. exit;
  497. if (AreaCheck = true) then
  498. InsideSafeSpot;
  499. if WaitUpTextMulti2(['Empty'], 300) then
  500. begin
  501. clickmouse2(mouse_left);
  502. case random(100) of
  503. 0..50: waithumanclick; // if the mouse is already on the bowl
  504. 50..60: waitshortclick;
  505. 61..80: waitshortclick2;
  506. 81..95: waithumanclick2;
  507. 96.100: antiban;
  508. end;
  509. exit;
  510. end;
  511. case random(100) of
  512. 0..50: waitshortclick; // Loads of wait times
  513. 50..60: waitshortclick2;
  514. 61..80: waithumanclick;
  515. 81..95: waithumanclick2;
  516. 96.100: antiban;
  517. end;
  518. case random(20) of
  519. 0..16: Mouse(RandomRange(572, 574), RandomRange(251, 253), random(1), random(1), mouse_move);
  520. 17..18: Mouse(RandomRange(575, 575), RandomRange(260, 262), random(1), random(1), mouse_move);
  521. 19..20: Mouse(RandomRange(572, 575), RandomRange(255, 270), random(1), random(1), mouse_move); // First inventory Slot,
  522. end;
  523. if WaitUpTextMulti2(['Empty'], 300) then
  524. begin
  525. clickmouse2(mouse_left);
  526. case random(100) of
  527. 0..50: waithumanclick; // Empties it and does wait/antibans.
  528. 50..60: waitshortclick;
  529. 61..80: waitshortclick2;
  530. 81..95: waithumanclick2;
  531. 96.100: antiban;
  532. end;
  533. end;
  534. end;
  535.  
  536. procedure clickmagic;
  537. var
  538. t: integer;
  539. begin
  540. if not loggedin then
  541. exit;
  542. if (AreaCheck = true) then
  543. InsideSafeSpot; // Goes to the magic tab and clicks the Humidify spell.
  544. if BowlWater then
  545. exit; // If we already have the bowl of water, we can't humidify it :p.
  546. case random(10) of
  547. 0..8: FTab(tab_magic); // Switches to mage tab.
  548. 9..10: GameTab(tab_magic);
  549. end;
  550. case random(100) of
  551. 0..50: waithumanclick;
  552. 50..60: waitshortclick;
  553. 61..80: waitshortclick2; // a small wait time or antiban.
  554. 81..95: waithumanclick2;
  555. 96.100: antiban;
  556. end;
  557. if gametab(tab_magic) then
  558. begin
  559. if not GotRunes then // if we're out of runes i.e no blue color on the spell then ends.
  560. Termination('we Dont have any runes left, ending script');
  561. case random(10) of
  562. 0..8: Mouse(RandomRange(571, 574), RandomRange(251, 253), random(1), random(1), mouse_move);
  563. 9..10: Mouse(RandomRange(560, 570), RandomRange(247, 260), random(1), random(1), mouse_move); // moves mouse to the humidify spot
  564. end;
  565. if WaitUpTextMulti2(['Cast Humidify'], 300) then // If the Cast option is in the uptext... We did it right!
  566. begin
  567. clickmouse2(mouse_left);
  568. case random(10) of
  569. 0..8: FTab(tab_Inv); // clicks on it, it doesn't automatically switch you to inv tab.
  570. 9..10: GameTab(tab_Inv);
  571. end;
  572. Inc(cast);
  573. progressreport; // Prints progress and begins a fail safe to see if it was done.
  574. marktime(t);
  575. repeat
  576. wait(400);
  577. if not loggedin then
  578. exit;
  579. if BowlWater then
  580. exit; // This is a short, just an extra fail safe.
  581. if not gametab(tab_inv) then // If we didn't find the bowl of water then we messed up!.
  582. gametab(tab_inv);
  583. until (TimeFromMark(t) >= SafeTimer) or (bowlwater);
  584. if (TimeFromMark(T) >= SafeTimer) then
  585. begin
  586. writeln('something went wrong, the bowl full of water never appeared');
  587. 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.
  588. repeat
  589. wait(400);
  590. Logout;
  591. if not loggedin then
  592. exit;
  593. Logout;
  594. until (not loggedin)
  595. end;
  596. end
  597. else
  598. begin // We didn't find the Humidify cast in uptext.
  599. writeln('we messed up, we dont have cast humidify in select, probably a CPU leak issue from client side');
  600. Mouse(RandomRange(740, 755), RandomRange(290, 330), random(2), random(2), mouse_left);
  601. inc(messedup); // Clicks far right on the screen to unclick any mouse movement.
  602. case random(100) of
  603. 0..50: waithumanclick;
  604. 50..60: waitshortclick;
  605. 61..80: waitshortclick2;
  606. 81..95: waithumanclick2;
  607. 96.100: antiban;
  608. end;
  609. end;
  610. end;
  611. end;
  612.  
  613. {our second main loop}
  614. procedure magicloop;
  615. begin
  616. if not loggedin then // if we're not logged in then exit!
  617. exit;
  618. takebreaks;
  619. if PlayersDetected and (HopPlayers = true) then // if players are detect then log us out and hop!
  620. LogMeOut;
  621. 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.
  622. MakeMyChatTabAll;
  623. if (AreaCheck = true) then // if we enabled training area checks, then check it.
  624. InsideSafeSpot;
  625. if BowlWater then // If we have the bowl of water then empty it.
  626. clickbowl;
  627. if not BowlWater then // if we don't have the bowl of water then humidify it!.
  628. Clickmagic;
  629. end;
  630.  
  631. procedure mainloop;
  632. begin
  633. if not loggedin then // and it all breaks down to..
  634. exit;
  635. if loggedin then
  636. magicloop;
  637. end;
  638.  
  639.  
  640. procedure DebugPosition;
  641. var
  642. t: integer;
  643. point1: tpoint; // Debugs our position so we can create polygon cords for safe spot.
  644. begin
  645. marktime(t);
  646. repeat
  647. wait(400);
  648. Point1 := R_GetTileGlobal;
  649. writeln(point1);
  650. FindNonInventoryRandoms();
  651. findnoninventoryrandoms;
  652. until (TimeFromMark(t) >= SafeTimer);
  653. end;
  654.  
  655. procedure DebuggSColor;
  656. var
  657. t: integer;
  658. begin
  659. marktime(t); // Debugs the Blue Color when humidify is visible in magic tab. (I.E not black/out of runes).
  660. repeat
  661. wait(400);
  662. GotRunes;
  663. FindNonInventoryRandoms();
  664. findnoninventoryrandoms;
  665. until (TimeFromMark(t) >= SafeTimer);
  666. end;
  667.  
  668. procedure startitup;
  669. begin
  670. Playersetup;
  671. SetupSRL;
  672. ActivateClient;
  673. SRL_CombatRandoms := False; // Starts our script up
  674. StartTime;
  675. if (decoords = true) then // if a user wants to debug cords..
  676. DebugPosition;
  677. if (debugScolor = true) then // if a user wants to debug the color.
  678. DebuggSColor; // after both are done, we'll get back to the script!.
  679. end;
  680.  
  681. begin
  682. startitup;
  683. repeat
  684. wait(400);
  685. if loggedin then
  686. mainloop;
  687. if not loggedin then
  688. loginplayer;
  689. until (false);
  690. writeln('how did we get here...');
  691. end.
Advertisement
Add Comment
Please, Sign In to add comment