zamaro

HouseCurser2

Apr 1st, 2014
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.43 KB | None | 0 0
  1. program ScriptSkeleton;
  2.  
  3.  
  4. {$DEFINE SMART8}
  5. {$I SRL-OSR/SRL.Simba}
  6. {$I SRL-OSR/SRL/Reflection/Reflection.simba}
  7. {$i SRL-OSR\SRL\misc\debug.simba}
  8. {$i SRL-OSR\SRL\misc\SmartGraphics.simba}
  9.  
  10.  
  11. var
  12. BankCord, shopcord: tpointarray;
  13. cx, cy, pizzasbought, potatobought, WorldsHopped: integer;
  14. Myloc: tpoint;
  15.  
  16. Messedup,Failcast,Timer,cast,CaveEntrances: integer;
  17.  
  18. TimeTillBreak:string;
  19.  
  20. const
  21.  
  22. hopworlds = false;
  23. bankpin = '1345';
  24. BuysPizza = false;
  25. BuysPotato = true;
  26.  
  27. Breakhandler = true; // Would you want to take breaks?
  28. BreakTime1 = 45; // Minimum Gameplay time before breaks.
  29. BreakTime2 = 120; // Maximum Gameplay Time before breaks.
  30. // Time is in Minutes, not MS.
  31.  
  32. BreakWait1 = 15; // For how long to take a break?
  33. BreakWait2 = 30; // Example 15, 30 will take a break for 15-30 minutes.
  34.  
  35. CorkCol = 3831684;
  36. CorkTol = 16;
  37. CorkCTS = 2;
  38. CorkHue = 0.03;
  39. CorkSat = 0.18;
  40.  
  41. MainMouseSpeed = 11;
  42.  
  43.  
  44. procedure playerSetup;
  45. begin
  46. HowManyPlayers := 1;
  47. NumberOfPlayers(HowManyPlayers);
  48. CurrentPlayer := 0;
  49. Players[0].Name := '@gmail.com';
  50. Players[0].Pass := '';
  51. Players[0].Nick := '';
  52. Players[0].Active := True;
  53.  
  54. end;
  55.  
  56.  
  57.  
  58. procedure WaitHumanClick;
  59. begin
  60. case random(600) of
  61. 1..450: Wait(RandomRange(400, 600));
  62. 451..570: Wait(RandomRange(400, 600));
  63. 571..590: Wait(RandomRange(600, 800));
  64. 591..600: Wait(RandomRange(800, 1000));
  65. end;
  66. end;
  67.  
  68. procedure WaitHumanClick2;
  69. begin
  70. case random(600) of
  71. 1..450: Wait(RandomRange(3000, 3500));
  72. 451..570: Wait(RandomRange(3500, 4000));
  73. 571..590: Wait(RandomRange(4000, 4500));
  74. 591..600: Wait(RandomRange(4500, 5000));
  75. end;
  76. end;
  77.  
  78.  
  79.  
  80.  
  81.  
  82. procedure takebreaks;
  83. var
  84. T,BreakTimer:integer;
  85. Times:string;
  86. begin
  87. if (Breakhandler = false) then exit;
  88. if (GetTimeRunning >= Timer) then
  89. begin
  90. writeln('its time to take a break....');
  91.  
  92.  
  93. BreakTimer := Randomrange(BreakWait1 * 60000, BreakWait2 * 60000);
  94.  
  95. Times := (MsToTime(BreakTimer, Time_Formal));
  96. writeln('Breaking for: ' + Times);
  97. marktime(t);
  98. repeat
  99. wait(400);
  100. logout;
  101. until (not(loggedin));
  102. if (not(loggedin)) then
  103. begin
  104. repeat
  105. wait(1000);
  106. until(TimeFromMark(t) >= BreakTimer);
  107. if (TimeFromMark(T) >= BreakTimer) then
  108. begin
  109. writeln('break time is over, back to the script');
  110. exit;
  111. end;
  112. end;
  113. end;
  114. end;
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121. procedure WaitHumanClick3;
  122. begin
  123. case random(600) of
  124. 1..450: Wait(RandomRange(3000, 5000));
  125. 451..570: Wait(RandomRange(5000, 5500));
  126. 571..590: Wait(RandomRange(6000, 6500));
  127. 591..600: Wait(RandomRange(7000, 7500));
  128. end;
  129. end;
  130.  
  131.  
  132.  
  133. procedure myvars;
  134. var
  135. ResetLoc: tpoint;
  136. begin
  137.  
  138. writeln(myloc);
  139. ResetLoc := Point(0,0);
  140. myloc := ResetLoc;
  141. end;
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148. function GetGreenUptext: string;
  149. var
  150. WhiteT, BlueT, YellowT, OrangeT, GreenT, FoundText: string;
  151. begin
  152. WhiteT := GetTextAtExWrap(8, 8, 300, 21, 0, 5, 1, 14541281, 55, 'UpChars07');
  153. BlueT := GetTextAtExWrap(35, 8, 300, 21, 0, 5, 1, 13423640, 65, 'UpChars07');
  154. YellowT := GetTextAtExWrap(35, 8, 300, 21, 0, 5, 1, 1235160, 40, 'UpChars07');
  155. OrangeT := GetTextAtExWrap(35, 8, 300, 21, 0, 5, 1, 4687583, 53, 'UpChars07');
  156. GreenT := GetTextAtExWrap(8, 8, 300, 21, 0, 5, 1, 120577, 65, 'UpChars07');
  157. FoundText := WhiteT + ' ' + BlueT + YellowT + OrangeT + GreenT;
  158. FoundText := ReplaceWrap(FoundText, '.', '', [rfReplaceAll]);
  159. FoundText := ReplaceWrap(FoundText, '/', '', [rfReplaceAll]);
  160. FoundText := ReplaceWrap(FoundText, '\', '', [rfReplaceAll]);
  161. FoundText := ReplaceWrap(FoundText, ',', '', [rfReplaceAll]);
  162. FoundText := ReplaceWrap(FoundText, '*', '', [rfReplaceAll]);
  163. FoundText := ReplaceWrap(FoundText, '^', '', [rfReplaceAll]);
  164. FoundText := ReplaceWrap(FoundText, '"', '', [rfReplaceAll]);
  165. Result := FoundText;
  166. end;
  167.  
  168. function IsUpTextMultiCustom2(Text: TStringArray): Boolean;
  169. var
  170. TheText: string;
  171. i, n: Integer;
  172. begin
  173. TheText := GetGreenUptext;
  174. n := High(Text);
  175. for i := 0 to n do
  176. if (Pos(Text[i], TheText) > 0) then
  177. begin
  178. Result := True;
  179. Exit;
  180. end;
  181. end;
  182.  
  183. procedure Hi;
  184. begin
  185.  
  186. writeln('hi!');
  187. end;
  188.  
  189.  
  190. function WaitUpTextMulti2(S: TStringArray; Time: Integer): Boolean;
  191. var
  192. T: Integer;
  193. begin
  194. Result := false;
  195. T := GetSystemTime + Time;
  196. while (GetSystemTime < T) do
  197. begin
  198. if (IsUpTextMultiCustom2(S)) then
  199. begin
  200. Result := True;
  201. Exit;
  202. end;
  203. Wait(20 + Random(20));
  204. end;
  205. end;
  206.  
  207.  
  208.  
  209. function OpenWScreen: Boolean;
  210. begin
  211. Result := False;
  212. if WorldScreen then
  213. exit;
  214. if Loggedin then
  215. Exit;
  216. if not WorldScreen then
  217. begin
  218. Mmouse(54, 475, 1, 1);
  219. WaitHumanClick;
  220. ClickMouse2(Mouse_Left);
  221. waithumanclick;
  222. Result := True;
  223. end;
  224. end;
  225.  
  226. function whitecolor: boolean;
  227. var
  228. Monster: TpointArray;
  229. TmpCts: Integer;
  230. begin
  231. tmpcts := GetColorToleranceSpeed;
  232. ColorToleranceSpeed(2);
  233. SetColorSpeed2Modifiers(0.22, 1.69);
  234. result := FindColorsTolerance(Monster, 9163999, 192, 67, 583, 469, 4);
  235. ColorToleranceSpeed(tmpcts);
  236. SetColorSpeed2Modifiers(0.2, 0.2);
  237. end;
  238.  
  239.  
  240. procedure ProgressReport;
  241. var
  242. Timeleft,XpPerhour,Casts,CastsPH: Integer;
  243. begin
  244. if (not(loggedin)) then exit;
  245. ClearDebug;
  246. XpPerhour := (3600*(Cast) /((GetTimeRunning/1000)));
  247. Casts := ((Cast) / (29));
  248. CastsPH := (3600*(Casts) / ((GetTimeRunning/1000)));
  249. timeleft := ((Timer) - (GetTimeRunning));
  250. TimeTillBreak := (MsToTime(timeleft, Time_Formal));
  251. WriteLn('* FCurser v.1.0');
  252. WriteLn('* Runtime: ' + TimeRunning);
  253. Writeln('*');
  254. writeln('* Experience Gained: ' + IntToStr(Cast) + ' Exp P/H: ' + IntToStr(XpPerhour));
  255. writeln('* Curse Used : ' + IntToStr(Casts) + ' Casts P/h: ' + IntTostr(CastsPH));
  256. Writeln('* No. Of Times : ' + 'Failed Casting: ' + intTostr(failcast) + ' Messed up: ' + inttostr(messedup) + ' Entered Cave: ' + IntToStr(CaveEntrances));
  257. Writeln('* Time till break : ' + (TimeTillBreak)) ;
  258. Writeln('* Post all Bugs/proggies/errors on this topic: http://villavu.com/forum/showthread.php?t=103236');
  259. end;
  260.  
  261.  
  262.  
  263. function FindObjExX(var cx, cy: Integer; Text: TStringArray; Color: TIntegerArray; Tol, CTS: integer; Hue, Sat: Extended; Step, xs, ys, xe, ye: Integer): Boolean;
  264. var
  265. MidX, MidY, i, j, k, x, y, width, height, HalfWidth, HalfHeight: Integer;
  266. ColorFound: Boolean;
  267. SearchBoxes: array of array of TBox;
  268. p: TPointArray;
  269. begin
  270. if (not (loggedin)) then
  271. exit;
  272. Result := False;
  273. for i := 0 to (GetArrayLength(Color) - 1) do
  274. begin
  275. ColorToleranceSpeed(CTS);
  276. SetColorSpeed2Modifiers(Hue, sat);
  277. if (FindColorSpiralTolerance(cx, cy, Color[i], xs, ys, xe, ye, Tol)) then
  278. begin
  279. ColorToleranceSpeed(1);
  280. SetColorSpeed2Modifiers(0.2, 0.2);
  281. ColorFound := True;
  282. Break;
  283. end;
  284. end;
  285. ColorToleranceSpeed(1);
  286. SetColorSpeed2Modifiers(0.2, 0.2);
  287. if not (ColorFound) then
  288. Exit;
  289. MidX := Round((xe - xs) / 2);
  290. MidY := Round((ye - ys) / 2);
  291. Width := Ceil(abs(xe - xs) / 2 / Step - 0.5) * 2 + 1;
  292. Height := Ceil(abs(ye - ys) / 2 / Step - 0.5) * 2 + 1;
  293. SetLength(SearchBoxes, Width);
  294. HalfWidth := Floor(Width / 2);
  295. HalfHeight := Floor(Height / 2) for x := - 1 * HalfWidth to HalfWidth do
  296. begin
  297. SetLength(SearchBoxes[x + HalfWidth], Height);
  298. for y := - 1 * HalfHeight to HalfHeight do
  299. 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))));
  300. end;
  301. p := TPAFromBox(IntToBox(0, 0, Width - 1, Height - 1));
  302. SortTPAFrom(p, Point(floor(Width / 2), floor(Height / 2)));
  303. for k := 0 to High(Color) do
  304. for j := 0 to High(p) do
  305. begin
  306. ColorToleranceSpeed(CTS);
  307. SetColorSpeed2Modifiers(Hue, sat);
  308. 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
  309. begin
  310. ColorToleranceSpeed(1);
  311. SetColorSpeed2Modifiers(0.2, 0.2);
  312. MMouse(cx, cy, 3, 3);
  313. wait(randomrange(200, 300));
  314. if (WaitUptextMulti2(Text, 300)) then
  315. begin
  316. ColorToleranceSpeed(1);
  317. SetColorSpeed2Modifiers(0.2, 0.2);
  318. GetMousePos(cx, cy);
  319. Result := True;
  320. Exit;
  321. end;
  322. end;
  323. ColorToleranceSpeed(1);
  324. SetColorSpeed2Modifiers(0.2, 0.2);
  325. end;
  326. ColorToleranceSpeed(1);
  327. SetColorSpeed2Modifiers(0.2, 0.2);
  328. end;
  329.  
  330. procedure TeleportToHouse;
  331. begin
  332. if not loggedin then exit;
  333.  
  334. gametab(tab_magic);
  335. waithumanclick;
  336. MouseBox(610,305,624,313,mouse_left);
  337. wait(randomrange(10000,15000));
  338. Myloc := R_GetTileGlobal;
  339.  
  340.  
  341.  
  342.  
  343.  
  344. end;
  345.  
  346.  
  347.  
  348. procedure loginloop;
  349. begin
  350. if (hopworlds = true) then
  351. begin
  352. OpenWorldScreen;
  353. repeat
  354. if whitecolor then
  355. break;
  356. if whitecolor then
  357. writeln('yeaya');
  358. if not whitecolor then
  359. writeln('yea22ya');
  360. case random(10) of
  361. 0..2: mouse(randomrange(397, 554), randomrange(78, 394), 1, 1, mouse_move);
  362. 3..4: mouse(randomrange(298, 462), randomrange(200, 392), 1, 1, mouse_move);
  363. 5..6: mouse(randomrange(205, 555), randomrange(80, 154), 1, 1, mouse_move);
  364. 7..10: mouse(randomrange(211, 555), randomrange(246, 367), 1, 1, mouse_move);
  365. end;
  366. until (whitecolor)
  367. if whitecolor then
  368. begin
  369. clickmouse2(mouse_left);
  370. waithumanclick;
  371. currentworld;
  372. waithumanclick;
  373. if (CurrentWorldLS = 365) then
  374. exit;
  375. waithumanclick;
  376. myvars;
  377. loginplayer;
  378. exit;
  379. end;
  380. end
  381. else
  382. begin
  383. myvars;
  384. loginplayer;
  385.  
  386. waithumanclick;
  387. end;
  388. end;
  389.  
  390.  
  391. function GetHp(): integer;
  392. var
  393. s: string;
  394. PizzaCount: integer;
  395. begin
  396. wait(randomrange(200, 400));
  397. s := GetTextAtExWrap(160, 60, 200, 82, 0, 5, 1, 65535, 0, statchars07);
  398. PizzaCount := StrToIntDef(GetNumbers(s), - 1);
  399. writeln(PizzaCount);
  400. if (PizzaCount > 0) then
  401. begin
  402. IncEx(pizzasbought, pizzacount);
  403. wait(randomrange(200, 300));
  404. waithumanclick;
  405. end;
  406. end;
  407.  
  408.  
  409. Function FindMiniGame:boolean;
  410. var
  411. x,y:integer;
  412. begin
  413. result := FindSymbol(x, y, 'minigame');
  414. end;
  415.  
  416.  
  417.  
  418. function ColorLocate(Var Name: string; Color, Tol, CTS: integer; Hue, Sat: Extended; xs, ys, xe, ye: Integer): boolean;
  419. var
  420. Monster: TpointArray;
  421. TmpCts: Integer;
  422. begin
  423. tmpcts := GetColorToleranceSpeed;
  424. ColorToleranceSpeed(cts);
  425. SetColorSpeed2Modifiers(Hue, sat);
  426. result := FindColorsTolerance(Monster, color, xs, ys, xe, ye, Tol);
  427. ColorToleranceSpeed(tmpcts);
  428. SetColorSpeed2Modifiers(0.2, 0.2);
  429. end;
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438. 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;
  439. var
  440. III,i,tmpcts: integer;
  441. TPA:tpointarray;
  442. TPAA: T2DPointArray;
  443. begin
  444. if (not(loggedin)) then exit;
  445. gametab(tab_inv);
  446.  
  447. tmpcts := GetColorToleranceSpeed;
  448. ColorToleranceSpeed(CTS);
  449. SetColorSpeed2Modifiers(hMoD, SMoD);
  450.  
  451. FindColorsSpiralTolerance(MSCX, MSCY, TPA, color[III], x,y,xs,ys, Tol)
  452.  
  453. ColorToleranceSpeed(tmpCTS);
  454. SetColorSpeed2Modifiers(0.2, 0.2);
  455.  
  456. SplitTPAWrap(TPA,split,TPAA); // Object Finder.
  457. SortATPAFromSize(TPAA,sort,true);
  458. for I := 0 to High(TPAA) do
  459. begin
  460. MiddleTPAEx(TPAA[i], X, Y);
  461. MMouse(x, y, RandomRange(-3, 3), RandomRange(-3, 3));
  462. if WaitUpTextMulti2(uptext,WaitUptextWait+random(WaitUptextRandom)) then
  463. Begin
  464. Result := True;
  465. break;
  466. end;
  467. break;
  468. end;
  469. end;
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479. function Clickobject(Objpoint: tpoint; Uptext: TStringArray): Boolean;
  480. var
  481. Bp, Booth: TPoint;
  482. begin
  483. if (not LoggedIn) then
  484. Exit;
  485. if (R_DistanceFromTile(Objpoint) > 3) and (R_DistanceFromTile(Objpoint) < 15) then
  486. begin
  487. Bp.x := Objpoint.x + 1;
  488. Bp.Y := Objpoint.y - 1;
  489. R_WalkPath([Bp]);
  490. //R_WalkPath([objpoint]);
  491. waithumanclick2;
  492. end;
  493. if R_DistanceFromTile(Objpoint) < 5 then
  494. begin
  495. Booth := R_TileToMS(ObjPoint);
  496. MMouse(Booth.X, Booth.Y, 2, 2);
  497. Sleep(100 + Random(100));
  498. if (R_IsUpTextMulti(Uptext)) then
  499. begin
  500. result := true;
  501. end;
  502. end;
  503. end;
  504.  
  505.  
  506.  
  507. function MMouseObject(Objpoint: tpoint; Uptext: TStringArray): Boolean;
  508. var
  509. Booth: TPoint;
  510. begin
  511. if (not LoggedIn) then
  512. Exit;
  513. Booth := R_TileToMS(ObjPoint);
  514. MMouse(Booth.X, Booth.Y, 2, 2);
  515. Sleep(100 + Random(100));
  516. if (R_IsUpTextMulti(Uptext)) then
  517. begin
  518. result := true;
  519. end;
  520. end;
  521.  
  522.  
  523. function LocateNPC(Name, Uptext: string): boolean;
  524. var
  525. Bp,Tp: Tpoint;
  526. NpcName: tnpc;
  527. begin
  528. if R_FindNpc(Name, NpcName) then
  529. begin
  530. if NpcName.InCombat then
  531. exit;
  532. Tp := NpcName.Tile;
  533.  
  534. if (R_DistanceFromTile(tp) > 3) and (R_DistanceFromTile(tp) < 15) then
  535. begin
  536. Bp.x := Tp.x + 1;
  537. Bp.Y := Tp.y - 1;
  538. R_WalkPath([Bp]);
  539. waithumanclick2;
  540. end;
  541.  
  542. if R_DistanceFromTile(tp) < 5 then
  543. begin
  544. Tp := R_TileToMs(Tp);
  545. Mmouse(Tp.x, Tp.y, 0, 0);
  546. if R_WaitUptext(Uptext, 200) then
  547. begin
  548. result := true;
  549. end;
  550. end;
  551. end;
  552. end;
  553.  
  554.  
  555. // House spot 7827, 2773
  556. // 1 step south of orb 7827, 2780
  557. // orb // orb 7827, 2781 - Activate Elemental balance
  558.  
  559.  
  560. procedure domagics;
  561. begin
  562.  
  563. end;
  564.  
  565.  
  566.  
  567. function OnRangeScreen:boolean;
  568. var
  569. CTS:Integer;
  570. TPA:Tpointarray;
  571. begin
  572. if (not(loggedin)) then exit;
  573. cts := GetColorToleranceSpeed;
  574. ColorToleranceSpeed(2);
  575. SetColorSpeed2Modifiers(0.05, 0.41);
  576.  
  577. result:= FindColorsTolerance(TPA,5334901 , 482, 36, 492, 45, 12);
  578.  
  579.  
  580. ColorToleranceSpeed(CTS);
  581. SetColorSpeed2Modifiers(0.02, 0.2);
  582.  
  583. end;
  584.  
  585. Procedure closerangescreen;
  586. begin
  587. if (not(loggedin)) then exit;
  588. writeln('we are on skill screen, closing');
  589. mousebox(482, 36, 492, 45,1);
  590. end;
  591.  
  592.  
  593. function OnskillScreen:boolean;
  594. var
  595. CTS:Integer;
  596. TPA:Tpointarray;
  597. begin
  598. if (not(loggedin)) then exit;
  599. cts := GetColorToleranceSpeed;
  600. ColorToleranceSpeed(2);
  601. SetColorSpeed2Modifiers(0.02, 1.48);
  602.  
  603. result:= FindColorsTolerance(TPA,8042720 , 480, 5, 513, 35, 4);
  604.  
  605.  
  606. ColorToleranceSpeed(CTS);
  607. SetColorSpeed2Modifiers(0.02, 0.2);
  608.  
  609. end;
  610.  
  611. Procedure CloseSkillScreen;
  612. begin
  613. if (not(loggedin)) then exit;
  614. writeln('we are on skill screen, closing');
  615. mousebox(494,17,500,22,1);
  616. end;
  617.  
  618.  
  619. function OnmageTab:boolean;
  620. var
  621. Monster:TpointArray;
  622. TmpCts:Integer;
  623. Melee:Boolean;
  624. begin
  625. if (not(loggedin)) then
  626. exit;
  627. tmpCTS := GetColorToleranceSpeed;
  628. ColorToleranceSpeed(2);
  629. SetColorSpeed2Modifiers(0.06, 0.24);
  630.  
  631.  
  632. result := FindColorsTolerance(Monster, 1382991, 730, 170, 754, 195, 11)
  633. melee:= result;
  634.  
  635. ColorToleranceSpeed(0);
  636. SetColorSpeed2Modifiers(0.2, 0.2);
  637. end;
  638.  
  639.  
  640.  
  641.  
  642. function OutofRunes:boolean;
  643. Begin
  644. if (not(loggedin)) then exit;
  645. result := FindTextTPA(clBlack , 0, MCX1, MCY1, MCX2, MCY2, 'ody', smallChars07, Nothing);
  646. end;
  647.  
  648. procedure Termination;
  649. begin
  650. if (loggedin) then
  651. begin
  652. Writeln('we ran out of runes, or something really went wrong?, terminating script');
  653. repeat
  654. if (not(loggedin)) then break;
  655. logout;
  656. waithumanclick;
  657. if (not(loggedin)) then break;
  658. until (not(loggedin));
  659. if (not(loggedin)) then
  660. begin
  661. terminatescript;
  662. end;
  663. end;
  664. end;
  665.  
  666. function NotchatTabAll:boolean;
  667. var
  668. Monster:TpointArray;
  669. TmpCts:Integer;
  670. begin
  671. if (not(loggedin)) then exit;
  672.  
  673. tmpCTS := GetColorToleranceSpeed;
  674. ColorToleranceSpeed(2);
  675. SetColorSpeed2Modifiers(0.10, 0.34);
  676.  
  677.  
  678. result := FindColorsTolerance(Monster, 4213586, 6,482,60,497, 11);
  679.  
  680. ColorToleranceSpeed(0);
  681. SetColorSpeed2Modifiers(0.2, 0.2);
  682.  
  683.  
  684. end;
  685.  
  686. procedure MakeMyChatTabAll;
  687. begin
  688. if (not(loggedin)) then exit;
  689.  
  690. writeln('Our chat Tab is not set to all, making chat tab to all');
  691. mousebox(12,485,45,497,1);
  692. end;
  693.  
  694.  
  695. procedure WaitAfterCast;
  696. begin
  697. if (not(loggedin)) then exit;
  698. case random(600) of
  699. 1..450: Wait(RandomRange(100, 300));
  700. 451..570: Wait(RandomRange(300, 400)); //this is rarely used.
  701. 571..590: Wait(RandomRange(400, 600));
  702. 591..600: Wait(RandomRange(600, 1000));
  703. end;
  704. end;
  705.  
  706.  
  707.  
  708. procedure WaitShortClick;
  709. begin
  710. if (not(loggedin)) then exit;
  711. case random(600) of
  712. 1..450: Wait(RandomRange(100, 150));
  713. 451..570: Wait(RandomRange(150, 200)); //this is rarely used.
  714. 571..590: Wait(RandomRange(200, 250));
  715. 591..600: Wait(RandomRange(250, 400));
  716. end;
  717. end;
  718.  
  719. procedure WaitShortClick2;
  720. begin
  721. if (not(loggedin)) then exit;
  722. case random(600) of
  723. 1..450: Wait(RandomRange(400, 450));
  724. 451..570: Wait(RandomRange(450, 500)); //this is rarely used.
  725. 571..590: Wait(RandomRange(500, 550));
  726. 591..600: Wait(RandomRange(550, 600));
  727. end;
  728. end;
  729.  
  730.  
  731.  
  732. procedure MouseSpeedz;
  733. begin
  734. if (not(loggedin)) then exit;
  735. case random(600) of
  736. 1..450: MouseSpeed := MainMouseSpeed;
  737. 451..570: MouseSpeed := MainMouseSpeed + randomrange(-1,1);
  738. 571..590: MouseSpeed := MainMouseSpeed + randomrange(-1,2);
  739. 591..600: MouseSpeed := MainMouseSpeed + randomrange(-1,3);
  740. end;
  741. end;
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751. procedure FindIfonMagetab;
  752. begin
  753. if (not(loggedin)) then exit;
  754. if (not(OnmageTab)) then
  755. begin
  756. gametab(tab_magic);
  757. waitshortclick2;
  758. end
  759. else
  760. begin
  761. if (OnmageTab) then
  762. exit;
  763. end;
  764. end;
  765.  
  766.  
  767. Function HoverNearbyNpc:boolean;
  768. var
  769. I:Tpointarray;
  770. P:Integer;
  771. begin
  772. if (not(loggedin)) then exit;
  773. I := GetMiniMapDots('npc');
  774. if (length(I) > 0) then
  775. begin
  776. SortTPAFrom(i, Point(MMCX, MMCY));
  777. P := random(length(I))
  778. Mmouse(I[0].x, I[0].y,3,3);
  779. // Mouse(I[0].x, I[0].y, RandomRange(-2, 2), RandomRange(-2, 2), true); // you can take this command and change npc to whatever dot you want and use it however you want, great for auto fighters.
  780. result := true;
  781. end;
  782. end;
  783.  
  784.  
  785.  
  786.  
  787. Procedure Keyboards;
  788. begin
  789. case random (5) of
  790. 0..2:begin
  791. KeyDown(37);
  792. WaitShortClick
  793. KeyUp(37);
  794. WaitShortClick
  795. KeyDown(40);
  796. WaitShortClick
  797. KeyUp(40);
  798. end;
  799. 3..4: begin
  800. KeyDown(39);
  801. WaitShortClick
  802. KeyUp(39);
  803. WaitShortClick
  804. KeyDown(38);
  805. WaitShortClick
  806. KeyUp(38);
  807. end;
  808. 5: begin
  809. KeyDown(38);
  810. WaitShortClick
  811. KeyUp(38);
  812. WaitShortClick
  813. KeyDown(39);
  814. WaitShortClick
  815. KeyUp(39);
  816. end;
  817. end;
  818. end;
  819.  
  820.  
  821.  
  822. Procedure Antiban;
  823. Begin
  824. if (not(loggedin)) then exit;
  825. case random (100) of
  826. 0..56: begin
  827. end;
  828.  
  829. 57..100: begin
  830.  
  831. case random(150) of
  832. 10: hoverskill(skill_magic,false);
  833. 15: HoverOnlineFriend;
  834. 20: BoredHuman;
  835. 30: MMouseOffClient('top');
  836. 40: MMouseOffClient('left');
  837. 50: MMouseOffClient('right');
  838. 60: MMouseOffClient('bottom');
  839. 70: SmallRandomMouse;
  840. 80: RandomAngle(1);
  841. 90: RandomAngle(2);
  842. 100:PickUpMouse;
  843. 110: CompassMovement(10, 70, true);
  844. 120: HoverNearbyNpc; // See its an antiban, even though it sucks haha. .. Yeah..
  845. 130: Keyboards;
  846. 140: MissMouse(250,250);
  847. 150: RandomMovement;
  848. 160: CompassMovement(240,300,true);
  849. 170: AdjustMouseSpeed(3,10,20);
  850. 180: RandomFKeys(true);
  851. 190: RandomTab(true);
  852.  
  853. end;
  854. end;
  855. end;
  856. end;
  857.  
  858.  
  859.  
  860.  
  861.  
  862. Function LocateMonster1(Color:TintegerArray; Tol,CTS:integer; hMoD,sMoD:Extended; Uptext: Array of String): Boolean;
  863. var
  864. R,ii,X,y,i,tmpcts:integer;
  865. bp,orb: tpoint;
  866. TPA:Tpointarray;
  867. ATPA:T2DPointArray;
  868. Boxm :tbox;
  869. begin
  870. if (not(Loggedin)) then exit;
  871.  
  872. orb.x := myloc.x;
  873. orb.y := myloc.y +8;
  874.  
  875. if R_DistanceFromTile(oRB) > 15 then exit;
  876.  
  877. if (R_DistanceFromTile(oRB) > 3) and (R_DistanceFromTile(oRB) < 15) then
  878. begin
  879. Bp.x := orb.x;
  880. Bp.Y := orb.y - 1;
  881. R_WebWalk(bp);
  882. waithumanclick2;
  883. end;
  884.  
  885. MouseSpeedz;
  886. FindIfonMagetab;
  887. case random (10) of
  888.  
  889. 0..7: Mouse(RandomRange(668, 669),RandomRange(263, 264), random(3),random(3),mouse_move);
  890. 8..10: Mouse(RandomRange(663, 670),RandomRange(260, 265), random(1),random(1),mouse_move);
  891. end;
  892. if WaitUpTextMulti2(['Curse'],300) then
  893. begin
  894. clickmouse2(mouse_left);
  895. waitshortclick;
  896. case random (30) of
  897. 0..27: Clickobject(orb,['Curse']);
  898. 28..30: FindObjExX(cx,cy,['Curse'],[7571064],21,2,0.59,0.07,50,msx1,msy1,msx2,msy2);
  899. end;
  900. wait(randomrange(90,120));
  901. if WaitUpTextMulti2(['Curse'],300) then
  902. begin
  903. clickmouse2(mouse_left);
  904. if Didclick(true,1000) then
  905. begin
  906. IncEx(cast,29);
  907. progressreport;
  908. case random (100) of
  909. 1: begin
  910. case random (100) of
  911. 0..80: begin
  912. end;
  913. 81..100:Antiban;
  914. end;
  915.  
  916. case random (50) of
  917. 0..42: waitafterCast;
  918. 43..48: waithumanclick2;
  919. 49..50: Wait(randomrange(15000,25000));
  920. end;
  921. end;
  922.  
  923. 2: begin
  924. end;
  925. end;
  926.  
  927. result := true;
  928. exit;
  929. end
  930. else
  931. begin
  932. inc(Failcast);
  933. exit;
  934. end;
  935. end
  936. else
  937. begin
  938. inc(failcast);
  939. exit;
  940. end;
  941. end
  942. else
  943. begin
  944. inc(failcast);
  945. exit;
  946. end;
  947. end;
  948.  
  949.  
  950.  
  951. procedure Inhouseloop;
  952. var
  953. bp,Orb:tpoint;
  954. begin
  955.  
  956. MakeCompass('w');
  957. setangle(1);
  958.  
  959. orb.x := myloc.x;
  960. orb.y := myloc.y +8;
  961.  
  962. if (R_DistanceFromTile(oRB) > 3) and (R_DistanceFromTile(oRB) < 15) then
  963. begin
  964. Bp.x := orb.x;
  965. Bp.Y := orb.y - 1;
  966. R_WebWalk(bp);
  967. waithumanclick2;
  968. end;
  969.  
  970. if Clickobject(orb, ['Activate', 'ctivate']) then
  971. begin
  972. clickmouse2(mouse_left);
  973. waithumanclick2;
  974. end;
  975.  
  976. waithumanclick2;
  977. if Clickobject(orb, ['Banish','anish']) then
  978. begin
  979. repeat
  980. WaitHumanClick;
  981. if not loggedin then exit;
  982. if R_DistanceFromTile(oRB) > 5 then exit;
  983.  
  984. if OnskillScreen then
  985. CloseSkillScreen;
  986.  
  987. if (onrangescreen) then
  988. closerangescreen;
  989.  
  990.  
  991. if OutofRunes then
  992. Termination;
  993.  
  994. if (NotchatTabAll) then
  995. MakeMyChatTabAll;
  996.  
  997.  
  998. takebreaks;
  999.  
  1000. LocateMonster1([7571064],21,2,0.59,0.07,['Curse']);
  1001.  
  1002.  
  1003. until (not loggedin);
  1004. end;
  1005.  
  1006.  
  1007.  
  1008. end;
  1009.  
  1010. procedure mainloop;
  1011. begin
  1012. if not loggedin then
  1013. exit;
  1014.  
  1015. if srl_InFight then
  1016. TeleportToHouse;
  1017.  
  1018.  
  1019.  
  1020. 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)) or FindObjExX(cx,cy,['Activate','ctivate','Banish','anish'],[6982271],22,2,0.30,0.25,50,msx1,msy1,msx2,msy2) then
  1021. begin
  1022. writeln('yes');
  1023. Inhouseloop;
  1024. end;
  1025.  
  1026.  
  1027. 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 // and ColorLocate('Porta',5774918, 5, 2, 0.15,4.50, msx1,msy1,msx2,msy2) then
  1028. begin
  1029. writeln('yess');
  1030. if FindObject([5774918], 5, 2, 0.15,4.50,20,20,['Enter','nter','ortal','Portal'],300,250,msx1,msy1,msx2,msy2) then
  1031. begin
  1032. writeln('yess2');
  1033. if srl_InFight then
  1034. TeleportToHouse;
  1035.  
  1036. clickmouse2(mouse_left);
  1037. wait(randomrange(2000,3000));
  1038. mousebox(180,375,325,390,mouse_left);
  1039. wait(randomrange(10000,15000));
  1040. Myloc := R_GetTileGlobal;
  1041.  
  1042. end;
  1043. end;
  1044.  
  1045.  
  1046. 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
  1047. begin
  1048. writeln('yes2');
  1049. if srl_InFight then
  1050. TeleportToHouse;
  1051. TeleportToHouse;
  1052. end;
  1053.  
  1054.  
  1055.  
  1056. end;
  1057.  
  1058. procedure StartTime;
  1059. begin
  1060. Timer := GetTimeRunning + RandomRange(BreakTime1 * 60000, BreakTime2 * 60000);
  1061. end;
  1062.  
  1063.  
  1064.  
  1065. begin
  1066. playerSetup;
  1067. setupsrl;
  1068. SetupReflection;
  1069. addonterminate('progressreport');
  1070. StartTime;
  1071. myvars;
  1072. repeat
  1073. wait(400);
  1074. if not loggedin then
  1075. loginloop;
  1076. wait(400);
  1077. if loggedin then
  1078. mainloop;
  1079. until (false);
  1080. end.
Advertisement
Add Comment
Please, Sign In to add comment