Advertisement
Vusn

vAgility

Mar 1st, 2016
553
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 41.50 KB | None | 0 0
  1. program vAgility;
  2. {$DEFINE SMART}
  3. {$i Aerolib/Aerolib.simba}
  4. {$i Reflection/Reflection.simba}
  5.  
  6. const
  7. Username = '';
  8. Password = '';
  9. Course = ''; //Draynor, Varrock, Falador, Seers
  10. EATAT = 10; //Hp to eat at
  11. FOODTYPE = 'Potato with cheese'; //Any type of food
  12. cBREAK_IN = 30; //How long between breaks (minutes)
  13. cBREAK_FOR = 30; //How long to break for
  14. cR_BREAK_IN = 15; //Random +/- to add to break intervals
  15. cR_BREAK_FOR = 10; //Random +/- to add to break time
  16.  
  17. {////////////////////////////////////////////////////////////////////////////////
  18.  
  19. v1.4
  20. -Increased ability to detect obstacles (Thx Flight!)
  21. -Adjusted the pathing to be less bot-like on the Seers course.
  22. -Fixed the bug that causes the player to get stuck on Seers course.
  23. -Tweaked Falador Course a bit.
  24.  
  25. }////////////////////////////////////////////////////////////////////////////////
  26.  
  27. ScriptVersion = '1.4';
  28. UseAutoChecker = true;
  29.  
  30. var
  31. x, y, lapCount, markCount, cH, cW: Integer;
  32. Rope: TReflectObject;
  33. MyPlayer: TReflectLocalPlayer;
  34. pt, position: TPoint;
  35. at1S: array of Integer;
  36.  
  37. procedure AutoUpdateScript;
  38. var
  39. NewFile: integer;
  40. OnlineVersion, NewScript, NewFileName: string;
  41. begin
  42. if UseAutoChecker then
  43. begin
  44. cleardebug();
  45. writeln('Checking for script updates...');
  46. OnlineVersion := GetPage('http://pastebin.com/raw/4rH3mKsy');
  47. if (trim(OnlineVersion) > ScriptVersion) then
  48. begin
  49. writeLn('Script update available!');
  50. writeLn('Updating script to v' + OnlineVersion);
  51. NewScript := GetPage('http://pastebin.com/raw/fuzFwaHq');
  52. NewFileName := ScriptPath + 'vAgility.simba';
  53. NewFile := Rewritefile(NewFileName, true);
  54. try
  55. WriteFileString(NewFile, NewScript);
  56. except
  57. begin
  58. writeLn('Fatal error writing to ' + NewFileName + '!!');
  59. terminatescript;
  60. end;
  61. end;
  62. CloseFile(NewFile);
  63. writeLn('New script downloaded to ' + NewFileName + '. Please restart Simba.');
  64. TerminateScript;
  65. end
  66. else
  67. writeLn('You have the latest version of the script!');
  68. end;
  69. end;
  70.  
  71. function Login: Boolean;
  72. begin
  73. MyPlayer.Username := USERNAME;
  74. MyPlayer.Password := PASSWORD;
  75. MyPlayer.Active := True;
  76. MyPlayer.Create;
  77. MyPlayer.Login;
  78. end;
  79.  
  80. procedure HandleLogin;
  81. begin
  82. if (not isLoggedIn()) then
  83. Login();
  84. if (isLoggedIn()) then
  85. begin
  86. exit;
  87. end;
  88. end;
  89.  
  90. procedure loadVars();
  91. begin
  92. cH := (reflect.Smart.Height - 5);
  93. cW := (reflect.Smart.Width - 5);
  94. mouseSpeed := randomrange(35, 65);
  95. writeln('Mouse speed: ' + inttostr(mouseSpeed));
  96. setupBreak(cBREAK_IN, cBREAK_FOR, cR_BREAK_IN, cR_BREAK_FOR);
  97. Reflect.Compass.MakePitch(4 + Random(2));
  98. end;
  99.  
  100. function R_TileOnMS(Tile: TPoint; var OutputPoint: TPoint; x: integer = 0; y: integer = 0; z: integer = 0): boolean;
  101. var
  102. tempB: TBox;
  103. begin
  104. OutputPoint := TReflectionTiles.TileToMS(Tile, x, y, z);
  105. tempB := intToBox(MSX1, MSY1, MSX2, MSY2);
  106. result := PointInBox(OutputPoint, tempB);
  107. end;
  108.  
  109. procedure randomMouseInput(pnt: Tpoint; ranx, rany: integer);
  110. begin
  111. case random(3) of
  112. 0: humanMMouse(pnt, ranx, rany);
  113. 1: missMouse(pnt, ranx, rany);
  114. 2: mouse(pnt, ranx, rany, mouse_move);
  115. end;
  116. end;
  117.  
  118. function R_InteractTile(tile: Tpoint; action: string; x: integer = 0; y: integer = 0; z: integer = 0): boolean;
  119. var
  120. RSTile: TPoint;
  121. begin
  122. if R_TileOnMS(Tile, RSTile, x, y, z) then
  123. begin
  124. randomMouseInput(rsTile, 3, 3);
  125. wait(500);
  126. if (waitUpText(action, 400)) then
  127. begin
  128. FastClick(mouse_left);
  129. result := didClick(true, 1000);
  130. end
  131. else
  132. begin
  133. if TReflectionText.OptionExists(action) then
  134. begin
  135. FastClick(mouse_right);
  136. result := Reflect.Text.ChooseOption(action);
  137. end;
  138. if not result then
  139. randomMouseInput(Point(MSCX, MSCY), 500, 500);
  140. end;
  141. end;
  142. end;
  143.  
  144. procedure dismissAllRandoms;
  145. var
  146. i, j, me_indice: integer;
  147. _npcs: TReflectNPCArray;
  148. randoms: tstringarray;
  149. begin
  150. randoms := ['molly', 'niles', 'miles', 'giles', 'sandwich lady', 'drunken dwarf', 'genie', 'highwayman', 'dr jekyll', 'cap' 'n hand', 'security guard', 'rick turpentine', 'mysterious old man', 'frog', 'null', 'mime', 'sergeant damien', 'freaky forester', 'postie pete', 'tilt', 'flippa', 'leo', 'pillory guard', 'evil bob'];
  151. _npcs.GetAll;
  152. me_indice := TReflectLocalPlayer.GetPlayerIndex;
  153. for i := 0 to high(_npcs) do
  154. begin
  155. if (_npcs[i].getInteractingIndex = me_indice) then
  156. begin
  157. for j := 0 to high(randoms) do
  158. begin
  159. if (pos(randoms[j], lowercase(_npcs[i].getName)) > 0) then
  160. begin
  161. if R_InteractTile(_npcs[i].getTile, 'Dismiss', 0, 0, 50) then
  162. begin
  163. sleep(2500 + random(1000));
  164. writeln('Dismissed random: ' + _npcs[i].getname + ' Time Running: ' + TimeRunning);
  165. end;
  166. end;
  167. end;
  168. end;
  169. end;
  170. end;
  171.  
  172. procedure Draw(text: string);
  173. var
  174. xpGained, xpHour, markHour: integer;
  175. cName: string;
  176. begin
  177. if (Course = 'Draynor') then
  178. begin
  179. xpGained := (120 * lapCount);
  180. cName := 'Draynor';
  181. end
  182. else if (Course = 'Falador') then
  183. begin
  184. xpGained := (440 * lapCount);
  185. cName := 'Falador';
  186. end
  187. else if (Course = 'Seers') then
  188. begin
  189. xpGained := (570 * lapCount);
  190. cName := 'Seers';
  191. end
  192. else if (Course = 'Varrock') then
  193. begin
  194. xpGained := (238 * lapCount);
  195. cName := 'Varrock';
  196. end
  197. xpHour := Round((xpGained) / (GetTimeRunning / 3600000.0));
  198. markHour := Round((markCount) / (GetTimeRunning / 3600000.0));
  199. OS_Smart.__Graphics.Clear;
  200. OS_Smart.__Graphics.DrawClippedText('vAgility: ' + cName, 'upchars07', point(300, 353), 16711680);
  201. OS_Smart.__Graphics.DrawClippedText('Exp gained: ' + toStr(xpGained) + ' (' + (toStr(xpHour)) + ' p/hr)', 'upchars07', point(300, 370), 16711680);
  202. OS_Smart.__Graphics.DrawClippedText('Marks of Grace: ' + toStr(markCount) + ' (' + (toStr(markHour)) + ' p/hr)', 'upchars07', point(300, 385), 16711680);
  203. OS_Smart.__Graphics.DrawClippedText('Total Runtime ' + MsToTime(GetTimeRunning, 3), 'upchars07', point(300, 400), 16711680);
  204. OS_Smart.__Graphics.DrawClippedText('Status: ' + text, 'upchars07', point(300, 415), 16711680);
  205. end;
  206.  
  207. function atBox(x, y, xx, yy: Integer): boolean;
  208. var
  209. CorrectBox := inttobox (x, y, xx, yy);
  210. MyCurrentTile: tpoint;
  211. begin
  212. MyCurrentTile := treflectiontiles.getglobaltile();
  213. result := pointinbox(MyCurrentTile, CorrectBox);
  214. end;
  215.  
  216. procedure eatFood;
  217. var
  218. Food: TReflectInvItem;
  219. Point: TPoint;
  220. begin
  221. Draw('Eating ' + FOODTYPE);
  222. reflect.Gametab.Open(55);
  223. if food.Find(FOODTYPE) then
  224. begin
  225. Point := Food.GetMSPoint;
  226. reflect.mouse.move(Point, randomrange(2, 4), randomrange(2, 4));
  227. FastClick(MOUSE_LEFT);
  228. wait(randomrange(1000, 2000));
  229. end
  230. else if not food.Find(FOODTYPE) then
  231. TerminateScript;
  232. end;
  233.  
  234. function waitMove(c: Integer): boolean;
  235. var
  236. d: integer;
  237. begin
  238. (d = (c / 5));
  239. fflag(0);
  240. wait(c + random(d));
  241. while myplayer.IsAnimating do
  242. wait(c + random(d));
  243. end;
  244.  
  245. function findObject(COL, TOL, PIXELS: Integer; HUE, SAT: Extended): Boolean;
  246. var
  247. WhatEver: TColEx;
  248. TPA: TPointArray;
  249. ATPA: T2DPointArray;
  250. I: Integer;
  251. box: TBox;
  252. x, y: Integer;
  253. begin
  254. WhatEver.Create(Col, Tol, Hue, Sat);
  255. if not WhatEver.FindAllIn(Area_MS, TPA) then
  256. Exit(False);
  257. ATPA := ClusterTPA(TPA, 10);
  258. SortATPAFromMidPoint(ATPA, Point(MSCX, MSCY));
  259. if (length(ATPA) <= 0) then
  260. begin
  261. result := False;
  262. exit;
  263. end;
  264. for I := 0 to high(ATPA) do
  265. begin
  266. if (length(ATPA[I]) >= PIXELS) then
  267. begin
  268. box := intToBox(ATPA[I].getBounds().X1, ATPA[I].getBounds().Y1, ATPA[I].getBounds().X2, ATPA[I].getBounds().Y2);
  269. if (box.x1 < 0) then
  270. box.x1 := 0;
  271. if (box.y1 < 0) then
  272. box.y1 := 0;
  273. position := MiddleTPA(ATPA[I]);
  274. result := True;
  275. exit;
  276. end;
  277. end;
  278. result := False;
  279. end;
  280.  
  281. function lootMark(): Boolean;
  282. var
  283. i, id: Integer;
  284. strArr: TStringArray;
  285. gItems: TReflectGroundItemArray;
  286. begin
  287. if (Course = 'Draynor') then
  288. begin
  289. gItems.GetAll(10);
  290. end
  291. else if (Course = 'Falador') then
  292. begin
  293. gItems.GetAll(4);
  294. end
  295. else if (Course = 'Seers') then
  296. begin
  297. gItems.GetAll(15);
  298. end
  299. else if (Course = 'Varrock') then
  300. begin
  301. gItems.GetAll(15);
  302. end
  303. if length(gItems) = 0 then
  304. Exit;
  305. setArrayLength(strArr, 1);
  306. strArr := ['mark of grace'];
  307. for i := 0 to high(gItems) do
  308. if inStrArrEx(gItems[i].GetName, strArr, id) then
  309. begin
  310. Reflect.Compass.MakePitch(3 + Random(3));
  311. if (findObject(1417655, 3, 20, 0.06, 0.16)) then
  312. begin
  313. Draw('Found Mark');
  314. case random(10) of
  315. 0..8:
  316. begin
  317. randomMouseInput(position, 3, 3);
  318. if waituptext('Mark of grace', randomrange(50, 300)) then
  319. fastClick(mouse_left);
  320. waitMove(900);
  321. inc(markCount);
  322. exit(true);
  323. end;
  324. 9..10:
  325. begin
  326. randomMouseInput(position, 3, 3);
  327. if waituptext('Mark of grace', randomrange(50, 300)) then
  328. fastClick(mouse_Right);
  329. chooseoptionmulti(['Take', 'Mark of grace']);
  330. waitMove(900);
  331. inc(markCount);
  332. exit(true);
  333. end;
  334. end;
  335. if (didYellowClick()) then
  336. begin
  337. sleep(random(150, 300));
  338. end;
  339. end
  340. else
  341. inc(markCount);
  342. end
  343. end;
  344.  
  345. procedure thewallD();
  346. var
  347. obj_Wall: TMSObject;
  348. Pnt: TPoint;
  349. T: Timer;
  350. begin
  351. lootMark();
  352. dismissAllRandoms();
  353. if R_InteractTile(Point(3102, 3279), 'Climb Rough wall', 3, 3, 2) then
  354. begin
  355. if DidRedClick then
  356. begin
  357. draw('Climbing Rough Wall');
  358. T.start;
  359. repeat
  360. wait(150);
  361. until (reflect.Tiles.DistanceFromTile(Point(3102, 3279)) < 1) or (T.timeElapsed > 10000);
  362. end
  363. end
  364. else if not R_InteractTile(Point(3102, 3279), 'Climb Rough wall', 3, 3, 3) then
  365. begin
  366. reflect.Compass.MakePitch(5);
  367. setCompass(inttostr(randomrange(265, 285)));
  368. end
  369. end;
  370.  
  371. procedure rope1D;
  372. var
  373. T: Timer;
  374. begin
  375. lootMark();
  376. dismissAllRandoms();
  377. if R_InteractTile(Point(3098, 3277), 'Cross Tightrope', 0, 0, 10) then
  378. begin
  379. if DidRedClick then
  380. begin
  381. draw('Crossing Rope 1');
  382. wait(randomrange(500, 3000));
  383. setCompass(inttostr(randomrange(180, 225)));
  384. T.start;
  385. repeat
  386. wait(150);
  387. until (reflect.Tiles.DistanceFromTile(Point(3090, 3276)) < 1) or (T.timeElapsed > 10000);
  388. end
  389. end
  390. end;
  391.  
  392. procedure rope2D;
  393. var
  394. T: Timer;
  395. begin
  396. lootMark();
  397. dismissAllRandoms();
  398. if R_InteractTile(Point(3092, 3276), 'Cross Tightrope', 0, 0, 10) then
  399. begin
  400. if DidRedClick then
  401. begin
  402. draw('Crossing Rope 2');
  403. T.start;
  404. repeat
  405. wait(150);
  406. until (reflect.Tiles.DistanceFromTile(Point(3092, 3266)) < 1) or (T.timeElapsed > 10000);
  407. end
  408. end
  409. lootMark();
  410. end;
  411.  
  412. procedure nwallD;
  413. var
  414. T: Timer;
  415. begin
  416. lootMark();
  417. dismissAllRandoms();
  418. if R_InteractTile(Point(3089, 3264), 'Balance Narrow wall', 3, 3, 3) then
  419. begin
  420. if DidRedClick then
  421. begin
  422. setCompass(inttostr(randomrange(125, 150)));
  423. wait(randomrange(500, 3000));
  424. draw('Crossing Narrow Wall');
  425. T.start;
  426. repeat
  427. wait(150);
  428. until (reflect.Tiles.DistanceFromTile(Point(3088, 3261)) < 1) or (T.timeElapsed > 10000);
  429. end
  430. end
  431. end;
  432.  
  433. procedure jwallD;
  434. var
  435. gap1: TReflectObject;
  436. T: Timer;
  437. pnt: tpoint;
  438. begin
  439. lootMark();
  440. dismissAllRandoms();
  441. if gap1.Find(objGame, 10084, 10) then
  442. begin
  443. pnt := gap1.GetMSPoint;
  444. if (pnt.x > 0) and (pnt.y > 0) and (pnt.x < cW) and (pnt.y < cH) then
  445. Reflect.Mouse.Move(gap1.GetMSPoint, 3, 3);
  446. if (waitUptextMulti(['Jump-up', 'Wall'], 250)) then
  447. begin
  448. fastClick(Mouse_left);
  449. if DidRedClick then
  450. begin
  451. draw('Climbing up wall');
  452. T.start;
  453. repeat
  454. wait(150);
  455. until (reflect.Tiles.DistanceFromTile(Point(3088, 3255)) < 1) or (T.timeElapsed > 5000);
  456. end
  457. end
  458. else if not (waitUptextMulti(['Jump-up', 'Wall'], 250)) then
  459. begin
  460. setCompass('random');
  461. end;
  462. end
  463. end;
  464.  
  465. procedure gapD;
  466. var
  467. T: Timer;
  468. begin
  469. lootMark();
  470. dismissAllRandoms();
  471. reflect.Tiles.RotateCameraToTile(Point(3095, 3255));
  472. if R_InteractTile(Point(3095, 3255), 'Jump Gap', 3, 3, 3) then
  473. begin
  474. if DidRedClick then
  475. begin
  476. draw('Jumping Gap');
  477. T.start;
  478. repeat
  479. wait(150);
  480. until (reflect.Tiles.DistanceFromTile(Point(3096, 3256)) < 1) or (T.timeElapsed > 10000);
  481. end
  482. end
  483. else if not R_InteractTile(Point(3095, 3255), 'Jump Gap', 3, 3, 3) then
  484. begin
  485. reflect.Compass.MakePitch(2);
  486. setCompass(inttostr(randomrange(125, 150)));
  487. end
  488. end;
  489.  
  490. procedure crateD;
  491. var
  492. T: Timer;
  493. begin
  494. lootMark();
  495. dismissAllRandoms();
  496. if R_InteractTile(Point(3101, 3261), 'Climb-down Crate', 3, 3, 3) then
  497. begin
  498. if DidRedClick then
  499. begin
  500. draw('Climbing Down Crate');
  501. T.start;
  502. repeat
  503. wait(150);
  504. until (reflect.Tiles.DistanceFromTile(Point(3103, 3261)) < 1) or (T.timeElapsed > 10000);
  505. end
  506. end
  507. else if not R_InteractTile(Point(3102, 3261), 'Climb-down Crate', 3, 3, 3) then
  508. begin
  509. myplayer.blindwalkMM(Point(3101, 3261), 2);
  510. waitMove(50);
  511. end
  512. setCompass(inttostr(randomrange(265, 285)));
  513. if (getRunEnergy >= (1 + random(99))) and not isUsingRun then
  514. toggleRunning(true);
  515. wait(randomrange(1400, 1900));
  516. inc(lapcount);
  517. end;
  518.  
  519. procedure walkToWallD;
  520. var
  521. T: Timer;
  522. begin
  523. draw('Walking to Wall');
  524. myplayer.blindwalkMM(Point(3104, 3279), 1);
  525. while not myplayer.ismoving do
  526. begin
  527. T.start;
  528. if T.timeelapsed > 2500 then
  529. Break;
  530. Wait(150);
  531. end;
  532. breakhandler();
  533. end;
  534.  
  535. procedure theWallF;
  536. var
  537. T: Timer;
  538. begin
  539. lootMark();
  540. dismissAllRandoms();
  541. Reflect.Compass.MakePitch(4 + Random(2));
  542. setCompass(inttostr(randomrange(350, 360)));
  543. if R_InteractTile(Point(3036, 3342), 'Climb Rough wall', 3, 3, 3) then
  544. begin
  545. if DidRedClick then
  546. begin
  547. draw('Climbing wall');
  548. T.start;
  549. repeat
  550. wait(150);
  551. until (reflect.Tiles.DistanceFromTile(Point(3036, 3342)) < 1) or (T.timeElapsed > 10000);
  552. end
  553. end
  554. end;
  555.  
  556. procedure rope1F;
  557. var
  558. T: Timer;
  559. begin
  560. lootMark();
  561. dismissAllRandoms();
  562. if R_InteractTile(Point(3040, 3343), 'Cross Tightrope', 0, 0, 10) then
  563. begin
  564. if DidRedClick then
  565. begin
  566. draw('Crossing Rope 1');
  567. T.start;
  568. repeat
  569. wait(150);
  570. until (reflect.Tiles.DistanceFromTile(Point(3047, 3344)) < 1) or (T.timeElapsed > 10000);
  571. end
  572. end
  573. else if not R_InteractTile(Point(3040, 3343), 'Cross Tightrope', 3, 3, 3) then
  574. begin
  575. reflect.Compass.Make('random');
  576. end
  577. end;
  578.  
  579. procedure holdsF;
  580. var
  581. T: Timer;
  582. begin
  583. lootMark();
  584. dismissAllRandoms();
  585. if R_InteractTile(Point(3050, 3351), 'Cross Hand holds', 3, 8, 3) then
  586. begin
  587. if DidRedClick then
  588. begin
  589. draw('Crossing Hand Holds');
  590. reflect.Tiles.RotateCameraToTile(Point(3048, 3360));
  591. T.start;
  592. repeat
  593. wait(150);
  594. until (reflect.Tiles.DistanceFromTile(Point(3050, 3357)) < 1) or (T.timeElapsed > 10000);
  595. end
  596. end
  597. else if not R_InteractTile(Point(3050, 3351), 'Cross Hand holds', 3, 8, 3) then
  598. begin
  599. myplayer.blindwalkMM(Point(3050, 3349), 1);
  600. waitMove(50);
  601. reflect.Compass.Make('random');
  602. end
  603. end;
  604.  
  605. procedure gap1F;
  606. var
  607. T: Timer;
  608. begin
  609. lootMark();
  610. dismissAllRandoms();
  611. if R_InteractTile(Point(3048, 3360), 'Jump Gap', 3, 5, 3) then
  612. begin
  613. if DidRedClick then
  614. begin
  615. draw('Jumping Gap 1');
  616. T.start;
  617. repeat
  618. wait(150);
  619. until (reflect.Tiles.DistanceFromTile(Point(3048, 3361)) < 1) or (T.timeElapsed > 10000);
  620. end
  621. end
  622. else if not R_InteractTile(Point(3048, 3360), 'Jump Gap', 3, 8, 3) then
  623. begin
  624. reflect.Compass.Make('random');
  625. Reflect.Compass.MakePitch(2 + Random(4));
  626. end
  627. end;
  628.  
  629. procedure gap2F;
  630. var
  631. T: Timer;
  632. begin
  633. lootMark();
  634. dismissAllRandoms();
  635. setCompass(inttostr(randomrange(305, 325)));
  636. if R_InteractTile(Point(3041, 3362), 'Jump Gap', 3, 8, 3) then
  637. begin
  638. if DidRedClick then
  639. begin
  640. draw('Jumping Gap 1');
  641. T.start;
  642. repeat
  643. wait(150);
  644. until (reflect.Tiles.DistanceFromTile(Point(3041, 3361)) < 1) or (T.timeElapsed > 10000);
  645. end
  646. end
  647. else if not R_InteractTile(Point(3041, 3362), 'Cross Tightrope', 3, 3, 3) then
  648. begin
  649. reflect.Compass.Make('random');
  650. Reflect.Compass.MakePitch(2 + Random(4));
  651. end
  652. end;
  653.  
  654. procedure rope2F;
  655. var
  656. T: Timer;
  657. begin
  658. lootMark();
  659. dismissAllRandoms();
  660. if R_InteractTile(Point(3034, 3362), 'Cross Tightrope', 3, 3, 3) then
  661. begin
  662. if DidRedClick then
  663. begin
  664. draw('Crossing Rope 2');
  665. T.start;
  666. repeat
  667. wait(150);
  668. until (reflect.Tiles.DistanceFromTile(Point(3028, 3354)) < 1) or (T.timeElapsed > 10000);
  669. end
  670. end
  671. else if not R_InteractTile(Point(3034, 3362), 'Cross Tightrope', 3, 3, 3) then
  672. begin
  673. reflect.Compass.Make('random');
  674. Reflect.Compass.MakePitch(2 + Random(4));
  675. end
  676. end;
  677.  
  678. procedure rope3F;
  679. var
  680. T: Timer;
  681. begin
  682. reflect.Compass.MakePitch(5);
  683. reflect.Tiles.RotateCameraToTile(Point(3025, 3353));
  684. lootMark();
  685. dismissAllRandoms();
  686. if R_InteractTile(Point(3025, 3353), 'Cross Tightrope', 3, 3, 3) then
  687. begin
  688. if DidRedClick then
  689. begin
  690. draw('Crossing Rope 3');
  691. T.start;
  692. repeat
  693. wait(150);
  694. until (reflect.Tiles.DistanceFromTile(Point(3020, 3353)) < 1) or (T.timeElapsed > 10000);
  695. end
  696. end
  697. else if not R_InteractTile(Point(3025, 3353), 'Cross Tightrope', 3, 3, 3) then
  698. begin
  699. reflect.Compass.Make('random');
  700. Reflect.Compass.MakePitch(2 + Random(4));
  701. end
  702. end;
  703.  
  704. procedure gap3F;
  705. var
  706. T: Timer;
  707. begin
  708. lootMark();
  709. dismissAllRandoms();
  710. if R_InteractTile(Point(3017, 3353), 'Jump Gap', 3, 3, 3) then
  711. begin
  712. if DidRedClick then
  713. begin
  714. draw('Crossing Gap 3');
  715. T.start;
  716. repeat
  717. wait(150);
  718. until (reflect.Tiles.DistanceFromTile(Point(3018, 3349)) < 1) or (T.timeElapsed > 10000);
  719. end
  720. end
  721. else if not R_InteractTile(Point(3017, 3353), 'Jump Gap', 3, 3, 3) then
  722. begin
  723. reflect.Compass.Make('random');
  724. Reflect.Compass.MakePitch(2 + Random(4));
  725. end
  726. end;
  727.  
  728. procedure ledge1F;
  729. var
  730. T: Timer;
  731. begin
  732. lootMark();
  733. dismissAllRandoms();
  734. if R_InteractTile(Point(3016, 3346), 'Jump Ledge', 3, 3, 3) then
  735. begin
  736. if DidRedClick then
  737. begin
  738. draw('Jumping Ledge 1');
  739. T.start;
  740. repeat
  741. wait(150);
  742. until (reflect.Tiles.DistanceFromTile(Point(3014, 3346)) < 1) or (T.timeElapsed > 10000);
  743. end
  744. end
  745. else if not R_InteractTile(Point(3016, 3346), 'Jump Ledge', 3, 3, 3) then
  746. begin
  747. reflect.Compass.Make('random');
  748. Reflect.Compass.MakePitch(1 + Random(6));
  749. end
  750. end;
  751.  
  752. procedure ledge2F;
  753. var
  754. T: Timer;
  755. begin
  756. lootMark();
  757. dismissAllRandoms();
  758. if R_InteractTile(Point(3012, 3343), 'Jump Ledge', 3, 3, 3) then
  759. begin
  760. if DidRedClick then
  761. begin
  762. setCompass(inttostr(randomrange(150, 210)));
  763. draw('Jumping Ledge 2');
  764. T.start;
  765. repeat
  766. wait(150);
  767. until (reflect.Tiles.DistanceFromTile(Point(3013, 3342)) < 1) or (T.timeElapsed > 10000);
  768. end
  769. // reflect.Compass.Make('random');
  770. Reflect.Compass.MakePitch(1 + Random(6));
  771. end
  772. end;
  773.  
  774. procedure ledge3F;
  775. var
  776. T: Timer;
  777. begin
  778. lootMark();
  779. dismissAllRandoms();
  780. if R_InteractTile(Point(3012, 3335), 'Jump Ledge', 3, 3, 3) then
  781. begin
  782. if DidRedClick then
  783. begin
  784. draw('Jumping Ledge 3');
  785. T.start;
  786. repeat
  787. wait(150);
  788. until (reflect.Tiles.DistanceFromTile(Point(3013, 3333)) < 1) or (T.timeElapsed > 10000);
  789. end
  790. end
  791. else if not R_InteractTile(Point(3012, 3335), 'Jump Ledge', 3, 3, 3) then
  792. begin
  793.  
  794. reflect.Compass.Make('random');
  795. Reflect.Compass.MakePitch(1 + Random(6));
  796. lootMark();
  797. end
  798. end;
  799.  
  800. procedure ledge4F;
  801. var
  802. T: Timer;
  803. begin
  804. lootMark();
  805. dismissAllRandoms();
  806. if R_InteractTile(Point(3018, 3333), 'Jump Ledge', 3, 3, 3) then
  807. begin
  808. if DidRedClick then
  809. begin
  810. case random(10) of
  811. 0..7: setCompass(inttostr(randomrange(340, 360)));
  812. 8..10: setCompass(inttostr(randomrange(1, 30)));
  813. end
  814. draw('Jumping Ledge 4');
  815. T.start;
  816. repeat
  817. wait(150);
  818. until (reflect.Tiles.DistanceFromTile(Point(3019, 3333)) < 1) or (T.timeElapsed > 10000);
  819. end
  820. end
  821. else if not R_InteractTile(Point(3018, 3333), 'Jump Ledge', 3, 3, 3) then
  822. begin
  823. reflect.Compass.Make('random');
  824. lootMark();
  825. end
  826. end;
  827.  
  828. procedure edge1F;
  829. var
  830. T: Timer;
  831. begin
  832. lootMark();
  833. dismissAllRandoms();
  834. if R_InteractTile(Point(3023, 3334), 'Jump Edge', 3, 3, 3) then
  835. begin
  836. if DidRedClick then
  837. begin
  838. draw('Jumping Off Edge 1');
  839. T.start;
  840. repeat
  841. wait(150);
  842. until (reflect.Tiles.DistanceFromTile(Point(3027, 3333)) < 1) or (T.timeElapsed > 10000);
  843. end
  844. end
  845. else if not R_InteractTile(Point(3023, 3334), 'Jump Edge', 3, 3, 3) then
  846. begin
  847. reflect.Tiles.RotateCameraToTile(Point(3023, 3334));
  848. end
  849. wait(randomrange(1400, 1900));
  850. if (getRunEnergy >= (1 + random(99))) and not isUsingRun then
  851. toggleRunning(true);
  852. inc(lapcount);
  853. end;
  854.  
  855. procedure walkToWallF;
  856. var
  857. T: Timer;
  858. begin
  859. draw('Walking to Wall');
  860. myplayer.blindwalkMM(Point(3036, 3340), 2);
  861. while not myplayer.ismoving do
  862. begin
  863. T.start;
  864. if T.timeelapsed > 2500 then
  865. Break;
  866. Wait(150);
  867. end;
  868. breakhandler();
  869. end;
  870.  
  871. procedure theWallS;
  872. var
  873. T: Timer;
  874. begin
  875. lootMark();
  876. dismissAllRandoms();
  877. Reflect.Compass.MakePitch(4 + Random(2));
  878. setCompass(inttostr(randomrange(350, 360)));
  879. if R_InteractTile(Point(2729, 3489), 'Climb-up Wall', 0, 10, 0) then
  880. begin
  881. if DidRedClick then
  882. begin
  883. draw('Climbing wall');
  884. wait(randomrange(500, 2600));
  885. setCompass(inttostr(randomrange(270, 340)));
  886. Reflect.Compass.MakePitch(2 + Random(3));
  887. T.start;
  888. repeat
  889. wait(150);
  890. until (reflect.Tiles.DistanceFromTile(Point(2729, 3491)) < 1) or (T.timeElapsed > 10000);
  891. end
  892. end
  893. else if not R_InteractTile(Point(2729, 3489), 'Climb-up Wall', 3, 3, 3) then
  894. begin
  895. Reflect.Compass.MakePitch(4 + Random(2));
  896. reflect.Tiles.RotateCameraToTile(Point(2729, 3489));
  897. end
  898. end;
  899.  
  900. procedure walkToWallS;
  901. var
  902. T: Timer;
  903. begin
  904. draw('Walking to Wall');
  905. if getCurrentHealth() < EATAT then
  906. eatFood;
  907. myplayer.blindwalkMM(Point(2729, 3488));
  908. while not myplayer.ismoving do
  909. begin
  910. T.start;
  911. if T.timeelapsed > 2500 then
  912. Break;
  913. Wait(150);
  914. end;
  915.  
  916. end;
  917.  
  918. procedure gap1S;
  919. var
  920. gap1: TReflectObject;
  921. T: Timer;
  922. pnt: tpoint;
  923. begin
  924. if getCurrentHealth() < EATAT then
  925. eatFood;
  926. lootMark();
  927. dismissAllRandoms();
  928. breakhandler();
  929. if gap1.Find(objGame, 11374, 20) then
  930. begin
  931. pnt := gap1.GetMSPoint;
  932. if (pnt.x > 0) and (pnt.y > 0) and (pnt.x < cW) and (pnt.y < cH) then
  933. Reflect.Mouse.Move(gap1.GetMSPoint, 3, 3);
  934. if (waitUptextMulti(['Jump', 'Gap'], 250)) then
  935. begin
  936. fastClick(Mouse_left);
  937. if DidRedClick then
  938. begin
  939. draw('Jumping Gap 1');
  940. wait(randomrange(500, 4000));
  941. setCompass(inttostr(randomrange(190, 240)));
  942. T.start;
  943. repeat
  944. wait(150);
  945. until (reflect.Tiles.DistanceFromTile(Point(2713, 3494)) < 1) or (T.timeElapsed > 5000);
  946. end
  947. end
  948. else if not (waitUptextMulti(['Jump', 'Gap'], 250)) then
  949. begin
  950. setCompass(inttostr(randomrange(270, 340)));
  951. Reflect.Compass.MakePitch(2 + Random(3));
  952. end;
  953. end
  954. end;
  955.  
  956. procedure rope1S;
  957. var
  958. T: Timer;
  959. begin
  960. lootMark();
  961. dismissAllRandoms();
  962. if R_InteractTile(Point(2710, 3489), 'Cross Tightrope', 3, 3, 3) then
  963. begin
  964. if DidRedClick then
  965. begin
  966. draw('Crossing Rope 1');
  967. T.start;
  968. repeat
  969. wait(150);
  970. until (reflect.Tiles.DistanceFromTile(Point(2710, 3480)) < 1) or (T.timeElapsed > 5000);
  971. end
  972. end
  973. else if not R_InteractTile(Point(2710, 3489), 'Cross Tightrope', 3, 3, 3) then
  974. begin
  975. reflect.Tiles.RotateCameraToTile(Point(2710, 3489));
  976. end
  977. end;
  978.  
  979. procedure gap2S;
  980. var
  981. gap1: TReflectObject;
  982. T: Timer;
  983. pnt: tpoint;
  984. begin
  985. lootMark();
  986. dismissAllRandoms();
  987. if gap1.Find(objGame, 11375, 20) then
  988. begin
  989. pnt := gap1.GetMSPoint;
  990. if (pnt.x > 0) and (pnt.y > 0) and (pnt.x < cW) and (pnt.y < cH) then
  991. Reflect.Mouse.Move(gap1.GetMSPoint, 3, 3);
  992. if (waitUptextMulti(['Jump', 'Gap'], 250)) then
  993. begin
  994. fastClick(Mouse_left);
  995. if DidRedClick then
  996. begin
  997. draw('Jumping Gap 2');
  998. T.start;
  999. repeat
  1000. wait(150);
  1001. until (atBox(2700, 3470, 2715, 3475)) or (T.timeElapsed > 5000);
  1002. end
  1003. end
  1004. else if not (waitUptextMulti(['Jump', 'Gap'], 250)) then
  1005. begin
  1006. setCompass(inttostr(randomrange(210, 230)));
  1007. Reflect.Compass.MakePitch(1 + Random(2));
  1008. end
  1009. end
  1010. end
  1011.  
  1012. procedure gap3S;
  1013. var
  1014. gap1: TReflectObject;
  1015. T: Timer;
  1016. pnt: tpoint;
  1017. begin
  1018. lootMark();
  1019. dismissAllRandoms();
  1020. setCompass(inttostr(randomrange(210, 230)));
  1021. if gap1.Find(objGame, 11376, 20) then
  1022. begin
  1023. wait(randomrange(600, 850));
  1024. pnt := gap1.GetMSPoint;
  1025. if (pnt.x > 0) and (pnt.y > 0) and (pnt.x < cW) and (pnt.y < cH) then
  1026. Reflect.Mouse.Move(gap1.GetMSPoint, 3, 3);
  1027. if (waitUptextMulti(['Jump', 'Gap'], 250)) then
  1028. begin
  1029. fastClick(Mouse_left);
  1030. if DidRedClick then
  1031. begin
  1032. draw('Jumping Gap 3');
  1033. T.start;
  1034. repeat
  1035. wait(150);
  1036. until (reflect.tiles.getplane = 2) or (T.timeElapsed > 5000);
  1037. end
  1038. end
  1039. else if not (waitUptextMulti(['Jump', 'Gap'], 250)) then
  1040. begin
  1041. setCompass(inttostr(randomrange(210, 230)));
  1042. Reflect.Compass.MakePitch(1 + Random(2));
  1043. end
  1044. end
  1045. end
  1046.  
  1047. procedure edgeS;
  1048. var
  1049. edge: TReflectObject;
  1050. T: Timer;
  1051. pnt: tpoint;
  1052. begin
  1053. lootMark();
  1054. dismissAllRandoms();
  1055. if edge.Find(objGame, 11377, 20) then
  1056. begin
  1057. pnt := edge.GetMSPoint;
  1058. if (pnt.x > 0) and (pnt.y > 0) and (pnt.x < cW) and (pnt.y < cH) then
  1059. Reflect.Mouse.Move(edge.GetMSPoint, 3, 3);
  1060. if (waitUptextMulti(['Jump', 'Edge'], 250)) then
  1061. begin
  1062. fastClick(Mouse_left);
  1063. begin
  1064. if DidRedClick then
  1065. begin
  1066. draw('Jumping Off Edge');
  1067. case random(10) of
  1068. 0..7: setCompass(inttostr(randomrange(340, 360)));
  1069. 8..10: setCompass(inttostr(randomrange(1, 30)));
  1070. end
  1071. T.start;
  1072. repeat
  1073. wait(150);
  1074. until (reflect.tiles.getplane = 0) or (T.timeElapsed > 10000);
  1075. end
  1076. end
  1077. end
  1078. else if not (waitUptextMulti(['Jump', 'Edge'], 250)) then
  1079. begin
  1080. setCompass(inttostr(randomrange(135, 160)));
  1081. Reflect.Compass.MakePitch(3 + Random(2));
  1082. end;
  1083. if (getRunEnergy >= (1 + random(30))) and not isUsingRun then
  1084. toggleRunning(true);
  1085. inc(lapcount);
  1086. end
  1087. end
  1088.  
  1089. procedure thewallV();
  1090. var
  1091. obj_Wall: TMSObject;
  1092. Pnt: TPoint;
  1093. T: Timer;
  1094. begin
  1095. lootMark();
  1096. dismissAllRandoms();
  1097. if R_InteractTile(Point(3220, 3414), 'Climb Rough wall', 3, 3, 2) then
  1098. begin
  1099. if DidRedClick then
  1100. begin
  1101. draw('Climbing Rough Wall');
  1102. T.start;
  1103. repeat
  1104. wait(150);
  1105. until (reflect.Tiles.DistanceFromTile(Point(3219, 3414)) < 1) or (T.timeElapsed > 5000);
  1106. end
  1107. end
  1108. else if not R_InteractTile(Point(3220, 3414), 'Climb Rough wall', 3, 3, 3) then
  1109. begin
  1110. Reflect.Compass.MakePitch(5 + Random(2));
  1111. setCompass(inttostr(randomrange(260, 290)));
  1112. end
  1113. end;
  1114.  
  1115. procedure clotheslineV;
  1116. var
  1117. gap1: TReflectObject;
  1118. T: Timer;
  1119. pnt: tpoint;
  1120. begin
  1121. lootMark();
  1122. dismissAllRandoms();
  1123. if gap1.Find(objGame, 10587, 20) then
  1124. begin
  1125. pnt := gap1.GetMSPoint;
  1126. if (pnt.x > 0) and (pnt.y > 0) and (pnt.x < cW) and (pnt.y < cH) then
  1127. Reflect.Mouse.Move(gap1.GetMSPoint, 3, 3);
  1128. if (waitUptextMulti(['Cross', 'Clothes line'], 250)) then
  1129. begin
  1130. fastClick(Mouse_left);
  1131. if DidRedClick then
  1132. begin
  1133. draw('Jumping Gap 3');
  1134. wait(randomrange(500, 1700));
  1135. Reflect.Compass.MakePitch(1 + Random(3));
  1136. T.start;
  1137. repeat
  1138. wait(150);
  1139. until (reflect.Tiles.DistanceFromTile(Point(3208, 3414)) < 1) or (T.timeElapsed > 5000);
  1140. end
  1141. end
  1142. else if not (waitUptextMulti(['Cross', 'Clothes line'], 250)) then
  1143. begin
  1144. setCompass(inttostr(randomrange(250, 290)));
  1145. Reflect.Compass.MakePitch(4 + Random(2));
  1146. end
  1147. end
  1148. end
  1149.  
  1150. procedure gap1V;
  1151. var
  1152. gap1: TReflectObject;
  1153. T: Timer;
  1154. pnt: tpoint;
  1155. begin
  1156. lootMark();
  1157. dismissAllRandoms();
  1158. if gap1.Find(objGame, 10642, 20) then
  1159. begin
  1160. pnt := gap1.GetMSPoint;
  1161. if (pnt.x > 0) and (pnt.y > 0) and (pnt.x < cW) and (pnt.y < cH) then
  1162. Reflect.Mouse.Move(gap1.GetMSPoint, 3, 3);
  1163. if (waitUptextMulti(['Leap', 'Gap'], 250)) then
  1164. begin
  1165. fastClick(Mouse_left);
  1166. if DidRedClick then
  1167. begin
  1168. draw('Jumping Gap 1');
  1169. T.start;
  1170. repeat
  1171. wait(150);
  1172. until (reflect.Tiles.DistanceFromTile(Point(3197, 3416)) < 1) or (T.timeElapsed > 5000);
  1173. end
  1174. end
  1175. else if not (waitUptextMulti(['Leap', 'Gap'], 250)) then
  1176. begin
  1177. setCompass(inttostr(randomrange(250, 290)));
  1178. Reflect.Compass.MakePitch(4 + Random(2));
  1179. end
  1180. end
  1181. end
  1182.  
  1183. procedure wall1V;
  1184. var
  1185. gap1: TReflectObject;
  1186. T: Timer;
  1187. pnt: tpoint;
  1188. begin
  1189. lootMark();
  1190. dismissAllRandoms();
  1191. if gap1.Find(objGame, 10777, 20) then
  1192. begin
  1193. pnt := gap1.GetMSPoint;
  1194. if (pnt.x > 0) and (pnt.y > 0) and (pnt.x < cW) and (pnt.y < cH) then
  1195. Reflect.Mouse.Move(gap1.GetMSPoint, 3, 3);
  1196. if (waitUptextMulti(['Balance', 'Wall'], 250)) then
  1197. begin
  1198. fastClick(Mouse_left);
  1199. if DidRedClick then
  1200. begin
  1201. draw('Balancing on wall');
  1202. wait(randomrange(500, 3000));
  1203. setCompass(inttostr(randomrange(95, 230)));
  1204. T.start;
  1205. repeat
  1206. wait(150);
  1207. until (reflect.Tiles.DistanceFromTile(Point(3197, 3416)) < 1) or (T.timeElapsed > 5000);
  1208. end
  1209. end
  1210. else if not (waitUptextMulti(['Balance', 'Wall'], 250)) then
  1211. begin
  1212. setCompass(inttostr(randomrange(250, 290)));
  1213. Reflect.Compass.MakePitch(4 + Random(2));
  1214. end
  1215. end
  1216. end
  1217.  
  1218. procedure gap2V;
  1219. var
  1220. gap1: TReflectObject;
  1221. T: Timer;
  1222. pnt: tpoint;
  1223. begin
  1224. lootMark();
  1225. dismissAllRandoms();
  1226. if gap1.Find(objGame, 10778, 20) then
  1227. begin
  1228. pnt := gap1.GetMSPoint;
  1229. if (pnt.x > 0) and (pnt.y > 0) and (pnt.x < cW) and (pnt.y < cH) then
  1230. Reflect.Mouse.Move(gap1.GetMSPoint, 3, 3);
  1231. if (waitUptextMulti(['Leap', 'Gap'], 250)) then
  1232. begin
  1233. fastClick(Mouse_left);
  1234. if DidRedClick then
  1235. begin
  1236. draw('Jumping gap 2');
  1237. wait(randomrange(500, 3000));
  1238. setCompass(inttostr(randomrange(60, 130)));
  1239. Reflect.Compass.MakePitch(1);
  1240. T.start;
  1241. repeat
  1242. wait(150);
  1243. until (atBox(3182, 3382, 3208, 3403)) or (T.timeElapsed > 5000);
  1244. end
  1245. end
  1246. else if not (waitUptextMulti(['Leap', 'Gap'], 250)) then
  1247. begin
  1248. setCompass(inttostr(randomrange(95, 230)));
  1249. Reflect.Compass.MakePitch(4 + Random(2));
  1250. end
  1251. end
  1252. end
  1253.  
  1254. procedure gap3V;
  1255. var
  1256. gap1: TReflectObject;
  1257. T: Timer;
  1258. pnt: tpoint;
  1259. begin
  1260. lootMark();
  1261. dismissAllRandoms();
  1262. if gap1.Find(objGame, 10779, 50) then
  1263. begin
  1264. pnt := gap1.GetMSPoint;
  1265. if (pnt.x > 0) and (pnt.y > 0) and (pnt.x < cW) and (pnt.y < cH) then
  1266. Reflect.Mouse.Move(gap1.GetMSPoint, 3, 3);
  1267. if (waitUptextMulti(['Leap', 'Gap'], 250)) then
  1268. begin
  1269. fastClick(Mouse_left);
  1270. if DidRedClick then
  1271. begin
  1272. draw('Jumping gap 3');
  1273. T.start;
  1274. repeat
  1275. wait(150);
  1276. until (atBox(3218, 3393, 3232, 3403)) or (T.timeElapsed > 5000);
  1277. end
  1278. end
  1279. else if not (waitUptextMulti(['Leap', 'Gap'], 250)) then
  1280. begin
  1281. draw('Walking to gap');
  1282. myplayer.blindwalkMM(Point(3208, 3399), 3);
  1283. setCompass(inttostr(randomrange(60, 130)));
  1284. Reflect.Compass.MakePitch(3 + Random(3));
  1285. end
  1286. end
  1287. end
  1288.  
  1289. procedure gap4V;
  1290. var
  1291. gap1: TReflectObject;
  1292. T: Timer;
  1293. pnt: tpoint;
  1294. begin
  1295. lootMark();
  1296. dismissAllRandoms();
  1297. myplayer.blindwalkMM(Point(3230, 3402), 3);
  1298. if gap1.Find(objGame, 10780, 20) then
  1299. begin
  1300. pnt := gap1.GetMSPoint;
  1301. if (pnt.x > 0) and (pnt.y > 0) and (pnt.x < cW) and (pnt.y < cH) then
  1302. Reflect.Mouse.Move(gap1.GetMSPoint, 3, 3);
  1303. if (waitUptextMulti(['Leap', 'Gap'], 250)) then
  1304. begin
  1305. fastClick(Mouse_left);
  1306. if DidRedClick then
  1307. begin
  1308. draw('Leaping gap');
  1309. Reflect.Compass.MakePitch(2 + Random(2));
  1310. T.start;
  1311. repeat
  1312. wait(150);
  1313. until (atBox(3236, 3403, 3240, 3408)) or (T.timeElapsed > 5000);
  1314. end
  1315. end
  1316. else if not (waitUptextMulti(['Leap', 'Gap'], 250)) then
  1317. begin
  1318. draw('Walking to gap');
  1319. setCompass(inttostr(randomrange(80, 110)));
  1320. Reflect.Compass.MakePitch(2 + Random(4));
  1321. end
  1322. end
  1323. end
  1324.  
  1325. procedure ledgeV;
  1326. var
  1327. gap1: TReflectObject;
  1328. T: Timer;
  1329. pnt: tpoint;
  1330. begin
  1331. lootMark();
  1332. dismissAllRandoms();
  1333. if gap1.Find(objGame, 10781, 20) then
  1334. begin
  1335. pnt := gap1.GetMSPoint;
  1336. if (pnt.x > 0) and (pnt.y > 0) and (pnt.x < cW) and (pnt.y < cH) then
  1337. Reflect.Mouse.Move(gap1.GetMSPoint, 3, 3);
  1338. if (waitUptextMulti(['Hurdle', 'Ledge'], 250)) then
  1339. begin
  1340. fastClick(Mouse_left);
  1341. if DidRedClick then
  1342. begin
  1343. draw('Climbing up');
  1344. wait(randomrange(500, 3000));
  1345. Reflect.Compass.MakePitch(6 + Random(2));
  1346. setCompass(inttostr(randomrange(280, 350)));
  1347. T.start;
  1348. repeat
  1349. wait(150);
  1350. until (atBox(3236, 3410, 3240, 3415)) or (T.timeElapsed > 5000);
  1351. end
  1352. end
  1353. else if not (waitUptextMulti(['Hurdle', 'Ledge'], 250)) then
  1354. begin
  1355. setCompass(inttostr(randomrange(315, 359)));
  1356. Reflect.Compass.MakePitch(5 + Random(2));
  1357. end
  1358. end
  1359. if (getRunEnergy >= (1 + random(99))) and not isUsingRun then
  1360. toggleRunning(true);
  1361. wait(randomrange(1400, 1900));
  1362. inc(lapcount);
  1363. end
  1364.  
  1365. procedure edgeV;
  1366. var
  1367. gap1: TReflectObject;
  1368. T: Timer;
  1369. pnt: tpoint;
  1370. begin
  1371. lootMark();
  1372. dismissAllRandoms();
  1373. if gap1.Find(objGame, 10817, 20) then
  1374. begin
  1375. pnt := gap1.GetMSPoint;
  1376. if (pnt.x > 0) and (pnt.y > 0) and (pnt.x < cW) and (pnt.y < cH) then
  1377. Reflect.Mouse.Move(gap1.GetMSPoint, 3, 3);
  1378. if (waitUptextMulti(['Jump-off', 'Edge'], 250)) then
  1379. begin
  1380. fastClick(Mouse_left);
  1381. if DidRedClick then
  1382. begin
  1383. draw('Climbing down');
  1384. T.start;
  1385. repeat
  1386. wait(150);
  1387. until (reflect.Tiles.getplane = 0) or (T.timeElapsed > 5000);
  1388. end
  1389. end
  1390. else if not (waitUptextMulti(['Jump-off', 'Edge'], 250)) then
  1391. begin
  1392. setCompass(inttostr(randomrange(280, 350)));
  1393. Reflect.Compass.MakePitch(6 + Random(2));
  1394. end
  1395. end
  1396. end
  1397.  
  1398. procedure walkToWallV;
  1399. var
  1400. T: Timer;
  1401. begin
  1402. draw('Walking to Wall');
  1403. if MyPlayer.GetHealth < EATAT then
  1404. eatFood;
  1405. myplayer.blindwalkMM(Point(3223, 3414), 1);
  1406. while not myplayer.ismoving do
  1407. begin
  1408. T.start;
  1409. if T.timeelapsed > 2500 then
  1410. Break;
  1411. Wait(150);
  1412. end;
  1413. breakhandler();
  1414. end;
  1415.  
  1416.  
  1417.  
  1418. {function checkForPlayer: Boolean;
  1419. begin
  1420. if( length(getMiniMapDots('white')) > 0 ) then
  1421. begin
  1422. writeln(intToStr( length(getMiniMapDots('white')))+ ' player has been spotted');
  1423. TReflectionGametab.SwitchWorld(324);
  1424. exit(true);
  1425. end;
  1426. end; }
  1427.  
  1428.  
  1429.  
  1430. function getStateV(): Integer;
  1431. begin
  1432. if not isLoggedIn() then
  1433. exit(1);
  1434. if lootMark() then
  1435. exit(2);
  1436. if (reflect.Tiles.NearTile(Point(3221, 3414), 5)) and (reflect.Tiles.getplane = 0) then
  1437. exit(3);
  1438. if atBox(3214, 3410, 3219, 3419) then
  1439. exit(4);
  1440. if atBox(3201, 3413, 3208, 3417) then
  1441. exit(5);
  1442. if atBox(3194, 3416, 3197, 3416) then
  1443. exit(6);
  1444. if atBox(3192, 3402, 3198, 3406) then
  1445. exit(7);
  1446. if atBox(3182, 3382, 3208, 3403) then
  1447. exit(8);
  1448. if atBox(3218, 3393, 3232, 3403) then
  1449. exit(9);
  1450. if atBox(3236, 3403, 3240, 3408) then
  1451. exit(10);
  1452. if atBox(3236, 3410, 3240, 3415) then
  1453. exit(11);
  1454. if reflect.Tiles.getplane = 0 then
  1455. exit(12);
  1456. end;
  1457.  
  1458. procedure executeStateV(State: Integer);
  1459. begin
  1460. case (State) of
  1461. 1: HandleLogin();
  1462. 2: lootMark();
  1463. 3: theWallV();
  1464. 4: clotheslineV();
  1465. 5: gap1V();
  1466. 6: wall1V();
  1467. 7: gap2V();
  1468. 8: gap3V();
  1469. 9: gap4V();
  1470. 10: ledgeV();
  1471. 11: edgeV();
  1472. 12: walkToWallV();
  1473. end;
  1474. wait(randomrange(75, 175));
  1475. end;
  1476.  
  1477. function getStateS(): Integer;
  1478. begin
  1479. if not isLoggedIn() then
  1480. exit(1);
  1481. if lootMark() then
  1482. exit(2);
  1483. if (reflect.Tiles.NearTile(Point(2729, 3488), 10)) and (reflect.Tiles.getplane = 0) then
  1484. exit(3);
  1485. if atBox(2721, 2730, 3490, 3497) then
  1486. exit(4);
  1487. if atBox(2705, 3488, 2713, 3495) then
  1488. exit(5);
  1489. if atBox(2710, 3477, 2715, 3481) then
  1490. exit(6);
  1491. if atBox(2700, 3470, 2715, 3475) then
  1492. exit(7);
  1493. if atBox(2698, 3460, 2702, 3465) then
  1494. exit(8);
  1495. if (reflect.Tiles.NearTile(Point(2704, 3464), 3)) and (reflect.Tiles.getplane = 0) then
  1496. exit(9);
  1497. if (reflect.Tiles.NearTile(Point(2715, 3494), 3)) and (reflect.Tiles.getplane = 0) then
  1498. exit(10);
  1499. if (reflect.Tiles.NearTile(Point(2710, 3484), 3)) and (reflect.Tiles.getplane = 0) then
  1500. exit(11);
  1501. end;
  1502.  
  1503. procedure executeStateS(State: Integer);
  1504. begin
  1505. case (State) of
  1506. 1: HandleLogin();
  1507. 2: lootMark();
  1508. 3: theWallS();
  1509. 4: gap1S();
  1510. 5: rope1S();
  1511. 6: gap2S();
  1512. 7: gap3S();
  1513. 8: edgeS();
  1514. 9: MyPlayer.WalkPathMM([Point(2711, 3463), Point(2719, 3468), Point(2723, 3472), Point(2727, 3478), Point(2727, 3480), Point(2729, 3484), Point(2729, 3488)]);
  1515. 10: MyPlayer.WalkPathMM([Point(2715, 3485), Point(2720, 3485), Point(2726, 3485), Point(2729, 3488)]);
  1516. 11: MyPlayer.WalkPathMM([Point(2717, 3491), Point(2720, 3485), Point(2726, 3485), Point(2729, 3488)]);
  1517. //9: walkToWallS();
  1518. end;
  1519. wait(randomrange(75, 175));
  1520. end;
  1521.  
  1522. function getStateF(): Integer;
  1523. begin
  1524. if not isLoggedIn() then
  1525. exit(1);
  1526. if lootMark() then
  1527. exit(2);
  1528. if (reflect.Tiles.NearTile(Point(3036, 3341), 3)) and (reflect.Tiles.getplane = 0) then
  1529. exit(3);
  1530. if atBox(3036, 3342, 3040, 3343) then
  1531. exit(4);
  1532. if atBox(3045, 3341, 3051, 3349) then
  1533. exit(5);
  1534. if atBox(3048, 3357, 3050, 3358) then
  1535. exit(6);
  1536. if atBox(3045, 3361, 3048, 3367) then
  1537. exit(7);
  1538. if atBox(3034, 3361, 3041, 3364) then
  1539. exit(8);
  1540. if atBox(3026, 3352, 3029, 3355) then
  1541. exit(9);
  1542. if atBox(3009, 3353, 3021, 3358) then
  1543. exit(10);
  1544. if atBox(3016, 3343, 3022, 3349) then
  1545. exit(11);
  1546. if atBox(3011, 3344, 3014, 3346) then
  1547. exit(12);
  1548. if atBox(3009, 3335, 3013, 3342) then
  1549. exit(13);
  1550. if atBox(3012, 3331, 3017, 3334) then
  1551. exit(14);
  1552. if atBox(3019, 3332, 3024, 3335) then
  1553. exit(15);
  1554. if reflect.Tiles.getplane = 0 then
  1555. exit(16);
  1556. end;
  1557.  
  1558. procedure executeStateF(State: Integer);
  1559. begin
  1560. case (State) of
  1561. 1: HandleLogin();
  1562. 2: lootMark();
  1563. 3: thewallF();
  1564. 4: rope1F();
  1565. 5: holdsF();
  1566. 6: gap1F();
  1567. 7: gap2F();
  1568. 8: rope2F();
  1569. 9: rope3F();
  1570. 10: gap3F();
  1571. 11: ledge1F();
  1572. 12: ledge2F();
  1573. 13: ledge3F();
  1574. 14: ledge4F();
  1575. 15: edge1F();
  1576. 16: walkToWallF();
  1577. end;
  1578. wait(randomrange(75, 175));
  1579. end;
  1580.  
  1581. function getStateD(): Integer;
  1582. begin
  1583. if not isLoggedIn() then
  1584. exit(1);
  1585. if lootMark() then
  1586. exit(2);
  1587. if (reflect.Tiles.NearTile(Point(3104, 3279), 3)) and (reflect.Tiles.getplane = 0) then
  1588. exit(3);
  1589. if atBox(3097, 3277, 3102, 3281) then
  1590. exit(4);
  1591. if atBox(3088, 3273, 3091, 3276) then
  1592. exit(5);
  1593. if atBox(3089, 3265, 3094, 3267) then
  1594. exit(6);
  1595. if atBox(3088, 3257, 3088, 3261) then
  1596. exit(7);
  1597. if atBox(3087, 3254, 3094, 3255) then
  1598. exit(8);
  1599. if atBox(3096, 3256, 3101, 3261) then
  1600. exit(9);
  1601. if reflect.Tiles.getplane = 0 then
  1602. exit(10);
  1603. end;
  1604.  
  1605. procedure executeStateD(State: Integer);
  1606. begin
  1607. case (State) of
  1608. 1: HandleLogin();
  1609. 2: lootMark();
  1610. 3: thewallD();
  1611. 4: rope1D();
  1612. 5: rope2D();
  1613. 6: nwallD();
  1614. 7: jwallD();
  1615. 8: gapD();
  1616. 9: crateD();
  1617. 10: walkToWallD();
  1618. end;
  1619. wait(randomrange(75, 175));
  1620. end;
  1621.  
  1622. begin
  1623. initAL();
  1624. AutoUpdateScript;
  1625. Reflect.Setup();
  1626. myplayer.Create;
  1627. loadVars();
  1628. repeat
  1629. //checkForPlayer;
  1630. if (Course = 'Draynor') then
  1631. begin
  1632. executeStateD(getStateD());
  1633. end
  1634. else if (Course = 'Falador') then
  1635. begin
  1636. executeStateF(getStateF());
  1637. end
  1638. else if (Course = 'Seers') then
  1639. begin
  1640. executeStateS(getStateS());
  1641. end
  1642. else if (Course = 'Varrock') then
  1643. begin
  1644. executeStateV(getStateV());
  1645. end
  1646. until (false);
  1647. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement