zamaro

NMZ booster

Jun 14th, 2014
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.19 KB | None | 0 0
  1. //Chris
  2.  
  3.  
  4. program Script;
  5. {$DEFINE SMART8}
  6. {$I SRL-OSR/SRL.Simba}
  7. {$I SRL-OSR/SRL/Reflection/Reflection.simba}
  8. {$i SRL-OSR\SRL\misc\debug.simba}
  9. {$i SRL-OSR\SRL\misc\SmartGraphics.simba}
  10. {$I F_AntiRandoms.simba}
  11.  
  12.  
  13. var
  14. rang1,SpecTimer, Timer, Sleeptimer, Str1, Att1, Def1, Hp1: integer;
  15. PointInsideCave: tpoint;
  16. CaveBottomRight, CavetopRight, Cavebottomleft, Cavetopleft: tpoint;
  17. TimeTillSpec, TimeTillLongBreak, TimeTillBreak: string;
  18. DrinkTime: integer;
  19. DoneChest, DoneOverloads, DoneAbsobs: boolean;
  20. V: TVariantArray;
  21. MeInCave, myposinsidecave: tpoint;
  22.  
  23. const
  24. bankpin = ''; // your bank pin.
  25. TermCheck = true; // Terminate if lost?.
  26. Overloads = '40'; // How many overloads to Draw?.
  27. Absorbs = '72'; // How many Absorb potions to withdraw? put 0 if no absorbs.
  28. Hopworlds = true;
  29.  
  30. Breakhandler = true; // Enable breaking.
  31. BreakTime1 = 45; // Min time to play before breaking.
  32. BreakTime2 = 120; // max time to play before breaking.
  33. BreakWait1 = 5; // min time to break for,
  34. BreakWait2 = 15; // max time to break for. (random range).
  35.  
  36. SleepBreaks = true; // Sleep breaks, initiates after long hours of gameplay.
  37. SleepBreak1 = 8; // Min timeto play before starting a sleep break.
  38. SleepBreak2 = 12; // Max time to play before starting a sleep breka.
  39. SleepWait1 = 2; // Min time to sleep for ** TIME IN HOURS NOT MINUTES*
  40. SleepWait2 = 4; // Max time to sleep for (random range).
  41.  
  42. DoSpecs = true;
  43. ReSpecTime1 = 75000; // Takes the Spec Bar 5 minutes to recharge to full
  44. ReSpectime2 = 300000; // add in extra seconds of your own for randomness!
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51. procedure playerSetup;
  52. begin
  53. HowManyPlayers := 1;
  54. NumberOfPlayers(HowManyPlayers);
  55. CurrentPlayer := 0;
  56. Players[0].Name := ''; //username
  57. Players[0].Pass := ''; // password
  58. Players[0].Nick := '>'; // nickname (4 letters).
  59. Players[0].Active := True;
  60. end;
  61.  
  62.  
  63. procedure WaitHumanClick;
  64. begin
  65. case random(600) of
  66. 1..450: Wait(RandomRange(400, 600));
  67. 451..570: Wait(RandomRange(400, 600));
  68. 571..590: Wait(RandomRange(600, 800));
  69. 591..600: Wait(RandomRange(800, 1000));
  70. end;
  71. end;
  72.  
  73. procedure WaitHumanClick2;
  74. begin
  75. case random(600) of
  76. 1..450: Wait(RandomRange(1000, 1500));
  77. 451..570: Wait(RandomRange(1500, 2000));
  78. 571..590: Wait(RandomRange(2000, 2500));
  79. 591..600: Wait(RandomRange(2500, 3000));
  80. end;
  81. end;
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88. procedure WaitHumanClick3;
  89. begin
  90. case random(600) of
  91. 1..450: Wait(RandomRange(3000, 5000));
  92. 451..570: Wait(RandomRange(5000, 5500));
  93. 571..590: Wait(RandomRange(6000, 6500));
  94. 591..600: Wait(RandomRange(7000, 7500));
  95. end;
  96. end;
  97.  
  98. function GetGreenUptext: string;
  99. var
  100. WhiteT, BlueT, YellowT, OrangeT, GreenT, FoundText: string;
  101. begin
  102. WhiteT := GetTextAtExWrap(8, 8, 300, 21, 0, 5, 1, 14541281, 55, 'UpChars07');
  103. BlueT := GetTextAtExWrap(35, 8, 300, 21, 0, 5, 1, 13423640, 65, 'UpChars07');
  104. YellowT := GetTextAtExWrap(35, 8, 300, 21, 0, 5, 1, 1235160, 40, 'UpChars07');
  105. OrangeT := GetTextAtExWrap(35, 8, 300, 21, 0, 5, 1, 4687583, 53, 'UpChars07');
  106. GreenT := GetTextAtExWrap(8, 8, 300, 21, 0, 5, 1, 120577, 65, 'UpChars07');
  107. FoundText := WhiteT + ' ' + BlueT + YellowT + OrangeT + GreenT;
  108. FoundText := ReplaceWrap(FoundText, '.', '', [rfReplaceAll]);
  109. FoundText := ReplaceWrap(FoundText, '/', '', [rfReplaceAll]);
  110. FoundText := ReplaceWrap(FoundText, '\', '', [rfReplaceAll]);
  111. FoundText := ReplaceWrap(FoundText, ',', '', [rfReplaceAll]);
  112. FoundText := ReplaceWrap(FoundText, '*', '', [rfReplaceAll]);
  113. FoundText := ReplaceWrap(FoundText, '^', '', [rfReplaceAll]);
  114. FoundText := ReplaceWrap(FoundText, '"', '', [rfReplaceAll]);
  115. Result := FoundText;
  116. end;
  117.  
  118. function IsUpTextMultiCustom2(Text: TStringArray): Boolean;
  119. var
  120. TheText: string;
  121. i, n: Integer;
  122. begin
  123. TheText := GetGreenUptext;
  124. n := High(Text);
  125. for i := 0 to n do
  126. if (Pos(Text[i], TheText) > 0) then
  127. begin
  128. Result := True;
  129. Exit;
  130. end;
  131. end;
  132.  
  133. function WaitUpTextMulti2(S: TStringArray; Time: Integer): Boolean;
  134. var
  135. T: Integer;
  136. begin
  137. Result := false;
  138. T := GetSystemTime + Time;
  139. while (GetSystemTime < T) do
  140. begin
  141. if (IsUpTextMultiCustom2(S)) then
  142. begin
  143. Result := True;
  144. Exit;
  145. end;
  146. Wait(20 + Random(20));
  147. end;
  148. end;
  149.  
  150.  
  151. function OpenWScreen: Boolean;
  152. begin
  153. Result := False;
  154. if WorldScreen then
  155. exit;
  156. if Loggedin then
  157. Exit;
  158. if not WorldScreen then
  159. begin
  160. Mmouse(54, 475, 1, 1);
  161. WaitHumanClick;
  162. ClickMouse2(Mouse_Left);
  163. waithumanclick;
  164. Result := True;
  165. end;
  166. end;
  167.  
  168. function whitecolor: boolean;
  169. var
  170. Monster: TpointArray;
  171. TmpCts: Integer;
  172. begin
  173. tmpcts := GetColorToleranceSpeed;
  174. ColorToleranceSpeed(2);
  175. SetColorSpeed2Modifiers(0.22, 1.69);
  176. result := FindColorsTolerance(Monster, 9163999, 192, 67, 583, 469, 4);
  177. ColorToleranceSpeed(tmpcts);
  178. SetColorSpeed2Modifiers(0.2, 0.2);
  179. end;
  180.  
  181.  
  182. procedure loginloop;
  183. var
  184. badworlds: TIntegerArray;
  185. OurCurrentworld: Integer;
  186. begin
  187. badworlds := [308,316,325,337,365];
  188. OpenWorldScreen;
  189. repeat
  190. if whitecolor then // If we have our mouse hovering a clickable world then breaks the loop
  191. break;
  192. if not whitecolor then
  193. writeln('We have not hovered a world yet');
  194. case random(10) of
  195. 0..2: mouse(randomrange(397, 554), randomrange(78, 394), 1, 1, mouse_move);
  196. 3..4: mouse(randomrange(298, 462), randomrange(200, 392), 1, 1, mouse_move);
  197. 5..6: mouse(randomrange(205, 555), randomrange(80, 154), 1, 1, mouse_move);
  198. 7..10: mouse(randomrange(211, 555), randomrange(246, 367), 1, 1, mouse_move);
  199. end;
  200. until (whitecolor)
  201. if whitecolor then
  202. begin
  203. clickmouse2(mouse_left); // Clicks the world as it is selected.
  204. waithumanclick;
  205. currentworld;
  206. waithumanclick;
  207. OurCurrentworld := CurrentWorldLS // Finds what our current world is
  208. waithumanclick;
  209. if InIntArray(Badworlds,OurCurrentworld) then // If its a bad one then exists
  210. exit; // Bads are: f2p, Pvp and high risk world
  211. waithumanclick;
  212. loginplayer; // if not then it logs in and resumes script.
  213. exit;
  214. end;
  215. end;
  216.  
  217.  
  218.  
  219. function InsideCave: boolean;
  220. var
  221. TPA: TpointArray;
  222. tmpcts: integer;
  223. begin
  224. if (not (loggedin)) then
  225. exit;
  226. tmpcts := GetColorToleranceSpeed;
  227. ColorToleranceSpeed(2);
  228. SetColorSpeed2Modifiers(0.12, 1.41);
  229. result := FindColorsTolerance(TPA, 1743843, MMX1, MMY1, MMX2, MMY2, 1);
  230. ColorToleranceSpeed(tmpcts);
  231. SetColorSpeed2Modifiers(0.2, 0.2);
  232. end;
  233.  
  234.  
  235. function HpLevel: integer;
  236. var
  237. s,S2: string;
  238. CurrentHpLevel,CurrentHpLevel2, CurrentHP: integer;
  239. begin
  240. if not LoggedIn then
  241. exit;
  242. if not InsideCave then
  243. exit;
  244. s := GetTextAtExWrap(520, 50, 540, 70, 0, 5, 1, 65525, 0, statchars07);
  245. S2:= GetTextAtExWrap(520, 50, 540, 70, 0, 5, 1, 65280, 0, statchars07);
  246. CurrentHpLevel := StrToIntDef(GetNumbers(s), - 1);
  247. CurrentHpLevel2:= StrToIntDef(GetNumbers(s2), - 1);
  248. if (CurrentHpLevel > 0) then
  249. CurrentHP := CurrentHpLevel;
  250. if (CurrentHpLevel2 > 0) then
  251. CurrentHP := CurrentHpLevel2;
  252. if (CurrentHP > 0 ) then
  253. begin
  254. result := CurrentHP
  255. end;
  256. end;
  257.  
  258. procedure WaitAfterOverLoadClick;
  259. var
  260. WaiTMe, T: Integer;
  261. begin
  262. WaitMe := randomrange(4000, 300000);
  263. writeln(waitme);
  264. marktime(t);
  265. repeat
  266. wait(400);
  267. if not insidecave then exit;
  268. if (TimeFromMark(t) >= (WaitMe)) then
  269. exit;
  270. until (TimeFromMark(t) >= (WaitMe));
  271. end;
  272.  
  273.  
  274. function FindObject(Color: TintegerArray; Tol, CTS: integer; hMoD, sMoD: extended; split, sort: integer; Uptext: array of string; WaitUptextWait, WaitUptextRandom: Integer; x, y, xs, ys: integer): boolean;
  275. var
  276. III, i, tmpcts: integer;
  277. TPA: tpointarray;
  278. TPAA: T2DPointArray;
  279. begin
  280. if (not (loggedin)) then
  281. exit;
  282. gametab(tab_inv);
  283. tmpcts := GetColorToleranceSpeed;
  284. ColorToleranceSpeed(CTS);
  285. SetColorSpeed2Modifiers(hMoD, SMoD);
  286. FindColorsSpiralTolerance(MSCX, MSCY, TPA, color[III], x, y, xs, ys, Tol) ColorToleranceSpeed(tmpCTS);
  287. SetColorSpeed2Modifiers(0.2, 0.2);
  288. SplitTPAWrap(TPA, split, TPAA);
  289. SortATPAFromSize(TPAA, sort, true);
  290. for I := 0 to High(TPAA) do
  291. begin
  292. MiddleTPAEx(TPAA[i], X, Y);
  293. MMouse(x, y, RandomRange( - 3, 3), RandomRange( - 3, 3));
  294. if WaitUpTextMulti2(uptext, WaitUptextWait + random(WaitUptextRandom)) then
  295. begin
  296. Result := True;
  297. break;
  298. end;
  299. break;
  300. end;
  301. end;
  302.  
  303. function Absorbed: boolean;
  304. begin
  305. if not loggedin then
  306. exit;
  307. if not insidecave then
  308. exit;
  309. result := FindTextTPAMulti(2070783, 0, MSX1, MSY1, MSX2, MSY2, ['Absorption'], StatChars07, nothing);
  310. end;
  311.  
  312. procedure clickoverload;
  313. begin
  314. if not loggedin then
  315. exit;
  316. if not insidecave then
  317. exit;
  318. writeln('we are here1');
  319. gametab(tab_inv);
  320. if absorbed then
  321. begin
  322. case random(10) of
  323. 0..6: writeln('not waiting for overload...continue');
  324. 7..10: WaitAfterOverLoadClick;
  325. end;
  326. end;
  327. if FindObject([921106], 1, 2, 0.00, 3.41, 1, 1, ['Drink', 'rink', 'verload', 'Overload'], 300, 150, MIX1, MIY1, MIX2, MIY2) then
  328. begin
  329. writeln('yes!');
  330. clickmouse2(mouse_left);
  331. wait(randomrange(5000, 10000));
  332. if absorbed then
  333. begin
  334. case random(10) of
  335. 0..6: writeln('not waiting for overload...continue');
  336. 7..10: WaitAfterOverLoadClick;
  337. end;
  338. end;
  339. end;
  340. end;
  341.  
  342. procedure clickAbsorp;
  343. begin
  344. if not loggedin then
  345. exit;
  346. if not insidecave then
  347. exit;
  348. gametab(tab_inv);
  349. case random(10) of
  350. 0..6:
  351. begin
  352. if FindObject([11248528], 15, 2, 0.05, 0.27, 1, 1, ['Drink', 'rink', 'Absoprtion', 'bsorption'], 300, 150, MIX1, MIY1, MIX2, MIY2) then
  353. clickmouse2(mouse_left);
  354. if FindObject([11248528], 15, 2, 0.05, 0.27, 1, 1, ['Drink', 'rink', 'Absoprtion', 'bsorption'], 300, 150, MIX1, MIY1, MIX2, MIY2) then
  355. clickmouse2(mouse_left);
  356. if FindObject([11248528], 15, 2, 0.05, 0.27, 1, 1, ['Drink', 'rink', 'Absoprtion', 'bsorption'], 300, 150, MIX1, MIY1, MIX2, MIY2) then
  357. clickmouse2(mouse_left);
  358. DrinkTime := Randomrange(400, 800);
  359. end;
  360. 7..8:
  361. begin
  362. if FindObject([11248528], 15, 2, 0.05, 0.27, 1, 1, ['Drink', 'rink', 'Absoprtion', 'bsorption'], 300, 150, MIX1, MIY1, MIX2, MIY2) then
  363. clickmouse2(mouse_left);
  364. if FindObject([11248528], 15, 2, 0.05, 0.27, 1, 1, ['Drink', 'rink', 'Absoprtion', 'bsorption'], 300, 150, MIX1, MIY1, MIX2, MIY2) then
  365. clickmouse2(mouse_left);
  366. DrinkTime := Randomrange(400, 800);
  367. end;
  368. 9..10:
  369. begin
  370. if FindObject([11248528], 15, 2, 0.05, 0.27, 1, 1, ['Drink', 'rink', 'Absoprtion', 'bsorption'], 300, 150, MIX1, MIY1, MIX2, MIY2) then
  371. clickmouse2(mouse_left);
  372. DrinkTime := Randomrange(400, 800);
  373. end;
  374. end;
  375. end;
  376.  
  377.  
  378.  
  379.  
  380. function AbsorPoints: integer;
  381. var
  382. s: string;
  383. CurrentHpLevel: integer;
  384. begin
  385. s := GetTextAtExWrap(0, 35, 60, 60, 0, 5, 1, 16777215, 0, NMZ);
  386. CurrentHpLevel := StrToIntDef(GetNumbers(s), - 1);
  387. if (CurrentHpLevel > 0) then
  388. begin
  389. result := CurrentHpLevel
  390. end;
  391. end;
  392.  
  393. procedure ProgressReport;
  394. var
  395. Total, timeleft, Timeleft2,rang2,rangph, Timeleft3, timegone, Def3, Att2, Def2, Str2, Hp2, HpPerHour, DefPH, AttPh, StrPh: integer;
  396. begin
  397. if (not (loggedin)) then
  398. exit;
  399. ClearDebug;
  400. timegone := (GetTimeRunning / 1000);
  401. Att2 := (R_GetSkillExp(SKILL_ATTACK) - Att1);
  402. Def2 := (R_GetSkillExp(SKILL_DEFENCE) - Def1);
  403. Str2 := (R_GetSkillExp(SKILL_STRENGTH) - str1);
  404. Hp2 := (R_GetSkillExp(SKILL_HITPOINTS) - Hp1);
  405. Rang2 := (R_GetSkillExp(Skill_range) - rang1);
  406. Def3 := R_GetSkillExp(SKILL_DEFENCE);
  407.  
  408. timeleft := ((Timer) - (GetTimeRunning));
  409. HpPerHour := (3600 * (Hp2)) / ((timegone));
  410. AttPh := (3600 * (Att2)) / ((timegone));
  411. StrPh := (3600 * (STr2)) / ((timegone));
  412. DefPh := (3600 * (Def2)) / ((timegone));
  413. Rangph:= (3600 * (Rang2)) / ((timegone));
  414.  
  415. WriteLn('* Runtime: ' + TimeRunning);
  416. Writeln('*');
  417. writeln('* Att EXP Gained: ' + IntToStr(Att2) + ' Att Exp P/H: ' + IntToStr(Attph));
  418. writeln('* Str ExP Gained: ' + IntToStr(Str2) + ' str Exp P/H: ' + IntToStr(StrPh));
  419. writeln('* Def ExP Gained: ' + IntToStr(Def2) + ' Def Exp P/H: ' + IntToStr(DefPh));
  420. writeln('* Hp ExP Gained: ' + IntToStr(Hp2) + ' Hp Exp P/H: ' + IntToStr(HpPerHour));
  421. writeln('* Rang ExP Gained: ' + IntToStr(Rang2) +' Rang Exp P/H: ' + IntToStr(Rangph));
  422.  
  423. end;
  424.  
  425.  
  426. procedure WaitShortClick;
  427. begin
  428. if (not (loggedin)) then
  429. exit;
  430. case random(600) of
  431. 1..450: Wait(RandomRange(100, 150));
  432. 451..570: Wait(RandomRange(150, 200));
  433. 571..590: Wait(RandomRange(200, 250));
  434. 591..600: Wait(RandomRange(250, 400));
  435. end;
  436. end;
  437.  
  438. procedure WaitShortClick2;
  439. begin
  440. if (not (loggedin)) then
  441. exit;
  442. case random(600) of
  443. 1..450: Wait(RandomRange(400, 450));
  444. 451..570: Wait(RandomRange(450, 500));
  445. 571..590: Wait(RandomRange(500, 550));
  446. 591..600: Wait(RandomRange(550, 600));
  447. end;
  448. end;
  449.  
  450. function HoverNearbyNpc: boolean;
  451. var
  452. I: Tpointarray;
  453. P: Integer;
  454. begin
  455. if (not (loggedin)) then
  456. exit;
  457. I := GetMiniMapDots('npc');
  458. if (length(I) > 0) then
  459. begin
  460. SortTPAFrom(i, Point(MMCX, MMCY));
  461. P := random(length(I)) Mmouse(I[0].x, I[0].y, 3, 3);
  462. result := true;
  463. end;
  464. end;
  465.  
  466. procedure Keyboards;
  467. begin
  468. case random(5) of
  469. 0..2:
  470. begin
  471. KeyDown(37);
  472. WaitShortClick KeyUp(37);
  473. WaitShortClick KeyDown(40);
  474. WaitShortClick KeyUp(40);
  475. end;
  476. 3..4:
  477. begin
  478. KeyDown(39);
  479. WaitShortClick KeyUp(39);
  480. WaitShortClick KeyDown(38);
  481. WaitShortClick KeyUp(38);
  482. end;
  483. 5:
  484. begin
  485. KeyDown(38);
  486. WaitShortClick KeyUp(38);
  487. WaitShortClick KeyDown(39);
  488. WaitShortClick KeyUp(39);
  489. end;
  490. end;
  491. end;
  492.  
  493.  
  494. procedure Antiban;
  495. begin
  496. if (not (loggedin)) then
  497. exit;
  498. case random(100) of
  499. 0..48:
  500. begin
  501. Keyboards;
  502. end;
  503. 49..56:writeln('doing nothing');
  504. 57..100:
  505. begin
  506. case random(150) of
  507. 10: hoverskill(skill_magic, false);
  508. 15: HoverOnlineFriend;
  509. 20: BoredHuman;
  510. 30: MMouseOffClient('top');
  511. 40: MMouseOffClient('left');
  512. 50: MMouseOffClient('right');
  513. 60: MMouseOffClient('bottom');
  514. 70: SmallRandomMouse;
  515. 80: RandomAngle(1);
  516. 90: RandomAngle(2);
  517. 100: PickUpMouse;
  518. 110: CompassMovement(10, 70, true);
  519. 120: HoverNearbyNpc;
  520. 130: Keyboards;
  521. 140: MissMouse(250, 250);
  522. 150: RandomMovement;
  523. 160: CompassMovement(240, 300, true);
  524. 170: AdjustMouseSpeed(3, 10, 20);
  525. 180: RandomFKeys(true);
  526. 190: RandomTab(true);
  527. end;
  528. end;
  529. end;
  530. end;
  531.  
  532. procedure idle;
  533. var
  534. HpBarOutside, t: integer;
  535. begin
  536. writeln('entered idle mode..');
  537. marktime(t);
  538. HpBarOutside := randomrange(3000, 10000);
  539. repeat
  540. wait(400);
  541. if not InsideCave then
  542. exit;
  543. if not loggedin then
  544. exit;
  545. if srl_InFight then
  546. exit;
  547. until (TimeFromMark(T) >= HpBarOutside);
  548. if (TimeFromMark(T) >= HpBarOutside) then
  549. begin
  550. writeln('we entered idling methhod, spinning camera and shit');
  551. antiban;
  552. end;
  553. end;
  554.  
  555.  
  556. procedure InsideCaveloop;
  557. begin
  558. if not InsideCave then
  559. exit;
  560. writeln('we have started the script while inside the cave, taking our current position as Safe spot/default area as the cave parts');
  561. repeat
  562. wait(2000);
  563. if not loggedin then
  564. exit;
  565. if not InsideCave then
  566. exit;
  567. progressreport;
  568. if (R_GetSkillLevel(SKILL_HITPOINTS) >= 59) then
  569. // if (HpLevel >= 51) then
  570. clickoverload;
  571. if not R_IsAutoRetaliateOn then
  572. Retaliate(true);
  573. if (not Absorbed) then
  574. begin
  575. if not InsideCave then
  576. exit;
  577. if not loggedin then
  578. exit;
  579. writeln('we dont have absorb colors clicking absorb!');
  580. ClickAbsorp;
  581. waithumanclick;
  582. ClickAbsorp;
  583. waithumanclick;
  584. ClickAbsorp;
  585. waithumanclick;
  586. ClickAbsorp;
  587. waithumanclick;
  588. end;
  589. if (AbsorPoints <= DrinkTime) then
  590. begin
  591. ClickAbsorp;
  592. waithumanclick;
  593. ClickAbsorp;
  594. waithumanclick;
  595. ClickAbsorp;
  596. waithumanclick;
  597. ClickAbsorp;
  598. waithumanclick;
  599. end;
  600. until (not InsideCave);
  601. if not InsideCave then
  602. exit;
  603. if not loggedin then
  604. exit;
  605. if not srl_InFight then
  606. idle;
  607. end;
  608.  
  609. procedure Termination(const Status: string);
  610. begin
  611. if (TermCheck = false) then
  612. exit;
  613. writeln(Status);
  614. if loggedin then
  615. begin
  616. if WaitFunc(@ LogOut, 500, RandomRange(8000, 20000)) then
  617. terminatescript
  618. else
  619. terminatescript;
  620. end
  621. else
  622. terminatescript;
  623. end;
  624.  
  625. function LogMeOut: boolean;
  626. begin
  627. writeln('Logging out..');
  628. if WaitFunc(@ LogOut, 500, RandomRange(8000, 20000)) then
  629. begin
  630. writeln('We have managed to log out');
  631. result := true;
  632. end
  633. else
  634. termination('We have failed to log out, ending script');
  635. end;
  636.  
  637.  
  638.  
  639. procedure GraboriginalExp;
  640. begin
  641. writeln('we started the script loggedin.. Grabbing original exp for progress report!');
  642. Att1 := R_GetSkillExp(SKILL_ATTACK);
  643. Def1 := R_GetSkillExp(SKILL_DEFENCE);
  644. Str1 := R_GetSkillExp(SKILL_STRENGTH);
  645. Hp1 := R_GetSkillExp(SKILL_HITPOINTS);
  646. Rang1:= R_GetSkillExp(SKILL_RANGE);
  647. end;
  648.  
  649. function smartSetAsTarget(pid: integer): boolean;
  650. begin
  651. result := true;
  652.  
  653. try
  654. setEIOSTarget('libsmartremote', intToStr(pid));
  655. writeln('smartSetAsTarget(): Succesfully set SMART['+ intToStr(pid) +'] as Simba''s target');
  656. except
  657. writeln('smartSetAsTarget(): Failed to set SMART['+ intToStr(pid) +'] as Simba''s target');
  658. result := false;
  659. end;
  660. end;
  661.  
  662. procedure SetupCorrectPlayer(whichPlayer:Integer);
  663. Var
  664. OurCurrentplayer:integer;
  665. begin
  666. OurCurrentplayer := currentPlayer;
  667. If (OurCurrentplayer <> whichPlayer) then
  668. begin
  669. NextPlayer(Players[CurrentPlayer].Active);
  670. OurCurrentplayer := currentPlayer;
  671. If (OurCurrentplayer = whichPlayer) then
  672. writeln('we switched to our proper next player');
  673. end;
  674. end;
  675.  
  676.  
  677. procedure setuprealclient;
  678. begin
  679. SetupCorrectPlayer(0);
  680. if (smartCurrentPID <> 8244) then
  681. begin
  682. smartFreeCurrentClient;
  683. smartSetAsTarget(8244);
  684. waithumanclick;
  685. if (smartCurrentPID = 8244) then
  686. writeln('we managed to pair up to the corrent client')
  687. else Termination('we failed to pair to the correct smart main client');
  688.  
  689.  
  690.  
  691. end;
  692. end;
  693.  
  694. begin
  695. playerSetup;
  696. setupsrl;
  697. SetupReflection;
  698. //
  699. //setuprealclient;
  700. R_CombatRandoms := false;
  701. SRL_CombatRandoms := false;
  702. DrinkTime := Randomrange(200, 800);
  703. GraboriginalExp;
  704. repeat
  705. wait(400);
  706. if InsideCave then
  707. InsideCaveloop
  708. else Termination('We are not inside cave');
  709. until (false);
  710. end.
Advertisement
Add Comment
Please, Sign In to add comment