Advertisement
Guest User

Untitled

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