Advertisement
Guest User

Untitled

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