zamaro

More House Curser

Apr 5th, 2014
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.54 KB | None | 0 0
  1. program HouseCurser;
  2. {$DEFINE SMART8}
  3. {$I SRL-OSR/SRL.Simba}
  4. {$I SRL-OSR/SRL/Reflection/Reflection.simba}
  5. {$i SRL-OSR\SRL\misc\debug.simba}
  6. {$i SRL-OSR\SRL\misc\SmartGraphics.simba}
  7.  
  8. {*+++++++++++++*}
  9. {+ Insructions +}
  10. {+ To Hide The Instructions Press the Minus '-' on the first line +}
  11. {+ Be sure to do your setup correctly! +}
  12. {*+++++++++++++*}
  13.  
  14.  
  15. {*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*
  16. ================================================================================
  17. A|(InGame-Setup)
  18.  
  19. A1) Brightness to highest | Auto retaliate on.
  20. A2) Bring lots of House teleport runes (not tablet(s)).
  21. A3) Start either outside your house or at a distant spot.
  22. A3.B) If you start inside house, script will just use house to calibrate cords.
  23. A4) Equip the following: Ring of life, Magic staff or Mud battle staff.
  24. A5) Have -65 Mage bonus for your magic attack; Full Metal Armor + Dragon Vambs.
  25. ______________________________________________________________________________
  26. B|(Script-Setup)
  27.  
  28.  
  29. B1) you need the SRL-OSR include, Smart8.3 & reflection.
  30. B2) If smart is already opened, pair it up before you launch the script.
  31. B3) Redefine your player settings to your choice.
  32. B4) If you launched and got an error, paste it at: http://ilya.xxx/ssf/
  33. ________________________________________________________________________________
  34. ================================================================================
  35. {Start of the script}
  36.  
  37.  
  38. var
  39. cx, cy: integer;
  40. Myloc: tpoint;
  41. SleepTimer,Messedup, Failcast, Timer, cast, CaveEntrances: integer;
  42. TimeTillBreak: string;
  43.  
  44. const
  45. CheckWorld = true;// Checks if you are on world 337, will change to it if not.
  46. TermCheck = true;// Checks & terminates script on errors.
  47.  
  48. Breakhandler = true; // Enable breaking.
  49. BreakTime1 = 45; // Min time to play before breaking.
  50. BreakTime2 = 120; // max time to play before breaking.
  51. BreakWait1 = 15; // min time to break for,
  52. BreakWait2 = 35; // max time to break for. (random range).
  53.  
  54. SleepBreaks = true; // Sleep breaks, initiates after long hours of gameplay.
  55. SleepBreak1 = 8; // Min timeto play before starting a sleep break.
  56. SleepBreak2 = 12; // Max time to play before starting a sleep breka.
  57. SleepWait1 = 1; // Min time to sleep for ** TIME IN HOURS NOT MINUTES*
  58. SleepWait2 = 3; // Max time to sleep for (random range).
  59.  
  60. MainMouseSpeed = 11; // average mouse speed.
  61.  
  62. procedure playerSetup;
  63. begin
  64. HowManyPlayers := 1;
  65. NumberOfPlayers(HowManyPlayers);
  66. CurrentPlayer := 0;
  67. Players[0].Name := ''; //username
  68. Players[0].Pass := ''; // password
  69. Players[0].Nick := ''; // nickname (4 letters).
  70. Players[0].Active := True;
  71. end;
  72.  
  73. procedure WaitHumanClick;
  74. begin
  75. case random(600) of
  76. 1..450: Wait(RandomRange(400, 600));
  77. 451..570: Wait(RandomRange(400, 600));
  78. 571..590: Wait(RandomRange(600, 800));
  79. 591..600: Wait(RandomRange(800, 1000));
  80. end;
  81. end;
  82.  
  83. procedure WaitHumanClick2;
  84. begin
  85. case random(600) of
  86. 1..450: Wait(RandomRange(3000, 3500));
  87. 451..570: Wait(RandomRange(3500, 4000));
  88. 571..590: Wait(RandomRange(4000, 4500));
  89. 591..600: Wait(RandomRange(4500, 5000));
  90. end;
  91. end;
  92.  
  93. procedure myvars;
  94. var
  95. ResetLoc: tpoint;
  96. begin
  97. writeln(myloc);
  98. ResetLoc := Point(0, 0);
  99. myloc := ResetLoc;
  100. end;
  101.  
  102. procedure StartTime;
  103. begin
  104. Timer := GetTimeRunning + RandomRange(BreakTime1 * 60000, BreakTime2 * 60000);
  105. end;
  106.  
  107. procedure LongBreakTimer;
  108. begin
  109. SleepTimer := GetTimeRunning + RandomRange(SleepBreak1 * 3600000, SleepBreak2 * 3600000);
  110. end;
  111.  
  112. procedure Termination(const Status: string);
  113. begin
  114. if (TermCheck = false) then // Users can Enable/disable termination checks
  115. exit;
  116. writeln(Status); // Prints our reason for termination
  117. if loggedin then // if we're logged in, it will log us out.
  118. begin
  119. if WaitFunc(@ LogOut, 500, RandomRange(8000, 20000)) then // waits for the script to log out.
  120. terminatescript
  121. else
  122. terminatescript; // if it doesn't manage to log out, it ends anyway
  123. end else
  124. terminatescript; // and if we're not loggedin it ends.
  125. end;
  126.  
  127. function LogMeOut: boolean;
  128. begin
  129. writeln('Logging out..');
  130. if WaitFunc(@ LogOut, 500, RandomRange(8000, 20000)) then
  131. begin //Logging out is buggy right now on OSRS, it needs some extra time
  132. writeln('We have managed to log out');
  133. result := true;
  134. end else //ends script if we fail to logout
  135. termination('We have failed to log out, ending script');
  136. end;
  137.  
  138. procedure TakeBreaks;
  139. var
  140. T, BreakTimer,BreakTimer2: integer;
  141. begin
  142. if (BreakHandler = false) then
  143. Exit;
  144.  
  145. if (GetTimeRunning >= Timer) And (SleepBreaks = true) then // Checks if its time to break
  146. begin
  147. BreakTimer2 := Randomrange(SleepWait1 * 3600000, SleepWait2 * 3600000); // Calculates a time to break for
  148. MarkTime(T);
  149. writeln('It is time to take a LONG break');
  150. WriteLn('Breaking for: ' + (MsToTime(BreakTimer2, Time_Formal)));
  151. if LogMeOut then
  152. begin
  153. while (TimeFromMark(T) < BreakTimer2) do // Credits & Props to P1ng for proper formating advise!
  154. Wait(RandomRange(1500, 2500)); // wait time is important so Simba can cycle throug the memory slowly without causing CPU leaks
  155. WriteLn('Completed LONG break, re-starting script');
  156. LongBreakTimer; // Calculates next break's timer.
  157. end else // if it fails to log out then script ends.
  158. termination('We have failed to log out for our break, ending script');
  159. end;
  160. if (GetTimeRunning >= Timer) then // Checks if its time to break
  161. begin
  162. BreakTimer := Randomrange(BreakWait1 * 60000, BreakWait2 * 60000); // Calculates a time to break for
  163. MarkTime(T);
  164. writeln('It is time to take a break');
  165. WriteLn('Breaking for: ' + (MsToTime(BreakTimer, Time_Formal)));
  166. if LogMeOut then
  167. begin
  168. while (TimeFromMark(T) < BreakTimer) do // Credits & Props to P1ng for proper formating advise!
  169. Wait(RandomRange(1500, 2500)); // wait time is important so Simba can cycle throug the memory slowly without causing CPU leaks
  170. WriteLn('Completed break, re-starting script');
  171. StartTime; // Calculates next break's timer.
  172. end else // if it fails to log out then script ends.
  173. termination('We have failed to log out for our break, ending script');
  174. end;
  175. end;
  176.  
  177. procedure WaitHumanClick3;
  178. begin
  179. case random(600) of
  180. 1..450: Wait(RandomRange(3000, 5000));
  181. 451..570: Wait(RandomRange(5000, 5500));
  182. 571..590: Wait(RandomRange(6000, 6500));
  183. 591..600: Wait(RandomRange(7000, 7500));
  184. end;
  185. end;
  186.  
  187. function GetGreenUptext: string;
  188. var
  189. WhiteT, BlueT, YellowT, OrangeT, GreenT, FoundText: string;
  190. begin
  191. WhiteT := GetTextAtExWrap(8, 8, 300, 21, 0, 5, 1, 14541281, 55, 'UpChars07');
  192. BlueT := GetTextAtExWrap(35, 8, 300, 21, 0, 5, 1, 13423640, 65, 'UpChars07');
  193. YellowT := GetTextAtExWrap(35, 8, 300, 21, 0, 5, 1, 1235160, 40, 'UpChars07');
  194. OrangeT := GetTextAtExWrap(35, 8, 300, 21, 0, 5, 1, 4687583, 53, 'UpChars07');
  195. GreenT := GetTextAtExWrap(8, 8, 300, 21, 0, 5, 1, 120577, 65, 'UpChars07');
  196. FoundText := WhiteT + ' ' + BlueT + YellowT + OrangeT + GreenT;
  197. FoundText := ReplaceWrap(FoundText, '.', '', [rfReplaceAll]);
  198. FoundText := ReplaceWrap(FoundText, '/', '', [rfReplaceAll]);
  199. FoundText := ReplaceWrap(FoundText, '\', '', [rfReplaceAll]);
  200. FoundText := ReplaceWrap(FoundText, ',', '', [rfReplaceAll]);
  201. FoundText := ReplaceWrap(FoundText, '*', '', [rfReplaceAll]);
  202. FoundText := ReplaceWrap(FoundText, '^', '', [rfReplaceAll]);
  203. FoundText := ReplaceWrap(FoundText, '"', '', [rfReplaceAll]);
  204. Result := FoundText;
  205. end;
  206.  
  207. function IsUpTextMultiCustom2(Text: TStringArray): Boolean;
  208. var
  209. TheText: string;
  210. i, n: Integer;
  211. begin
  212. TheText := GetGreenUptext;
  213. n := High(Text);
  214. for i := 0 to n do
  215. if (Pos(Text[i], TheText) > 0) then
  216. begin
  217. Result := True;
  218. Exit;
  219. end;
  220. end;
  221.  
  222.  
  223.  
  224. function WaitUpTextMulti2(S: TStringArray; Time: Integer): Boolean;
  225. var
  226. T: Integer;
  227. begin
  228. Result := false;
  229. T := GetSystemTime + Time;
  230. while (GetSystemTime < T) do
  231. begin
  232. if (IsUpTextMultiCustom2(S)) then
  233. begin
  234. Result := True;
  235. Exit;
  236. end;
  237. Wait(20 + Random(20));
  238. end;
  239. end;
  240.  
  241. function OpenWScreen: Boolean;
  242. begin
  243. Result := False;
  244. if WorldScreen then
  245. exit;
  246. if Loggedin then
  247. Exit;
  248. if not WorldScreen then
  249. begin
  250. Mmouse(54, 475, 1, 1);
  251. WaitHumanClick;
  252. ClickMouse2(Mouse_Left);
  253. waithumanclick;
  254. Result := True;
  255. end;
  256. end;
  257.  
  258. function whitecolor: boolean;
  259. var
  260. Monster: TpointArray;
  261. TmpCts: Integer;
  262. begin
  263. tmpcts := GetColorToleranceSpeed;
  264. ColorToleranceSpeed(2);
  265. SetColorSpeed2Modifiers(0.22, 1.69);
  266. result := FindColorsTolerance(Monster, 9163999, 192, 67, 583, 469, 4);
  267. ColorToleranceSpeed(tmpcts);
  268. SetColorSpeed2Modifiers(0.2, 0.2);
  269. end;
  270.  
  271. procedure ProgressReport;
  272. var
  273. Timeleft, XpPerhour, Casts, CastsPH: Integer;
  274. begin
  275. if (not (loggedin)) then
  276. exit;
  277. ClearDebug;
  278. XpPerhour := (3600 * (Cast) / ((GetTimeRunning / 1000)));
  279. Casts := ((Cast) / (29));
  280. CastsPH := (3600 * (Casts) / ((GetTimeRunning / 1000)));
  281. timeleft := ((Timer) - (GetTimeRunning));
  282. TimeTillBreak := (MsToTime(timeleft, Time_Formal));
  283. WriteLn('* HouseCurser v.1.0');
  284. WriteLn('* Runtime: ' + TimeRunning);
  285. Writeln('*');
  286. writeln('* Experience Gained: ' + IntToStr(Cast) + ' Exp P/H: ' + IntToStr(XpPerhour));
  287. writeln('* Curse Used : ' + IntToStr(Casts) + ' Casts P/h: ' + IntTostr(CastsPH));
  288. Writeln('* No. Of Times : ' + 'Failed Casting: ' + intTostr(failcast) + ' Messed up: ' + inttostr(messedup) + ' Entered Cave: ' + IntToStr(CaveEntrances));
  289. Writeln('* Time till break : ' + (TimeTillBreak));
  290. end;
  291.  
  292. function FindObjExX(var cx, cy: Integer; Text: TStringArray; Color: TIntegerArray; Tol, CTS: integer; Hue, Sat: Extended; Step, xs, ys, xe, ye: Integer): Boolean;
  293. var
  294. MidX, MidY, i, j, k, x, y, width, height, HalfWidth, HalfHeight: Integer;
  295. ColorFound: Boolean;
  296. SearchBoxes: array of array of TBox;
  297. p: TPointArray;
  298. begin
  299. if (not (loggedin)) then
  300. exit;
  301. Result := False;
  302. for i := 0 to (GetArrayLength(Color) - 1) do
  303. begin
  304. ColorToleranceSpeed(CTS);
  305. SetColorSpeed2Modifiers(Hue, sat);
  306. if (FindColorSpiralTolerance(cx, cy, Color[i], xs, ys, xe, ye, Tol)) then
  307. begin
  308. ColorToleranceSpeed(1);
  309. SetColorSpeed2Modifiers(0.2, 0.2);
  310. ColorFound := True;
  311. Break;
  312. end;
  313. end;
  314. ColorToleranceSpeed(1);
  315. SetColorSpeed2Modifiers(0.2, 0.2);
  316. if not (ColorFound) then
  317. Exit;
  318. MidX := Round((xe - xs) / 2);
  319. MidY := Round((ye - ys) / 2);
  320. Width := Ceil(abs(xe - xs) / 2 / Step - 0.5) * 2 + 1;
  321. Height := Ceil(abs(ye - ys) / 2 / Step - 0.5) * 2 + 1;
  322. SetLength(SearchBoxes, Width);
  323. HalfWidth := Floor(Width / 2);
  324. HalfHeight := Floor(Height / 2) for x := - 1 * HalfWidth to HalfWidth do
  325. begin
  326. SetLength(SearchBoxes[x + HalfWidth], Height);
  327. for y := - 1 * HalfHeight to HalfHeight do
  328. SearchBoxes[x + HalfWidth][y + HalfHeight] := IntToBox(Max(xs, xs + Round(MidX + ((x - 0.5) * Step))), Max(ys, ys + Round(MidY + ((y - 0.5) * Step))), Min(xe, xs + Round(MidX + ((x + 0.5) * Step))), Min(ye, ys + Round(MidY + ((y + 0.5) * Step))));
  329. end;
  330. p := TPAFromBox(IntToBox(0, 0, Width - 1, Height - 1));
  331. SortTPAFrom(p, Point(floor(Width / 2), floor(Height / 2)));
  332. for k := 0 to High(Color) do
  333. for j := 0 to High(p) do
  334. begin
  335. ColorToleranceSpeed(CTS);
  336. SetColorSpeed2Modifiers(Hue, sat);
  337. if (FindColorTolerance(cx, cy, Color[k], SearchBoxes[p[j].x][p[j].y].x1, SearchBoxes[p[j].x][p[j].y].y1, SearchBoxes[p[j].x][p[j].y].x2, SearchBoxes[p[j].x][p[j].y].y2, Tol)) then
  338. begin
  339. ColorToleranceSpeed(1);
  340. SetColorSpeed2Modifiers(0.2, 0.2);
  341. MMouse(cx, cy, 3, 3);
  342. wait(randomrange(200, 300));
  343. if (WaitUptextMulti2(Text, 300)) then
  344. begin
  345. ColorToleranceSpeed(1);
  346. SetColorSpeed2Modifiers(0.2, 0.2);
  347. GetMousePos(cx, cy);
  348. Result := True;
  349. Exit;
  350. end;
  351. end;
  352. ColorToleranceSpeed(1);
  353. SetColorSpeed2Modifiers(0.2, 0.2);
  354. end;
  355. ColorToleranceSpeed(1);
  356. SetColorSpeed2Modifiers(0.2, 0.2);
  357. end;
  358.  
  359. procedure TeleportToHouse;
  360. begin
  361. if not loggedin then
  362. exit;
  363. gametab(tab_magic);
  364. waithumanclick;
  365. MouseBox(610, 305, 624, 313, mouse_left);
  366. wait(randomrange(10000, 15000));
  367. Myloc := R_GetTileGlobal;
  368. end;
  369.  
  370. procedure loginloop;
  371. var
  372. b: integer;
  373. begin
  374. if (Checkworld = true) then
  375. begin
  376. OpenWorldScreen;
  377. repeat
  378. if not worldscreen then
  379. break;
  380. if whitecolor then
  381. break;
  382. if whitecolor then
  383. writeln('yeaya');
  384. if not whitecolor then
  385. writeln('yea22ya');
  386. MouseBox(294, 408, 375, 423, 0);
  387. until (whitecolor) if whitecolor then
  388. begin
  389. writeln('yoo2');
  390. clickmouse2(mouse_left);
  391. waithumanclick2;
  392. B := CurrentWorldLS;
  393. if (B = 337) then
  394. begin
  395. writeln('yoo');
  396. myvars;
  397. loginplayer;
  398. exit;
  399. end;
  400. end;
  401. end
  402. else
  403. begin
  404. myvars;
  405. loginplayer;
  406. waithumanclick;
  407. end;
  408. end;
  409.  
  410.  
  411.  
  412. function ColorLocate(var Name: string; Color, Tol, CTS: integer; Hue, Sat: Extended; xs, ys, xe, ye: Integer): boolean;
  413. var
  414. Monster: TpointArray;
  415. TmpCts: Integer;
  416. begin
  417. tmpcts := GetColorToleranceSpeed;
  418. ColorToleranceSpeed(cts);
  419. SetColorSpeed2Modifiers(Hue, sat);
  420. result := FindColorsTolerance(Monster, color, xs, ys, xe, ye, Tol);
  421. ColorToleranceSpeed(tmpcts);
  422. SetColorSpeed2Modifiers(0.2, 0.2);
  423. end;
  424.  
  425. function FindObject(Color: TintegerArray; Tol, CTS: integer; hMoD, sMoD: extended; split, sort: integer; Uptext: array of string; WaitUptextWait, WaitUptextRandom: Integer; x, y, xs, ys: integer): boolean;
  426. var
  427. III, i, tmpcts: integer;
  428. TPA: tpointarray;
  429. TPAA: T2DPointArray;
  430. begin
  431. if (not (loggedin)) then
  432. exit;
  433. gametab(tab_inv);
  434. tmpcts := GetColorToleranceSpeed;
  435. ColorToleranceSpeed(CTS);
  436. SetColorSpeed2Modifiers(hMoD, SMoD);
  437. FindColorsSpiralTolerance(MSCX, MSCY, TPA, color[III], x, y, xs, ys, Tol) ColorToleranceSpeed(tmpCTS);
  438. SetColorSpeed2Modifiers(0.2, 0.2);
  439. SplitTPAWrap(TPA, split, TPAA);
  440. SortATPAFromSize(TPAA, sort, true);
  441. for I := 0 to High(TPAA) do
  442. begin
  443. MiddleTPAEx(TPAA[i], X, Y);
  444. MMouse(x, y, RandomRange( - 3, 3), RandomRange( - 3, 3));
  445. if WaitUpTextMulti2(uptext, WaitUptextWait + random(WaitUptextRandom)) then
  446. begin
  447. Result := True;
  448. break;
  449. end;
  450. break;
  451. end;
  452. end;
  453.  
  454. function Clickobject(Objpoint: tpoint; Uptext: TStringArray): Boolean;
  455. var
  456. Bp, Booth: TPoint;
  457. begin
  458. if (not LoggedIn) then
  459. Exit;
  460. if (R_DistanceFromTile(Objpoint) > 3) and (R_DistanceFromTile(Objpoint) < 15) then
  461. begin
  462. Bp.x := Objpoint.x + 1;
  463. Bp.Y := Objpoint.y - 1;
  464. R_WalkPath([Bp]);
  465. waithumanclick2;
  466. end;
  467. if R_DistanceFromTile(Objpoint) < 5 then
  468. begin
  469. Booth := R_TileToMS(ObjPoint);
  470. MMouse(Booth.X, Booth.Y, 2, 2);
  471. Sleep(100 + Random(100));
  472. if (R_IsUpTextMulti(Uptext)) then
  473. begin
  474. result := true;
  475. end;
  476. end;
  477. end;
  478.  
  479. function MMouseObject(Objpoint: tpoint; Uptext: TStringArray): Boolean;
  480. var
  481. Booth: TPoint;
  482. begin
  483. if (not LoggedIn) then
  484. Exit;
  485. Booth := R_TileToMS(ObjPoint);
  486. MMouse(Booth.X, Booth.Y, 2, 2);
  487. Sleep(100 + Random(100));
  488. if (R_IsUpTextMulti(Uptext)) then
  489. begin
  490. result := true;
  491. end;
  492. end;
  493.  
  494. function LocateNPC(Name, Uptext: string): boolean;
  495. var
  496. Bp, Tp: Tpoint;
  497. NpcName: tnpc;
  498. begin
  499. if R_FindNpc(Name, NpcName) then
  500. begin
  501. if NpcName.InCombat then
  502. exit;
  503. Tp := NpcName.Tile;
  504. if (R_DistanceFromTile(tp) > 3) and (R_DistanceFromTile(tp) < 15) then
  505. begin
  506. Bp.x := Tp.x + 1;
  507. Bp.Y := Tp.y - 1;
  508. R_WalkPath([Bp]);
  509. waithumanclick2;
  510. end;
  511. if R_DistanceFromTile(tp) < 5 then
  512. begin
  513. Tp := R_TileToMs(Tp);
  514. Mmouse(Tp.x, Tp.y, 0, 0);
  515. if R_WaitUptext(Uptext, 200) then
  516. begin
  517. result := true;
  518. end;
  519. end;
  520. end;
  521. end;
  522.  
  523. procedure domagics;
  524. begin
  525. end;
  526.  
  527. function OnRangeScreen: boolean;
  528. var
  529. CTS: Integer;
  530. TPA: Tpointarray;
  531. begin
  532. if (not (loggedin)) then
  533. exit;
  534. cts := GetColorToleranceSpeed;
  535. ColorToleranceSpeed(2);
  536. SetColorSpeed2Modifiers(0.05, 0.41);
  537. result := FindColorsTolerance(TPA, 5334901, 482, 36, 492, 45, 12);
  538. ColorToleranceSpeed(CTS);
  539. SetColorSpeed2Modifiers(0.02, 0.2);
  540. end;
  541.  
  542. procedure closerangescreen;
  543. begin
  544. if (not (loggedin)) then
  545. exit;
  546. writeln('we are on skill screen, closing');
  547. mousebox(482, 36, 492, 45, 1);
  548. end;
  549.  
  550. function OnskillScreen: boolean;
  551. var
  552. CTS: Integer;
  553. TPA: Tpointarray;
  554. begin
  555. if (not (loggedin)) then
  556. exit;
  557. cts := GetColorToleranceSpeed;
  558. ColorToleranceSpeed(2);
  559. SetColorSpeed2Modifiers(0.02, 1.48);
  560. result := FindColorsTolerance(TPA, 8042720, 480, 5, 513, 35, 4);
  561. ColorToleranceSpeed(CTS);
  562. SetColorSpeed2Modifiers(0.02, 0.2);
  563. end;
  564.  
  565. procedure CloseSkillScreen;
  566. begin
  567. if (not (loggedin)) then
  568. exit;
  569. writeln('we are on skill screen, closing');
  570. mousebox(494, 17, 500, 22, 1);
  571. end;
  572.  
  573. function OnmageTab: boolean;
  574. var
  575. Monster: TpointArray;
  576. TmpCts: Integer;
  577. Melee: Boolean;
  578. begin
  579. if (not (loggedin)) then
  580. exit;
  581. tmpCTS := GetColorToleranceSpeed;
  582. ColorToleranceSpeed(2);
  583. SetColorSpeed2Modifiers(0.06, 0.24);
  584. result := FindColorsTolerance(Monster, 1382991, 730, 170, 754, 195, 11) melee := result;
  585. ColorToleranceSpeed(0);
  586. SetColorSpeed2Modifiers(0.2, 0.2);
  587. end;
  588.  
  589. function OutofRunes: boolean;
  590. begin
  591. if (not (loggedin)) then
  592. exit;
  593. result := FindTextTPA(clBlack, 0, MCX1, MCY1, MCX2, MCY2, 'ody', smallChars07, Nothing);
  594. end;
  595.  
  596.  
  597.  
  598. function NotchatTabAll: boolean;
  599. var
  600. Monster: TpointArray;
  601. TmpCts: Integer;
  602. begin
  603. if (not (loggedin)) then
  604. exit;
  605. tmpCTS := GetColorToleranceSpeed;
  606. ColorToleranceSpeed(2);
  607. SetColorSpeed2Modifiers(0.10, 0.34);
  608. result := FindColorsTolerance(Monster, 4213586, 6, 482, 60, 497, 11);
  609. ColorToleranceSpeed(0);
  610. SetColorSpeed2Modifiers(0.2, 0.2);
  611. end;
  612.  
  613. procedure MakeMyChatTabAll;
  614. begin
  615. if (not (loggedin)) then
  616. exit;
  617. writeln('Our chat Tab is not set to all, making chat tab to all');
  618. mousebox(12, 485, 45, 497, 1);
  619. end;
  620.  
  621. procedure WaitAfterCast;
  622. begin
  623. if (not (loggedin)) then
  624. exit;
  625. case random(600) of
  626. 1..450: Wait(RandomRange(100, 300));
  627. 451..570: Wait(RandomRange(300, 400));
  628. 571..590: Wait(RandomRange(400, 600));
  629. 591..600: Wait(RandomRange(600, 1000));
  630. end;
  631. end;
  632.  
  633. procedure WaitShortClick;
  634. begin
  635. if (not (loggedin)) then
  636. exit;
  637. case random(600) of
  638. 1..450: Wait(RandomRange(100, 150));
  639. 451..570: Wait(RandomRange(150, 200));
  640. 571..590: Wait(RandomRange(200, 250));
  641. 591..600: Wait(RandomRange(250, 400));
  642. end;
  643. end;
  644.  
  645. procedure WaitShortClick2;
  646. begin
  647. if (not (loggedin)) then
  648. exit;
  649. case random(600) of
  650. 1..450: Wait(RandomRange(400, 450));
  651. 451..570: Wait(RandomRange(450, 500));
  652. 571..590: Wait(RandomRange(500, 550));
  653. 591..600: Wait(RandomRange(550, 600));
  654. end;
  655. end;
  656.  
  657. procedure MouseSpeedz;
  658. begin
  659. if (not (loggedin)) then
  660. exit;
  661. case random(600) of
  662. 1..450: MouseSpeed := MainMouseSpeed;
  663. 451..570: MouseSpeed := MainMouseSpeed + randomrange( - 1, 1);
  664. 571..590: MouseSpeed := MainMouseSpeed + randomrange( - 1, 2);
  665. 591..600: MouseSpeed := MainMouseSpeed + randomrange( - 1, 3);
  666. end;
  667. end;
  668.  
  669. procedure FindIfonMagetab;
  670. begin
  671. if (not (loggedin)) then
  672. exit;
  673. if (not (OnmageTab)) then
  674. begin
  675. gametab(tab_magic);
  676. waitshortclick2;
  677. end
  678. else
  679. begin
  680. if (OnmageTab) then
  681. exit;
  682. end;
  683. end;
  684.  
  685. function HoverNearbyNpc: boolean;
  686. var
  687. I: Tpointarray;
  688. P: Integer;
  689. begin
  690. if (not (loggedin)) then
  691. exit;
  692. I := GetMiniMapDots('npc');
  693. if (length(I) > 0) then
  694. begin
  695. SortTPAFrom(i, Point(MMCX, MMCY));
  696. P := random(length(I)) Mmouse(I[0].x, I[0].y, 3, 3);
  697. result := true;
  698. end;
  699. end;
  700.  
  701. procedure Keyboards;
  702. begin
  703. case random(5) of
  704. 0..2:
  705. begin
  706. KeyDown(37);
  707. WaitShortClick KeyUp(37);
  708. WaitShortClick KeyDown(40);
  709. WaitShortClick KeyUp(40);
  710. end;
  711. 3..4:
  712. begin
  713. KeyDown(39);
  714. WaitShortClick KeyUp(39);
  715. WaitShortClick KeyDown(38);
  716. WaitShortClick KeyUp(38);
  717. end;
  718. 5:
  719. begin
  720. KeyDown(38);
  721. WaitShortClick KeyUp(38);
  722. WaitShortClick KeyDown(39);
  723. WaitShortClick KeyUp(39);
  724. end;
  725. end;
  726. end;
  727.  
  728. procedure Antiban;
  729. begin
  730. if (not (loggedin)) then
  731. exit;
  732. case random(100) of
  733. 0..56:
  734. begin
  735. end;
  736. 57..100:
  737. begin
  738. case random(150) of
  739. 10: hoverskill(skill_magic, false);
  740. 15: HoverOnlineFriend;
  741. 20: BoredHuman;
  742. 30: MMouseOffClient('top');
  743. 40: MMouseOffClient('left');
  744. 50: MMouseOffClient('right');
  745. 60: MMouseOffClient('bottom');
  746. 70: SmallRandomMouse;
  747. 80: RandomAngle(1);
  748. 90: RandomAngle(2);
  749. 100: PickUpMouse;
  750. 110: CompassMovement(10, 70, true);
  751. 120: HoverNearbyNpc;
  752. 130: Keyboards;
  753. 140: MissMouse(250, 250);
  754. 150: RandomMovement;
  755. 160: CompassMovement(240, 300, true);
  756. 170: AdjustMouseSpeed(3, 10, 20);
  757. 180: RandomFKeys(true);
  758. 190: RandomTab(true);
  759. end;
  760. end;
  761. end;
  762. end;
  763.  
  764. function LocateMonster1(Color: TintegerArray; Tol, CTS: integer; hMoD, sMoD: Extended; Uptext: array of string): Boolean;
  765. var
  766. bp, orb: tpoint;
  767. begin
  768. if (not (Loggedin)) then
  769. exit;
  770. orb.x := myloc.x;
  771. orb.y := myloc.y + 8;
  772. if R_DistanceFromTile(oRB) > 15 then
  773. exit;
  774. if (R_DistanceFromTile(oRB) > 3) and (R_DistanceFromTile(oRB) < 15) then
  775. begin
  776. Bp.x := orb.x;
  777. Bp.Y := orb.y - 1;
  778. R_WebWalk(bp);
  779. waithumanclick2;
  780. end;
  781. MouseSpeedz;
  782. FindIfonMagetab;
  783. case random(10) of
  784. 0..7: Mouse(RandomRange(668, 669), RandomRange(263, 264), random(3), random(3), mouse_move);
  785. 8..10: Mouse(RandomRange(663, 670), RandomRange(260, 265), random(1), random(1), mouse_move);
  786. end;
  787. if WaitUpTextMulti2(['Curse'], 300) then
  788. begin
  789. clickmouse2(mouse_left);
  790. waitshortclick;
  791. case random(30) of
  792. 0..27: Clickobject(orb, ['Curse']);
  793. 28..30: FindObjExX(cx, cy, ['Curse'], [7571064], 21, 2, 0.59, 0.07, 50, msx1, msy1, msx2, msy2);
  794. end;
  795. wait(randomrange(90, 120));
  796. if WaitUpTextMulti2(['Curse'], 300) then
  797. begin
  798. clickmouse2(mouse_left);
  799. if Didclick(true, 1000) then
  800. begin
  801. IncEx(cast, 29);
  802. progressreport;
  803. case random(100) of
  804. 1:
  805. begin
  806. case random(100) of
  807. 0..80:
  808. begin
  809. end;
  810. 81..100: Antiban;
  811. end;
  812. case random(50) of
  813. 0..42: waitafterCast;
  814. 43..48: waithumanclick2;
  815. 49..50: Wait(randomrange(15000, 25000));
  816. end;
  817. end;
  818. 2:
  819. begin
  820. end;
  821. end;
  822. result := true;
  823. exit;
  824. end
  825. else
  826. begin
  827. inc(Failcast);
  828. exit;
  829. end;
  830. end
  831. else
  832. begin
  833. inc(failcast);
  834. exit;
  835. end;
  836. end
  837. else
  838. begin
  839. inc(failcast);
  840. exit;
  841. end;
  842. end;
  843.  
  844. procedure Inhouseloop;
  845. var
  846. bp, Orb: tpoint;
  847. begin
  848. writeln('yooo');
  849. MakeCompass('w');
  850. setangle(1);
  851. orb.x := myloc.x;
  852. orb.y := myloc.y + 8;
  853. if (orb.x = 0) then
  854. TeleportToHouse;
  855. if (R_DistanceFromTile(oRB) > 3) and (R_DistanceFromTile(oRB) < 25) then
  856. begin
  857. writeln('yoo2o');
  858. Bp.x := orb.x;
  859. Bp.Y := orb.y - 1;
  860. R_WebWalk(bp);
  861. waithumanclick2;
  862. end;
  863. if Clickobject(orb, ['Activate', 'ctivate']) then
  864. begin
  865. clickmouse2(mouse_left);
  866. waithumanclick2;
  867. end;
  868. waithumanclick2;
  869. if Clickobject(orb, ['Banish', 'anish']) then
  870. begin
  871. repeat
  872. WaitHumanClick;
  873. if not loggedin then
  874. exit;
  875. if R_DistanceFromTile(oRB) > 5 then
  876. exit;
  877. if OnskillScreen then
  878. CloseSkillScreen;
  879. if (onrangescreen) then
  880. closerangescreen;
  881. if OutofRunes then
  882. Termination('we have run out of runes!');
  883. if (NotchatTabAll) then
  884. MakeMyChatTabAll;
  885. takebreaks;
  886. LocateMonster1([7571064], 21, 2, 0.59, 0.07, ['Curse']);
  887. until (not loggedin);
  888. end;
  889. end;
  890.  
  891. procedure mainloop;
  892. begin
  893. if not loggedin then
  894. exit;
  895. if srl_InFight then
  896. TeleportToHouse;
  897. if FindObjExX(cx, cy, ['Activate', 'ctivate', 'Banish', 'anish'], [6982271], 22, 2, 0.30, 0.25, 50, msx1, msy1, msx2, msy2) then
  898. Inhouseloop;
  899. if (not R_inPolygon([point(2957, 3220), point(2957, 3228), point(2950, 3228), point(2950, 3220)]) and FindObjExX(cx, cY, ['Portal'], [5774918], 5, 2, 0.15, 4.50, 50, msx1, msy1, msx2, msy2)) then
  900. begin
  901. writeln('yes');
  902. Inhouseloop;
  903. end;
  904. if R_inPolygon([point(2957, 3220), point(2957, 3228), point(2950, 3228), point(2950, 3220)]) and FindObjExX(cx, cY, ['Enter', 'nter', 'ortal', 'Portal'], [5774918], 5, 2, 0.15, 4.50, 50, msx1, msy1, msx2, msy2) then
  905. begin
  906. writeln('yess');
  907. if FindObject([5774918], 5, 2, 0.15, 4.50, 20, 20, ['Enter', 'nter', 'ortal', 'Portal'], 300, 250, msx1, msy1, msx2, msy2) then
  908. begin
  909. writeln('yess2');
  910. if srl_InFight then
  911. TeleportToHouse;
  912. clickmouse2(mouse_left);
  913. wait(randomrange(2000, 3000));
  914. mousebox(180, 375, 325, 390, mouse_left);
  915. wait(randomrange(10000, 15000));
  916. Myloc := R_GetTileGlobal;
  917. end;
  918. end;
  919. if (not R_inPolygon([point(2957, 3220), point(2957, 3228), point(2950, 3228), point(2950, 3220)])) and not FindObjExX(cx, cY, ['Portal'], [5774918], 5, 2, 0.15, 4.50, 50, msx1, msy1, msx2, msy2) then
  920. begin
  921. writeln('yes2');
  922. if srl_InFight then
  923. TeleportToHouse;
  924. TeleportToHouse;
  925. end;
  926. end;
  927.  
  928. begin
  929. playerSetup;
  930. setupsrl;
  931. SetupReflection;
  932. StartTime;
  933. LongBreakTimer;
  934. myvars;
  935. repeat
  936. wait(400);
  937. if not loggedin then
  938. loginloop;
  939. wait(400);
  940. if loggedin then
  941. mainloop;
  942. until (false);
  943. end.
Advertisement
Add Comment
Please, Sign In to add comment