Guest User

Untitled

a guest
Oct 5th, 2016
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.25 KB | None | 0 0
  1. Program Reflect_Smelter;
  2.  
  3. {$DEFINE SMART}
  4. {$I Reflection\Reflection.simba}
  5.  
  6. Const
  7.  
  8. NAME = '';
  9. PASSWORD = '';
  10. HEALBETWEEN = [23, 40];
  11.  
  12. Var
  13.  
  14. LocPlayer : TReflectLocalPlayer;
  15. Tiles, midTiles : TPointArray;
  16. Tile : TPoint;
  17. Heal, xpInt, WaitCoffeeI, WaitEatI, WaitFapI, WaitSleepI, antibans : Integer;
  18. runTime, WaitCoffee, WaitEat, WaitFap, WaitSleep : TReflectTimer;
  19.  
  20. Procedure Terminate(s : string);
  21. Begin
  22. WriteLn(s);
  23. TerminateScript();
  24. End;
  25.  
  26. Procedure setVars();
  27. Begin
  28. LocPlayer.Username := NAME;
  29. LocPlayer.Password := PASSWORD;
  30. Tiles := [Point(3009, 3518), Point(3008, 3517), Point(3008, 3516), Point(3008, 3515), Point(3008, 3514), Point(3009, 3517), Point(3009, 3516), Point(3009, 3515), Point(3009, 3514), Point(3009, 3513), Point(3010, 3513), Point(3010, 3514), Point(3010, 3517), Point(3010, 3518), Point(3011, 3518), Point(3011, 3517), Point(3011, 3514), Point(3011, 3513), Point(3012, 3514), Point(3012, 3515), Point(3012, 3516), Point(3012, 3517), Point(3013, 3516), Point(3013, 3515), Point(3013, 3514), Point(3014, 3515), Point(3014, 3516), Point(3015, 3515), Point(3015, 3516), Point(3016, 3515), Point(3016, 3516), Point(3017, 3515), Point(3017, 3516), Point(3018, 3516), Point(3018, 3515), Point(3019, 3513), Point(3019, 3514), Point(3019, 3515), Point(3019, 3516), Point(3019, 3517)];
  31. midTiles := [Point(3014, 3515), Point(3014, 3516), Point(3015, 3515), Point(3015, 3516), Point(3016, 3515), Point(3016, 3516), Point(3017, 3515), Point(3017, 3516)];
  32. Heal := RandomRange(HEALBETWEEN[0], HEALBETWEEN[1]);
  33. xpInt := locPlayer.GetSkillExp(SKILL_HITPOINTS);
  34. WaitCoffee.Start;
  35. WaitFap.start;
  36. WaitEat.start;
  37. WaitSleep.start;
  38. WaitCoffeeI := (RandomRange(11, 40) * 1000 * 60) + Random(60000);
  39. WaitFapI := (RandomRange(180, 800) * 1000 * 60) + Random(60000);
  40. WaitEatI := (RandomRange(218, 402) * 1000 * 60) + Random(60000);
  41. WaitSleepI := (RandomRange(680, 890) * 1000 * 60) + Random(60000);
  42. End;
  43.  
  44. Procedure paint();
  45. Begin
  46. Reflect.Smart.Graphics.Clear;
  47. Reflect.Smart.Graphics.DrawClippedText('XP/H: ' + ToStr(Round((locPlayer.GetSkillExp(SKILL_HITPOINTS)-xpInt) * (3600000/getTimeRunning) * 4)), 'SmallChars07', Point(20, 20));
  48. Reflect.Smart.Graphics.DrawClippedText('Time run: ' + Reflect.Time.MsToTime(getTimeRunning, Time_Short), 'SmallChars07', Point(20, 40));
  49. Reflect.Smart.Graphics.DrawClippedText('XP Gained: ' + toStr((locPlayer.GetSkillExp(SKILL_HITPOINTS)-xpInt) * 4), 'SmallChars07', Point(20, 60));
  50. End;
  51.  
  52. Procedure RotateRandom();
  53. Begin
  54. Case Random(46) Of
  55. 0..24:
  56. Begin
  57. KeyDown(VK_LEFT);
  58. Wait(RandomRange(138, 364));
  59. If Random(5) < 3 then
  60. Reflect.Antiban.HumanRandomMouse();
  61. Wait(RandomRange(242, 441));
  62. KeyUp(VK_LEFT);
  63. End;
  64. 25..46:
  65. Begin
  66. KeyDown(VK_RIGHT);
  67. Wait(RandomRange(138, 364));
  68. If Random(5) < 3 then
  69. Reflect.Antiban.HumanRandomMouse();
  70. Wait(RandomRange(242, 441));
  71. KeyUp(VK_RIGHT);
  72. End;
  73. End;
  74. End;
  75.  
  76. Function PntOutsideBox(Box : TBox; maxDist : integer) : TPoint;
  77. Begin
  78. If Random(30) > 22 Then
  79. Result.X := (Box.X2 + 1) + Random(maxDist) Else
  80. Result.X := (Box.X1 - 1) - Random(maxDist);
  81. If Random(20) > 13 Then
  82. Result.Y := (Box.Y1 - 1) - Random(maxDist) Else
  83. Result.Y := (Box.Y2 + 1) + Random(maxDist);
  84. End;
  85.  
  86. Procedure MOffClient();
  87. var
  88. time : Integer;
  89. Begin
  90. time := abs(Reflect.Math.iGaussRange(-20000, 31245));
  91. Reflect.Mouse.Move(PntOutsideBox(intToBox(0, 0, 766, 506), 99), 0, 0);
  92. Wait(time);
  93. Reflect.Mouse.Move(MSX1, MSY1, MSX2, MSY2);
  94. End;
  95.  
  96. Procedure MOffClient(time : Integer); overload;
  97. Begin
  98. Reflect.Mouse.Move(PntOutsideBox(intToBox(0, 0, 766, 506), 99), 0, 0);
  99. Wait(time);
  100. Reflect.Mouse.Move(MSX1, MSY1, MSX2, MSY2);
  101. End;
  102.  
  103. Procedure AfterClick();
  104. Var
  105. msp : Integer;
  106. Begin
  107. msp := Reflect.mouseSpeed;
  108. Reflect.mouseSpeed := RandomRange(19, 25);
  109. Wait(Random(47, 93));
  110. Case Random(170) Of
  111. 0..7: Reflect.Antiban.SleepAndMoveMouse(RandomRange(200, 500));
  112. 8..29: Reflect.Antiban.pickUpMouse;
  113. 30..41: Reflect.Mouse.Move(105, 205, 430, 382);
  114. 42..48: Reflect.Mouse.Move(535, 206, 739, 465);
  115. End;
  116. Reflect.mouseSpeed := msp;
  117. End;
  118.  
  119. function TReflectionTiles.RotateCameraToTile(Tile: TTile): Boolean; override;
  120. var
  121. Angle: Extended;
  122. Me: TPoint;
  123. begin
  124. Me:= Reflect.Tiles.GetGlobalTile;
  125. Angle:= (Degrees(ArcTan2(Tile.Y - Me.Y, Tile.X - Me.X))) - 90;
  126. Angle := Angle + RandomRange(-90, 90);
  127. if (Angle < 0) then
  128. Angle:= 360 + angle;
  129. Angle:= 360 - angle;
  130. Result:= Reflect.Compass.Make(angle);
  131. end;
  132.  
  133. Procedure checkReport();
  134. Var
  135. widg : TReflectWidget;
  136. Begin
  137. If widg.isValid(553, 4) Then
  138. Begin
  139. Reflect.Mouse.Move(Point(485, 32), 5, 5, Mouse_Left);
  140. Wait(1000 + Random(500));
  141. End;
  142. widg.free;
  143. End;
  144.  
  145. Procedure antiBanHandler();
  146. var
  147. i : integer;
  148. Begin
  149. i := Random(5263);
  150. Case i Of
  151. 0..9:
  152. Begin
  153. Reflect.Gametab.Open(Gametab_Stats);
  154. Reflect.Mouse.Move(Point(644, 222), 10, 5);
  155. Wait(randomRange(1425, 2124));
  156. Reflect.Gametab.Open(Gametab_Inventory);
  157. Wait(randomRange(140, 235));
  158. AfterClick();
  159. End;
  160. 7..12: Reflect.Antiban.SleepAndMoveMouse(RandomRange(124, 430));
  161. 11..15: Reflect.Antiban.pickUpMouse;
  162. 18..24: rotateRandom();
  163. 25..26: MOffClient();
  164. End;
  165. If i < 27 Then
  166. Begin
  167. inc(antibans);
  168. writeLn(toStr(antibans) + ' ' + toStr(i));
  169. End;
  170. End;
  171.  
  172. Procedure WaitHandler();
  173. Var
  174. Break1, Break2, Break3, Break4 : Integer;
  175. Begin
  176. If WaitCoffee.elapsedTime > WaitCoffeeI Then
  177. Begin
  178. Break1 := (RandomRange(1, 5) * 60 * 1000) + Random(60000);
  179. WriteLn('Breaking for ' + Reflect.time.MsToTime(Break1, Time_Short));
  180. If Random(10) < 7 Then
  181. MOffClient(Break1) Else
  182. Wait(Break1);
  183. WaitCoffeeI := (RandomRange(11, 40) * 1000 * 60) + Random(60000);
  184. WaitCoffee.restart;
  185. End;
  186. If WaitFap.elapsedTime > WaitFapI Then
  187. Begin
  188. Break2 := (RandomRange(14, 26) * 60 * 1000) + Random(60000);
  189. WriteLn('Breaking for ' + Reflect.time.MsToTime(Break2, Time_Short));
  190. If Random(10) < 7 Then
  191. MOffClient(Break2) Else
  192. Wait(Break2);
  193. WaitFapI := (RandomRange(180, 800) * 1000 * 60) + Random(60000);
  194. WaitFap.restart;
  195. End;
  196. If WaitEat.elapsedTime > WaitEatI Then
  197. Begin
  198. Break3 := (RandomRange(12, 41) * 60 * 1000) + Random(60000);
  199. WriteLn('Breaking for ' + Reflect.time.MsToTime(Break3, Time_Short));
  200. If Random(10) < 7 Then
  201. MOffClient(Break3) Else
  202. Wait(Break3);
  203. WaitEatI := (RandomRange(218, 402) * 1000 * 60) + Random(60000);
  204. WaitEat.restart;
  205. End;
  206. If WaitSleep.elapsedTime > WaitSleepI Then
  207. Begin
  208. Break4 := (RandomRange(480, 642) * 60 * 1000) + Random(60000);
  209. WriteLn('Breaking for ' + Reflect.time.MsToTime(Break4, Time_Short));
  210. If Random(10) < 7 Then
  211. MOffClient(Break4) Else
  212. Wait(Break4);
  213. WaitSleepI := (RandomRange(680, 890) * 1000 * 60) + Random(60000);
  214. WaitSleep.restart;
  215. End;
  216. End;
  217.  
  218. Procedure pickUpBones();
  219. Var
  220. i : integer;
  221. gItem : TReflectGroundItem;
  222. intArr : TIntegerArray;
  223. Begin
  224. For I := 0 To Random(Random(10)) Do
  225. Begin
  226. checkReport();
  227. If Reflect.Inv.count = 28 Then
  228. Exit();
  229. If Not(gItem.Find('Bones', 8)) Then
  230. Exit();
  231. If gItem.isOnMS Then
  232. Begin
  233. Reflect.Mouse.Move(gItem.getMSPoint, 5, 5);
  234. If Reflect.Text.IsUpText('Bones', Random(73, 128)) Then
  235. Begin
  236. Reflect.Mouse.Click(Mouse_Left);
  237. Wait(Random(400, 700));
  238. locPlayer.WaitWhileMoving(Random(100, 200), Random(4000, 5000));
  239. Wait(Random(400, 700));
  240. End Else
  241. If Not(Reflect.Text.isUpText('Walk here', RandomRange(73, 126))) And (Length(Reflect.Text.getUpText) > 0) Then
  242. Begin
  243. Reflect.Mouse.Click(Mouse_Right);
  244. Wait(Random(50, 100));
  245. Reflect.Text.ChooseOption('Take Bones', Random(200, 400));
  246. Wait(Random(400, 700));
  247. locPlayer.WaitWhileMoving(Random(100, 200), Random(4000, 5000));
  248. Wait(Random(400, 700));
  249. End;
  250. End;
  251. End;
  252. End;
  253.  
  254. Procedure makePeaches();
  255. Var
  256. i, count, Pos : Integer;
  257. inv : TReflectInvItemArray;
  258. gItem : TReflectGroundItem;
  259. hasBones : Boolean;
  260. Begin
  261. if Not(LocPlayer.isloggedIn) Then
  262. Exit();
  263. inv.GetAll;
  264. For I := 0 To High(inv) Do
  265. If inv[i].getName = 'Peach' Then
  266. Exit();
  267. While Reflect.Inv.Count < 28 Do
  268. Begin
  269. checkReport();
  270. if Not(LocPlayer.isloggedIn) Then
  271. Exit();
  272. gItem.Find('Bones', 8);
  273. If gItem.isOnMS Then
  274. Begin
  275. Reflect.Mouse.Move(gItem.getMSPoint, 5, 5, Mouse_Left);
  276. Wait(Random(400, 700));
  277. locPlayer.WaitWhileMoving(Random(100, 200), Random(4000, 5000));
  278. Wait(Random(400, 700));
  279. End;
  280. End;
  281. inv.GetAll;
  282. For I := 0 To High(inv) Do
  283. Begin
  284. checkReport();
  285. If inv[i].getName = 'Bones' Then
  286. hasBones := True Else
  287. If inv[i].getName = 'Bones to peaches' Then
  288. pos := i;
  289. End;
  290. If hasBones Then
  291. Begin
  292. Reflect.Mouse.Move(inv[pos].getMSPoint, 5, 5, Mouse_Left);
  293. Wait(Random(2300, 3000));
  294. End Else
  295. Terminate('Ran out of B2P. Ran: ' + toStr(runTime.elapsedTime));
  296. End;
  297.  
  298. Procedure checkHP();
  299. Label
  300. retry;
  301. Label
  302. redo;
  303. Var
  304. Inv : TReflectInvItemArray;
  305. I, x, y, tries : Integer;
  306. TPA : TPointArray;
  307. Begin
  308. if Not(LocPlayer.isloggedIn) Then
  309. Exit();
  310. redo:
  311. If (locPlayer.GetHealth < Heal) And Not(FindColor(x, y, 65280, 524, 55, 540, 68)) Then
  312. Begin
  313. checkReport();
  314. inv.GetAll();
  315. For I := 0 To High(inv) Do
  316. If inv[i].getName = 'Peach' Then
  317. Begin
  318. setLength(TPA, Length(TPA) + 1);
  319. TPA[High(TPA)] := inv[i].getMSPoint;
  320. End;
  321. If Length(TPA) = 0 Then
  322. Begin
  323. makePeaches();
  324. goto redo;
  325. End;
  326. I := Random(Random(Random(Random(Length(TPA)))));
  327. retry:
  328. inc(tries);
  329. if tries > 5 then
  330. Begin
  331. makePeaches();
  332. exit();
  333. End;
  334. Reflect.Mouse.Move(TPA[i], 5, 5);
  335. If Reflect.Text.IsUpText('Peach', RandomRange(182, 293)) Then
  336. Reflect.Mouse.Click(Mouse_Left) Else goto retry;
  337. If Random(252) < 100 Then
  338. Reflect.Antiban.SleepAndMoveMouse(RandomRange(200, 500));
  339. Wait(RandomRange(164, 293));
  340. End;
  341. End;
  342.  
  343. Function filterPoint(Pnt : TPoint; TPA : TPointArray) : TPointArray;
  344. var
  345. i : integer;
  346. Begin
  347. for i := 0 to High(TPA) do
  348. If not((TPA[i].x = Pnt.x) and (TPA[i].y = Pnt.y)) Then
  349. Begin
  350. setLength(result, length(result) + 1);
  351. result[high(result)] := TPA[i];
  352. End;
  353. End;
  354.  
  355. Function mouseUpText(Pnt : TPoint; upText : String; maxWait : Integer) : Boolean;
  356. Var
  357. Timer : TReflectTimer;
  358. Begin
  359. result := true;
  360. Reflect.Mouse.Move(Pnt, 5, 5);
  361. If Reflect.Text.IsUpText(upText, maxWait) Then
  362. Reflect.Mouse.Click(Mouse_Left) Else
  363. result := false;
  364. End;
  365.  
  366. Function goBackIn() : boolean;
  367. Label
  368. retry;
  369. Var //Laga checker om man är upstairs eller ute eller i hemliga underjordiska rummet.
  370. inv : TReflectInvItemArray;
  371. str, Action : String;
  372. i, tries : integer;
  373. Pnt, PntEx, PntExt, Pnt1, Pnt2, Pnt3 : TPoint;
  374. SecretRoom : TPointArray;
  375. Begin
  376. checkReport();
  377. Wait(RandomRange(5000, 7000));
  378. if Not(LocPlayer.isloggedIn) Then
  379. Exit();
  380. SecretRoom := [Point(3016, 3517), Point(3016, 3518), Point(3015, 3517), Point(3015, 3518)];
  381. Wait(RandomRange(200, 700));
  382. If Reflect.tiles.GetPlane > 0 Then
  383. Begin
  384. Str := 'upstairs';
  385. Action := 'Climb-down';
  386. End Else
  387. If PointInTPA(Reflect.tiles.getGlobalTile, SecretRoom) Then
  388. Begin
  389. Str := 'secret';
  390. Action := 'Push';
  391. End Else
  392. Begin
  393. Str := 'outside';
  394. Action := 'Open';
  395. End;
  396. Case Str Of
  397. 'outside':
  398. Begin
  399. PntEx := Reflect.Tiles.TileToMS(Point(3016, 3514));
  400. PntExt := Reflect.Tiles.TileToMS(Point(3016, 3515));
  401. Pnt := Point(Round((PntEx.x+PntExt.x)/2), Round((PntEx.Y+PntExt.Y)/2));
  402. End;
  403. 'upstairs': Pnt := Reflect.Tiles.tileToMS(Point(3011, 3515));
  404. 'secret':
  405. Begin
  406. PntEx := Reflect.Tiles.TileToMS(Point(3016, 3517));
  407. PntExt := Reflect.Tiles.TileToMS(Point(3016, 3516));
  408. Pnt := Point(Round((PntEx.x+PntExt.x)/2), Round((PntEx.Y+PntExt.Y)/2));
  409. End;
  410. End;
  411. If not(PointInBox(Pnt, IntToBox(msx1, msy1, msx2, msy2))) Then
  412. exit();
  413. If Str = 'outside' Then
  414. Begin
  415. Inv.GetAll;
  416. For I := 0 To High(inv) Do
  417. Case inv[i].getName Of
  418. 'Bronze med helm':
  419. Begin
  420. Pnt1 := inv[i].getMSPoint;
  421. Reflect.Mouse.Move(Pnt1, 5, 5, Mouse_Left);
  422. Wait(RandomRange(500, 700));
  423. End;
  424. 'Iron chainbody':
  425. Begin
  426. Pnt2 := inv[i].getMSPoint;
  427. Reflect.Mouse.Move(Pnt2, 5, 5, Mouse_Left);
  428. Wait(RandomRange(500, 700));
  429. End;
  430. 'Bronze sq shield':
  431. Begin
  432. Pnt3 := inv[i].getMSPoint;
  433. Reflect.Mouse.Move(Pnt3, 5, 5, Mouse_Left);
  434. Wait(RandomRange(500, 700));
  435. End;
  436. End;
  437. retry:
  438. inc(tries);
  439. If tries > 5 Then
  440. Exit(false);
  441. Wait(RandomRange(200, 300));
  442. End;
  443. Case str Of
  444. 'outside': If Not(mouseUpText(Pnt, Action, Random(400, 700))) Then
  445. Begin
  446. Reflect.Mouse.click(Mouse_Right);
  447. If not(Reflect.Text.ChooseOption(Action, Random(400, 700))) Then
  448. goto retry;
  449. End;
  450. 'upstairs': If Not(mouseUpText(Pnt, Action, Random(400, 700))) Then
  451. Begin
  452. Reflect.Mouse.click(Mouse_Right);
  453. If not(Reflect.Text.ChooseOption(Action, Random(400, 700))) Then
  454. goto retry;
  455. End;
  456. 'secret': If Not(mouseUpText(Pnt, Action, Random(400, 700))) Then
  457. Begin
  458. Reflect.Mouse.click(Mouse_Right);
  459. If not(Reflect.Text.ChooseOption(Action, Random(400, 700))) Then
  460. goto retry;
  461. End;
  462. End;
  463. Wait(RandomRange(4000, 6000));
  464. If not(PointInTPA(Reflect.tiles.getGlobalTile, Tiles)) Then
  465. Exit(False);
  466. If Str = 'outside' Then
  467. Begin
  468. Reflect.Mouse.Move(Pnt1, 5, 5, Mouse_Left);
  469. Wait(RandomRange(400, 700));
  470. Reflect.Mouse.Move(Pnt2, 5, 5, Mouse_Left);
  471. Wait(RandomRange(400, 700));
  472. Reflect.Mouse.Move(Pnt3, 5, 5, Mouse_Left);
  473. Wait(RandomRange(400, 700));
  474. End;
  475. Exit(True);
  476. End;
  477.  
  478. Procedure WhileFighting();
  479. Var
  480. NPC : TReflectNPC;
  481. Timer : TReflectTimer;
  482. Begin
  483. if Not(LocPlayer.isloggedIn) Then
  484. Exit();
  485. Timer.Start;
  486. Repeat
  487. checkReport();
  488. If Timer.ElapsedTime > RandomRange(3200, 4500) Then
  489. Exit();
  490. Wait(100 + Random(92));
  491. Until LocPlayer.IsUnderAttack Or LocPlayer.IsAnimating Or LocPlayer.isMoving;
  492. Timer.Restart;
  493. Repeat
  494. checkReport();
  495. If Timer.ElapsedTime > RandomRange(5200, 6500) Then
  496. Exit();
  497. Wait(100 + Random(92));
  498. Until Not(LocPlayer.isMoving);
  499. Wait(2600 + Random(960));
  500. LocPlayer.GetInteractingNpc(NPC);
  501. While NPC.GetHealth > 0 Do
  502. Begin
  503. checkReport();
  504. if Not(LocPlayer.isloggedIn) Then
  505. Exit();
  506. //checkHP();
  507. Tile := NPC.getTile;
  508. Wait(300 + Random(200));
  509. antiBanHandler();
  510. End;
  511. Wait(randomRange(50, 200));
  512. End;
  513.  
  514. Procedure Attack();
  515. Label
  516. redo;
  517. Var
  518. x, y, i : integer;
  519. Knights : TReflectNPCArray;
  520. TPA : TPointArray;
  521. Pnt : TPoint;
  522. Begin
  523. if Not(LocPlayer.isloggedIn) Then
  524. Exit();
  525. redo:
  526. Wait(Random(36, 100));
  527. Knights.GetAll;
  528. For I := 0 To High(Knights) Do
  529. If PointInTPA(Knights[i].getTile, Tiles) And (Knights[i].getName = 'Fortress Guard') And Knights[i].isOnMs And Not(Knights[i].isUnderAttack) Then
  530. Begin
  531. SetLength(TPA, Length(TPA) + 1);
  532. TPA[High(TPA)] := Knights[I].GetTile;
  533. End;
  534. TPA := filterPoint(Tile, TPA);
  535. If Length(TPA) = 0 Then
  536. Begin
  537. Case Random(30) Of
  538. 0..2: Reflect.Tiles.RotateCameraToTile(midTiles[Random(Length(midTiles))]);
  539. 3..5: LocPlayer.WalkToTileMS(midTiles[Random(Length(midTiles))]);
  540. End;
  541. Exit();
  542. End;
  543. SortTPAFrom(TPA, LocPlayer.GetTile);
  544. Pnt := Reflect.Tiles.TileToMS(TPA[Reflect.Math.GaussRandom(Length(TPA))]);
  545. If Not(PointInBox(Pnt, intToBox(4, 6, 515, 336))) Then
  546. Exit();
  547. Reflect.Mouse.Move(Pnt, 5, 5);
  548. If Reflect.Text.IsUpText('Fortress Guard', RandomRange(73, 126)) Then
  549. Begin
  550. If Random(19) > 1 Then
  551. Begin
  552. If Reflect.Mouse.DidClick(True, RandomRange(956, 1472)) Then
  553. Begin
  554. afterClick;
  555. WhileFighting;
  556. Exit();
  557. End Else goto redo;
  558. End Else
  559. Begin
  560. Reflect.Mouse.Click(Mouse_Right);
  561. Wait(randomRange(50, 90));
  562. If Random(32) > 0 Then
  563. Begin
  564. If Reflect.Text.ChooseOption('Attack Fortress Guard') Then
  565. Begin
  566. afterClick;
  567. WhileFighting;
  568. Exit();
  569. End;
  570. End Else
  571. If Reflect.Text.ChooseOption('Talk-to') Then goto redo;
  572. End;
  573. End Else
  574. If (Not(Reflect.Text.isUpText('Walk here', RandomRange(173, 226)))) And (Length(Reflect.Text.getUpText) > 0) And (Not(Reflect.Text.IsUpText('Take', Random(73, 126)))) Then
  575. Begin
  576. Reflect.Mouse.Click(Mouse_Right);
  577. Wait(randomRange(50, 90));
  578. If Random(32) > 0 Then
  579. Begin
  580. If Reflect.Text.ChooseOption('Attack Fortress Guard') Then
  581. Begin
  582. afterClick;
  583. WhileFighting;
  584. Exit();
  585. End;
  586. End Else
  587. If Reflect.Text.ChooseOption('Talk-to') Then goto redo;
  588. End Else Exit();
  589. End;
  590.  
  591. Procedure LogicHandler();
  592. Begin
  593. Reflect.Gametab.Open(Gametab_Inventory);
  594. //checkHP();
  595. checkReport();
  596. Wait(Random(50, 200));
  597. If Not(PointInTPA(Reflect.tiles.getGlobalTile, Tiles)) Or (Reflect.Tiles.getPlane > 0) Then
  598. If Not(GoBackIn()) Then
  599. Terminate('Somehow got lost, terminating. Ran: ' + Reflect.Time.MsToTime(runTime.elapsedTime, Time_Formal));
  600. checkReport();
  601. Wait(Random(40, 80));
  602. antiBanHandler();
  603. wait(Random(40, 80));
  604. Attack();
  605. Wait(Random(50, 100));
  606. checkReport();
  607. If Random(4) = 0 Then
  608. PickupBones();
  609. Wait(Random(50, 100));
  610. End;
  611.  
  612. Begin
  613. Reflect.Setup;
  614. SetVars();
  615. Reflect.Smart.Graphics.clear;
  616. Reflect.MouseSpeed := RandomRange(58, 72);
  617. LocPlayer.Create;
  618. LocPlayer.Active := True;
  619. runTime.start;
  620. While locPlayer.Active Do
  621. Begin
  622. antiBanHandler;
  623. waitHandler();
  624. Wait(Random(50, 100));
  625. LocPlayer.Login;
  626. LogicHandler();
  627. Paint();
  628. Wait(RandomRange(100, 150));
  629. End;
  630. End.
Add Comment
Please, Sign In to add comment