Guest User

Untitled

a guest
May 28th, 2012
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.13 KB | None | 0 0
  1. program KylesEsswraithExtractor;
  2.  
  3. {$DEFINE SMART}
  4. {$i srl/srl.simba}
  5. {$I SRL/SRL/Misc/Debug.Simba}
  6.  
  7. const
  8. {* Don't touch *}
  9. Version = '1.6';
  10.  
  11. {* SRL Stats *}
  12. SRLStats_Username = '';
  13. SRLStats_Password = '';
  14.  
  15. {* Object Constants *}
  16. objUndeadSoul = 0;
  17. objLivingSoul = 1;
  18. objSoulWraith = 2;
  19. objBloodySkulls = 3;
  20. objBloodPool = 4;
  21. objBloodWraith = 5;
  22. objSkulls = 6;
  23. objDeathWraith = 7;
  24. objJumper = 8;
  25. objShifter = 9;
  26. objNebula = 10;
  27. objWaterEssling = 11;
  28. objVine = 12;
  29. objLawHound = 13;
  30. objCosmicHound = 14;
  31. objChaosHound = 15;
  32. objAstralHound = 16;
  33. objNatureHound = 17;
  34. objBodyHound = 18;
  35. objCCloud = 19;
  36. objAirEss = 20;
  37. objWaterPool = 21;
  38. objFleshyGrowth = 22;
  39. objFireStorm = 23;
  40. objEarthEss = 24;
  41. objRockFrag = 25;
  42. objFireball = 26;
  43. objMindEssling = 27;
  44. objCyclone = 28;
  45.  
  46. (* Break settings *)
  47. SwitchWorlds = True; // Switch worlds after a break?
  48. TakeBreaks = False; // Take Breaks during runtime?
  49. BreakIn = 500; // How long before we take a break? (minutes)
  50. BreakFor = 20; // How long will we break for? (minutes)
  51. Bir = 13; // Random minutes to add/subtract from how long until we break
  52. Bfr = 5; // Random minutes to add/subjtract from break duraction
  53.  
  54. {* Script Constants *}
  55. Floors = 3; // Which Floor are you on? 1,2,3? This is to make it only search on your island
  56. // If it starts to bug out, set it to 0
  57.  
  58. Debug = False; // If things aren't working, set this to true and tell us what it says
  59. // Or if you want to narrow down colors to make script even better :)
  60. type
  61. {* TObj Type *}
  62. TObj = record
  63. Hue, Sat : Extended;
  64. Name: string;
  65. UpText : TStringArray;
  66. ObjID, Color, Tol, LvlReq, Max, Min, IXP: Integer;
  67. end;
  68.  
  69. type
  70. {* TObjectArray Type *}
  71. TObjectArray = array of TObj;
  72.  
  73. var
  74. {* Script Variables *}
  75. StartXP, XPH, XP, TP, RCt, RCLvl, TW, CurrentXP, EssenceDTM, EX, EY, IslandColor, IslandTol: Integer;
  76. Objects : TObjectArray;
  77. IslandHue, IslandSat : Extended;
  78. Higher, SafeNub : Boolean;
  79. TB: Tbox;
  80.  
  81. (* Break variables *)
  82. w, x, y, z, RealBTime, CurrentBTime, BreakRounds : Integer;
  83.  
  84. procedure DeclarePlayers();
  85. begin
  86. HowManyPlayers := 1;
  87. NumberOfPlayers(HowManyPlayers);
  88. CurrentPlayer := 0;
  89.  
  90. with Players[0] do
  91. begin
  92. Name := 'username'; // Your RuneScape Account Name
  93. Pass := 'password'; // Your RuneScape Account Password
  94. Active := True; // Use in the Script. True / False.
  95. Booleans[0] := True; // Set to False if you want to search for all Objects
  96.  
  97. // This is for searching for specific Objects, add / remove as needed. Order doesn't matter
  98. Integers := [objUndeadSoul, objLivingSoul, objSoulWraith, objBloodySkulls
  99. , objBloodPool, objBloodWraith, objSkulls, objDeathWraith
  100. , objJumper, objShifter, objNebula];
  101. end;
  102. end;
  103.  
  104. procedure SetDTM;
  105. begin
  106. EssenceDTM := DTMFromString('mrAAAAHic42BgYHBkYmDwAGIXILYBYksodgdiXyB+DlTzCIgfQvEzIP4AxG+A+CkQW5ibMRjo64ExiG1tZcHg6uLE4O7mwmBsZMjABVSDDzMSwDAAAJ3CDvU=');
  107. end;
  108.  
  109. procedure Fr33DTM;
  110. begin
  111. FreeDTM(EssenceDTM);
  112. end;
  113.  
  114. procedure DebugThis(s : string);
  115. begin
  116. if(Debug)then
  117. WriteLn(s);
  118. end;
  119.  
  120. procedure SetupObjects();
  121. begin
  122. SetLength(Objects, 29);
  123.  
  124. with Objects[objBloodWraith] do
  125. begin
  126. ObjID := objBloodWraith;
  127. Name := 'Blood esswraith';
  128. UpText := ['lood ess', 'ood essw', 'Siphon Blood esswraith'];
  129. Color := 6263962;
  130. Tol := 15;
  131. Hue := 0.12;
  132. Sat := 0.72;
  133. LvlReq := 77;
  134. Max := 250;
  135. Min := 50;
  136. IXP := 77;
  137. end;
  138.  
  139. with Objects[objDeathWraith] do
  140. begin
  141. ObjID := objDeathWraith;
  142. Name := 'Death esswraith';
  143. UpText := ['eath ess', 'iphon De', 'ath essw', 'Siphon Death esswraith'];
  144. Color := 5278586;
  145. Tol := 26;
  146. Hue := 0.04;
  147. Sat := 0.58;
  148. LvlReq := 65;
  149. Min := 0;
  150. Max := 1000;
  151. IXP := 60;
  152. end;
  153.  
  154. with Objects[objSoulWraith] do
  155. begin
  156. ObjID := objSoulWraith;
  157. Name := 'Soul esswraith';
  158. UpText := ['oul ess', 'iphon So', 'oul essw', 'Siphon Soul esswraith'];
  159. Color := 6251056;
  160. Tol := 24;
  161. Hue := 0.25;
  162. Sat := 1.01;
  163. LvlReq := 90;
  164. Min := 0;
  165. Max := 1000;
  166. IXP := 108;
  167. end;
  168.  
  169. with Objects[objLivingSoul] do
  170. begin
  171. ObjID := objLivingSoul;
  172. Name := 'Living Soul';
  173. UpText := ['Siphon Living', 'on Liv', 'iving', 'oul'];
  174. Color := 12867973;
  175. Tol := 9;
  176. Hue := 0.51;
  177. Sat := 0.99;
  178. LvlReq := 90;
  179. Min := 0;
  180. Max := 1000;
  181. IXP := 213;
  182. end;
  183.  
  184. with Objects[objJumper] do
  185. begin
  186. ObjID := objJumper;
  187. Name := 'Jumper';
  188. UpText := ['Siphon Jumper', 'on Jum', 'Jumper', 'mper'];
  189. Color := 16624975;
  190. Tol := 7;
  191. Hue := 0.02;
  192. Sat := 1.70;
  193. LvlReq := 54;
  194. Min := 10;
  195. Max := 50;
  196. IXP := 107;
  197. end;
  198.  
  199. with Objects[objBloodPool] do
  200. begin
  201. ObjID := objBloodPool;
  202. Name := 'Blood Pool';
  203. UpText := ['Siphon Blood Pool', 'on blo', 'blood', 'od poo'];
  204. Color := 1252488;
  205. Tol := 10;
  206. Hue := 0.02;
  207. Sat := 1.70;
  208. LvlReq := 77;
  209. Min := 80;
  210. Max := 250;
  211. IXP := 146;
  212. end;
  213.  
  214. with Objects[objNebula] do
  215. begin
  216. ObjID := objNebula;
  217. Name := 'Nebula';
  218. UpText := ['Siphon Nebula', 'on Neb', 'Nebula', 'bula'];
  219. Color := 8988293;
  220. Tol := 6;
  221. Hue := 1.15;
  222. Sat := 3.71;
  223. LvlReq := 40;
  224. Min := 55;
  225. Max := 1000;
  226. IXP := 85;
  227. end;
  228.  
  229. with Objects[objSkulls] do
  230. begin
  231. ObjID := objSkulls;
  232. Name := 'Skulls';
  233. UpText := ['Siphon Skulls', 'on Sku', 'Skulls', 'ulls'];
  234. Color := 9748431;
  235. Tol := 7;
  236. Hue := 0.02;
  237. Sat := 1.70;
  238. LvlReq := 65;
  239. Min := 3;
  240. Max := 1000;
  241. IXP := 120;
  242. end;
  243.  
  244. with Objects[objUndeadSoul] do
  245. begin
  246. ObjID := objUndeadSoul;
  247. Name := 'Undead Soul';
  248. UpText := ['ndead', 'oul', 'ndead So', 'd Soul'];
  249. Color := 10979231;
  250. Tol := 4;
  251. Hue := 0.48;
  252. Sat := 0.61;
  253. LvlReq := 95;
  254. Min := 0;
  255. Max := 1000;
  256. IXP := 255;
  257. end;
  258.  
  259. with Objects[objBloodySkulls] do
  260. begin
  261. ObjID := objBloodySkulls;
  262. Name := 'Bloody Skulls';
  263. UpText := ['Bloody', 'skulls', 'oody', 'kulls'];
  264. Color := 396358;
  265. Tol := 2;
  266. Hue := 0.15;
  267. Sat := 1.52;
  268. LvlReq := 83;
  269. Min := 5;
  270. Max := 1000;
  271. IXP := 176;
  272. end;
  273.  
  274. with Objects[objShifter] do
  275. begin
  276. ObjID := objShifter;
  277. Name := 'Shifter';
  278. UpText := ['Siphon Shifter', 'on Shi', 'Shifter', 'ifter'];
  279. Color := 1830421;
  280. Tol := 7;
  281. Hue := 0.02;
  282. Sat := 1.70;
  283. LvlReq := 54;
  284. Max := 900;
  285. Min := 400;
  286. IXP := 87;
  287. end;
  288.  
  289. with Objects[objWaterEssling] do
  290. begin
  291. ObjID := objWaterEssling;
  292. Name := 'WaterEssling';
  293. UpText := ['Water Essling', 'ater', 'er essl', 'ssling'];
  294. Color := 12085388;
  295. Tol := 17;
  296. Hue := 1.29;
  297. Sat := 0.99; //messed up for now
  298. LvlReq := 5;
  299. Max := 0;
  300. Min := 0;
  301. IXP := 13;
  302. end;
  303.  
  304. with Objects[objVine] do
  305. begin
  306. ObjID := objVine;
  307. Name := 'Vine';
  308. UpText := ['Siphon Vine', 'phon V', 'hon v'];
  309. Color := 1200463;
  310. Tol := 18;
  311. Hue := 0.28;
  312. Sat := 1.75;
  313. LvlReq := 17;
  314. Max := 900;
  315. Min := 60;
  316. IXP := 36;
  317. end;
  318.  
  319. with Objects[objCCloud] do
  320. begin
  321. ObjID := objCCloud;
  322. Name := 'Chaotic Cloud';
  323. UpText := ['Siphon Chaotic', 'on Chaotic', 'Chaotic', 'haotic Cloud'];
  324. Color := 2167590;
  325. Tol := 4;
  326. Hue := 2.03;
  327. Sat := 2.57;
  328. LvlReq := 35;
  329. Min := 20;
  330. Max := 1000;
  331. IXP := 62;
  332. end;
  333.  
  334. with Objects[objCosmicHound] do
  335. begin
  336. ObjID := objCosmicHound;
  337. Name := 'Cosmic Esshound';
  338. UpText := ['osmic', 'osmic essh', 'Cosmic', 'Siphon Cosmic', 'ic esshound', 'Siphon Cosmic esshound'];
  339. Color := 14448236;
  340. Tol := 24;
  341. Hue := 0.06;
  342. Sat := 1.43;
  343. LvlReq := 27;
  344. Min := 250;
  345. Max := 700;
  346. IXP := 27;
  347. end;
  348.  
  349. with Objects[objChaosHound] do
  350. begin
  351. ObjID := objChaosHound;
  352. Name := 'Chaos Esshound';
  353. UpText := ['haos', 'haos essh', 'Chaos', 'Siphon Chaos', 'os esshound', 'Siphon Chaos esshound'];
  354. Color := 14448236;
  355. Tol := 24;
  356. Hue := 0.06;
  357. Sat := 1.43;
  358. LvlReq := 35;
  359. Min := 250;
  360. Max := 700;
  361. IXP := 31;
  362. end;
  363.  
  364. with Objects[objAstralHound] do
  365. begin
  366. ObjID := objAstralHound;
  367. Name := 'Astral Esshound';
  368. UpText := ['stral', 'stral ess', 'Astral', 'Siphon Astral', 'ral esshound', 'Siphon Astral esshound'];
  369. Color := 14448236;
  370. Tol := 24;
  371. Hue := 0.06;
  372. Sat := 1.43;
  373. LvlReq := 40;
  374. Min := 250;
  375. Max := 700;
  376. IXP := 36;
  377. end;
  378.  
  379. with Objects[objNatureHound] do
  380. begin
  381. ObjID := objNatureHound;
  382. Name := 'Nature Esshound';
  383. UpText := ['ature', 'ature ess', 'Nature', 'Siphon Nature', 'ture esshound', 'Siphon Nature esshound'];
  384. Color := 14448236;
  385. Tol := 24;
  386. Hue := 0.06;
  387. Sat := 1.43;
  388. LvlReq := 44;
  389. Min := 250;
  390. Max := 700;
  391. IXP := 44;
  392. end;
  393.  
  394. with Objects[objLawHound] do
  395. begin
  396. ObjID := objLawHound;
  397. Name := 'Law esshound';
  398. UpText := ['Siphon Law', 'on Law', 'Law', 'aw ess', 'aw esshound', 'Siphon Law esshound'];
  399. Color := 14448236;
  400. Tol := 24;
  401. Hue := 0.06;
  402. Sat := 1.43;
  403. LvlReq := 54;
  404. Min := 250;
  405. Max := 700;
  406. IXP := 54;
  407. end;
  408.  
  409. with Objects[objBodyHound] do
  410. begin
  411. ObjID := objBodyHound;
  412. Name := 'Body esshound';
  413. UpText := ['Siphon Body', 'on Bod', 'Body', 'ody ess', 'ody esshound', 'Siphon Body esshound'];
  414. Color := 14448236;
  415. Tol := 24;
  416. Hue := 0.06;
  417. Sat := 1.43;
  418. LvlReq := 20;
  419. Min := 250;
  420. Max := 700;
  421. IXP := 24;
  422. end;
  423.  
  424. with Objects[objAirEss] do
  425. begin
  426. ObjID := objAirEss;
  427. Name := 'Air essling';
  428. UpText := ['ir ess', 'iphon Air', 'Siphon Air essling'];
  429. Color := 15187588;
  430. Tol := 20;
  431. Hue := 0.05;
  432. Sat := 2.04;
  433. LvlReq := 1;
  434. Max := 250;
  435. Min := 50;
  436. IXP := 10;
  437. end;
  438.  
  439. with Objects[objWaterPool] do
  440. begin
  441. ObjID := objWaterPool;
  442. Name := 'Water Pool';
  443. UpText := ['ter poo', 'iphon Wat', 'Siphon Water pool', 'ater pool'];
  444. Color := 15187588;
  445. Tol := 20;
  446. Hue := 0.05;
  447. Sat := 2.04;
  448. LvlReq := 5;
  449. Max := 250;
  450. Min := 50;
  451. IXP := 11;
  452. end;
  453.  
  454. with Objects[objFleshyGrowth] do
  455. begin
  456. ObjID := objFleshyGrowth;
  457. Name := 'Fleshy Growth';
  458. UpText := ['eshy grow', 'iphon Fle', 'Siphon Fleshy growth', 'shy gro'];
  459. Color := 4082573;
  460. Tol := 11;
  461. Hue := 0.07;
  462. Sat := 0.49;
  463. LvlReq := 20;
  464. Max := 250;
  465. Min := 50;
  466. IXP := 47;
  467. end;
  468.  
  469. with Objects[objFireStorm] do
  470. begin
  471. ObjID := objFireStorm;
  472. Name := 'Fire Storm';
  473. UpText := ['ire sto', 'iphon Fir', 'Siphon Fire storm', 'ire sto'];
  474. Color := 2571174;
  475. Tol := 3;
  476. Hue := 0.19;
  477. Sat := 4.75;
  478. LvlReq := 27;
  479. Max := 250;
  480. Min := 50;
  481. IXP := 42;
  482. end;
  483.  
  484. with Objects[objEarthEss] do
  485. begin
  486. ObjID := objEarthEss;
  487. Name := 'Earth essling';
  488. UpText := ['rth ess', 'iphon Ear', 'Siphon Earth essling', 'arth essl'];
  489. Color := 4744582;
  490. Tol := 15;
  491. Hue := 0.04;
  492. Sat := 0.32;
  493. LvlReq := 1;
  494. Max := 250;
  495. Min := 50;
  496. IXP := 15;
  497. end;
  498.  
  499. with Objects[objRockFrag] do
  500. begin
  501. ObjID := objRockFrag;
  502. Name := 'Rock Fragment';
  503. UpText := ['Siphon Rock', 'on Roc', 'Rock', 'Fragment'];
  504. Color := 3434345;
  505. Tol := 13;
  506. Hue := 0.41;
  507. Sat := 0.46;
  508. LvlReq := 9;
  509. Min := 60;
  510. Max := 900;
  511. IXP := 29;
  512. end;
  513.  
  514. with Objects[objFireball] do
  515. begin
  516. ObjID := objFireball;
  517. Name := 'Fireball';
  518. UpText := ['Siphon Fireball', 'on Fire', 'reball', 'fireball'];
  519. Color := 1924282;
  520. Tol := 12;
  521. Hue := 0.36;
  522. Sat := 1.10;
  523. LvlReq := 14;
  524. Min := 60;
  525. Max := 900;
  526. IXP := 35;
  527. end;
  528.  
  529. with Objects[objMindEssling] do
  530. begin
  531. ObjID := objMindEssling;
  532. Name := 'Mind Essling';
  533. UpText := ['Mind Essling', 'ind', 'nd essl', 'ssling'];
  534. Color := 7905200;
  535. Tol := 17;
  536. Hue := 0.21;
  537. Sat := 0.40;
  538. LvlReq := 1;
  539. Max := 150;
  540. Min := 2;
  541. IXP := 30;
  542. end;
  543.  
  544. with Objects[objCyclone] do
  545. begin
  546. ObjID := objCyclone;
  547. Name := 'Cyclone';
  548. UpText := ['Siphon Cyclone', 'clone', 'yclone', 'cyclone'];
  549. Color := 2698292;
  550. Tol := 6;
  551. Hue := 0.51;
  552. Sat := 1.10;
  553. LvlReq := 1;
  554. Min := 80;
  555. Max := 900;
  556. IXP := 19;
  557. end;
  558. end;
  559.  
  560. function GetObject(vObj : Integer) : TObj;
  561. begin
  562. Result := Objects[vObj];
  563. end;
  564.  
  565. function GetObjectByXP(xp : Integer) : TObj;
  566. var
  567. i : Integer;
  568. begin
  569. for i := 0 to High(Objects) do
  570. if(Objects[i].IXP = xp)then
  571. Result := Objects[i];
  572. end;
  573.  
  574. procedure AddObject(var objArr : TObjectArray; ObjID : Integer);
  575. begin
  576. SetLength(objArr, Length(objArr) + 1);
  577. objArr[High(objArr)] := GetObject(ObjID);
  578. end;
  579.  
  580. procedure FilterObjects();
  581. var
  582. tmpObjects : TObjectArray;
  583. i : Integer;
  584. begin
  585. if(not(Players[CurrentPlayer].Booleans[0]))then
  586. Exit;
  587.  
  588. for i := 0 to High(Objects) do
  589. if(InIntArray(Players[CurrentPlayer].Integers, Objects[i].ObjID))then
  590. AddObject(tmpObjects, Objects[i].ObjID);
  591.  
  592. SetLength(Objects, High(tmpObjects));
  593. Objects := tmpObjects;
  594. end;
  595.  
  596. procedure SortObjects();
  597. var
  598. tmpObjects : TObjectArray;
  599. TIA : TIntegerArray;
  600. i : Integer;
  601. begin
  602. SetLength(TIA, Length(Objects));
  603.  
  604. for i := 0 to High(Objects) do
  605. TIA[i] := Objects[i].IXP;
  606.  
  607. Quicksort(TIA);
  608. InvertTIA(TIA);
  609.  
  610. SetLength(tmpObjects, Length(Objects));
  611.  
  612. for i := 0 to High(TIA) do
  613. tmpObjects[i] := GetObjectByXP(TIA[i]);
  614.  
  615. Objects := tmpObjects;
  616. end;
  617.  
  618. procedure SetFalse(reason : string);
  619. begin
  620. WriteLn(reason);
  621. Players[CurrentPlayer].Active := False;
  622. end;
  623.  
  624. function K_FindObj(var x, y, vObj : Integer) : Boolean;
  625. var
  626. fObj : TObj;
  627. a, h : Integer;
  628. TPA : TPointArray;
  629. ATPA : T2DPointArray;
  630. tmpCTS : Integer;
  631. begin
  632. if(not(LoggedIn))then Exit;
  633. FindNormalRandoms;
  634.  
  635. fObj := GetObject(vObj);
  636.  
  637. tmpCTS := GetColorToleranceSpeed;
  638. ColorToleranceSpeed(2);
  639.  
  640. with fObj do
  641. begin
  642. SetColorSpeed2Modifiers(Hue, Sat);
  643.  
  644. FindColorsSpiralTolerance(MSCX, MSCY, TPA, Color, TB.X1, TB.Y1, TB.X2, TB.Y2, Tol);
  645. ATPA := TPAtoATPAEx(TPA, 20, 20);
  646. SortATPASize(ATPA,True);
  647.  
  648. H := High(ATPA);
  649. DebugThis(Name);
  650.  
  651. for a := 0 to H do
  652. begin
  653. MiddleTPAEx(atpa[a], X, Y);
  654.  
  655. DebugThis(tostr(Length(atpa[a])));
  656.  
  657. if((Length(atpa[a]) < Min) or (Length(atpa[a]) > Max))then
  658. Continue;
  659.  
  660. MMouse(X, Y, 5, 5);
  661.  
  662. if(WaitUpTextMulti(UpText, RandomRange(350,450)))then
  663. begin
  664. ClickMouse2(True);
  665.  
  666. if(DidRedClick)then
  667. begin
  668. ColorToleranceSpeed(tmpCTS);
  669. SetColorSpeed2Modifiers(0.2, 0.2);
  670.  
  671. Result := True;
  672. Exit;
  673. end;
  674. end else
  675. if(IsUptextMultiCustom(['esswraith', 'wraith', 'raith', 'Floating ess', 'Float', 'ing ess', 'Floating essence', 'lan vex', 'ead Clan', 'an vexillum', 'Read Clan vexillum']))then
  676. begin
  677. Clickmouse2(False);
  678.  
  679. if(WaitOptionMulti(UpText, 800))then
  680. begin
  681. ColorToleranceSpeed(tmpCTS);
  682. SetColorSpeed2Modifiers(0.2, 0.2);
  683.  
  684. Result := True;
  685. Exit;
  686. end;
  687. end;
  688. end;
  689. end;
  690.  
  691. ColorToleranceSpeed(tmpCTS);
  692. SetColorSpeed2Modifiers(0.2, 0.2);
  693. end;
  694.  
  695. Function FindObjectPlatform : Boolean;
  696. var
  697. CTS, I, L : Integer;
  698. TPA : TPointArray;
  699. ATPA : T2DPointArray;
  700. begin
  701. Result := False;
  702.  
  703. If SafeNub Then
  704. Begin
  705. TB := IntToBox(MSX1, MSY1, MSX2, MSY2);
  706. Result := True;
  707. Exit;
  708. End;
  709.  
  710. CTS := GetColorToleranceSpeed;
  711. ColorToleranceSpeed(2);
  712.  
  713. SetColorSpeed2Modifiers(IslandHue, IslandSat);
  714. FindColorsTolerance(TPA, IslandColor, MSX1, MSY1, MSX2, MSY2, IslandTol);
  715. ATPA := FloodFillTPA(TPA);
  716. SortATPASize(ATPA, True);
  717. ColorToleranceSpeed(CTS);
  718. SetColorSpeed2Modifiers(0.2, 0.2);
  719.  
  720. If Debug Then
  721. DebugATPABounds(ATPA);
  722.  
  723. If Length(TPA) < 1 then
  724. Exit;
  725.  
  726.  
  727. L := High(ATPA);
  728. For I := 0 To L do
  729. Begin
  730. TB:= GetTPABounds(ATPA[I]);
  731. If Not (PointInBox(Point(MSCX, MSCY), TB)) then
  732. begin
  733. if I = L then
  734. begin
  735. DebugThis('at high, point is not inside');
  736. exit;
  737. end else
  738. continue;
  739. end else break;
  740. end;
  741.  
  742. DebugThis(tostr(TB));
  743. Result := True;
  744. end;
  745.  
  746. function FindWizard: Boolean;
  747. var
  748. a, h : Integer;
  749. TPA : TPointArray;
  750. ATPA : T2DPointArray;
  751. tmpCTS : Integer;
  752. begin
  753. if(not(LoggedIn))then Exit;
  754. FindNormalRandoms;
  755.  
  756. tmpCTS := GetColorToleranceSpeed;
  757. ColorToleranceSpeed(2);
  758.  
  759. SetColorSpeed2Modifiers(0.05, 1.65);
  760.  
  761. FindColorsSpiralTolerance(MSCX, MSCY, TPA, 5357278, MSX1, MSY1, MSX2, MSY2, 18);
  762. ATPA := TPAtoATPAEx(TPA, 20, 20);
  763. SortATPASize(ATPA,True);
  764.  
  765. H := High(ATPA);
  766. DebugThis('Wizard');
  767.  
  768. for a := 0 to H do
  769. begin
  770. MiddleTPAEx(atpa[a], X, Y);
  771.  
  772. DebugThis(tostr(Length(atpa[a])));
  773.  
  774. if((Length(atpa[a]) < 100) Or (Length(atpa[a]) > 2000))then
  775. Continue;
  776.  
  777. MMouse(X, Y, 5, 5);
  778.  
  779. if(WaitUpTextMulti(['Wizard', 'zard', 'izard'], 750))then
  780. begin
  781. repeat
  782. InvMouse(RandomRange(2, 8), 3);
  783. until(WaitUpTextMulti(['rune', 'une'], RandomRange(1800, 2000)));
  784.  
  785. ClickMouse2(False);
  786.  
  787. if(not(WaitOptionMulti(['Use', 'Use ', 'se '],RandomRange(800, 900))))then
  788. Exit;
  789.  
  790. MMouse(X, Y, 5, 5);
  791.  
  792. if(WaitUpTextMulti(['Wizard', 'zard', 'izard'], 750))then
  793. begin
  794. ClickMouse2(True);
  795.  
  796. if(DidRedClick)then
  797. begin
  798. ColorToleranceSpeed(tmpCTS);
  799. SetColorSpeed2Modifiers(0.2, 0.2);
  800.  
  801. Result := True;
  802. MarkTime(TW);
  803. Exit;
  804. end;
  805. end;
  806. end;
  807. end;
  808.  
  809. ColorToleranceSpeed(tmpCTS);
  810. SetColorSpeed2Modifiers(0.2, 0.2);
  811. end;
  812.  
  813. procedure AntiBan();
  814. begin
  815. if(not(LoggedIn))then Exit;
  816. FindNormalRandoms;
  817.  
  818. case (Random(1000)) of
  819. 0 : RandomRClick;
  820. 1 : HoverSkill('random', False);
  821. 2 : ExamineInv;
  822. 3 : MouseSpeed := (RandomRange(10, 12));
  823. 4 : begin HoverSkill('Runecrafting', False); Wait(RandomRange(2000, 4000)); end;
  824. 5 : begin PickUpMouse; SleepAndMoveMouse(1500 + Random(500)); end;
  825. 6 : begin GameTab(tab_Stats); Wait(1500 + Random(500)); GameTab(tab_Inv); end;
  826. 7 .. 100 : Wait(RandomRange(750, 2000));
  827. 101: begin BoredHuman; SetAngle(SRL_ANGLE_HIGH); end;
  828. end;
  829. end;
  830.  
  831. function BreakHandler(BreakIn, BreakFor, randBreakIn, randBreakFor : Integer) : Boolean;
  832. var
  833. h, m, s : Integer;
  834. begin
  835. if not LoggedIn then Exit;
  836.  
  837. if (HowManyPlayers = 1) then
  838. begin
  839. if (GetTimeRunning < ((w) + (y) + BreakRounds)) then Exit
  840. else
  841. if (GetTimeRunning > ((w) + (y) + BreakRounds)) then
  842. begin
  843. RealBTime := ((x + z) / 60000);
  844. Logout;
  845. MarkTime(CurrentBTime);
  846. repeat
  847. Wait(21000);
  848. ConvertTime((x + z) - TimeFromMark(CurrentBTime), h, m, s);
  849. ClearDebug;
  850. until(TimeFromMark(CurrentBTime) > (x + z));
  851. if SwitchWorlds then
  852. if LoginPlayerToLob then
  853. ChangeWorld(RandomWorld(True, False))
  854. else
  855. LoginPlayer;
  856. Wait(4000);
  857. Result := LoggedIn;
  858. ClickNorth(SRL_ANGLE_HIGH);
  859. IncEx(BreakRounds, (w) + (x));
  860. w := (BreakIn * 60000);
  861. x := (BreakFor * 60000);
  862. y := RandomRange(-Bir * 60000, Bir * 60000);
  863. z := RandomRange(-Bfr * 60000, Bfr * 60000);
  864. end;
  865. end;
  866. end;
  867.  
  868. procedure Proggy;
  869. begin
  870. ClearDebug();
  871. Stats_Commit;
  872. XP := (GetXPBarTotal - StartXP);
  873. XPH:= Round(((XP) / (GetTimeRunning / 1000)) * 3600);
  874. Writeln('======== Kyle''s Esswraith Extractor =========');
  875. WriteLn('You are using Version ' + Version);
  876. Writeln('Time Running: ' + TimeRunning);
  877. Writeln('Experience Earned: ' + IntToStr(XP));
  878. Writeln('Experience/Hour: ' + IntToStr(XPH));
  879. Writeln('=============================================');
  880. MarkTime(TP);
  881. end;
  882.  
  883. Procedure GetMoreEssence;
  884. var
  885. a, h, t: Integer;
  886. TPA : TPointArray;
  887. ATPA : T2DPointArray;
  888. tmpCTS : Integer;
  889. begin
  890. if(not(LoggedIn))then Exit;
  891. FindNormalRandoms;
  892. MarkTime(T);
  893.  
  894. repeat
  895. if(not(LoggedIn))then Exit;
  896.  
  897. if(TimeFromMark(t) > 30000)then
  898. SetFalse('Failed to get more essence.');
  899.  
  900. tmpCTS := GetColorToleranceSpeed;
  901. ColorToleranceSpeed(2);
  902.  
  903. SetColorSpeed2Modifiers(0.47, 0.04);
  904.  
  905. FindColorsSpiralTolerance(MSCX, MSCY, TPA, 4013632, MSX1, MSY1, MSX2, MSY2, 15);
  906. ATPA := TPAtoATPAEx(TPA, 20, 20);
  907. SortATPASize(ATPA,True);
  908.  
  909. H := High(ATPA);
  910. DebugThis('Rocks');
  911.  
  912. for a := 0 to H do
  913. begin
  914. MiddleTPAEx(atpa[a], X, Y);
  915.  
  916. DebugThis(tostr(Length(atpa[a])));
  917.  
  918. if((Length(atpa[a]) < 50) Or (Length(atpa[a]) > 2000))then
  919. Continue;
  920.  
  921. MMouse(X, Y, 5, 5);
  922.  
  923. if(WaitUpTextMulti(['Collect', 'llect', 'Float'], 750))then
  924. begin
  925. ClickMouse2(True);
  926.  
  927. if(DidRedClick)then
  928. begin
  929. ColorToleranceSpeed(tmpCTS);
  930. SetColorSpeed2Modifiers(0.2, 0.2);
  931. Exit;
  932. end;
  933. end else
  934. if(not(IsUptextMultiCustom(['Walk', 'lk here', 'here'])))then
  935. begin
  936. Clickmouse2(False);
  937.  
  938. if(WaitOptionMulti(['Collect', 'llect', 'Float'], 800))then
  939. begin
  940. ColorToleranceSpeed(tmpCTS);
  941. SetColorSpeed2Modifiers(0.2, 0.2);
  942. Exit;
  943. end;
  944. end;
  945. end;
  946. ColorToleranceSpeed(tmpCTS);
  947. SetColorSpeed2Modifiers(0.2, 0.2);
  948. until FindDTM(EssenceDTM,X,Y,MIX1,MIY1,MIX2,MIY2);
  949. end;
  950.  
  951. procedure ScriptSetup();
  952. begin
  953. SetupObjects();
  954. FilterObjects();
  955. SortObjects();
  956.  
  957. SetAngle(SRL_ANGLE_HIGH);
  958. StartXP := GetXPBarTotal;
  959. RCLvl := GetSkillLevel(SKILL_RUNECRAFTING);
  960. Gametab(tab_Inv);
  961.  
  962. Higher := False;
  963. SafeNub:= False;
  964.  
  965. Case Floors Of
  966. 0 : SafeNub := True;
  967. 1 : Begin IslandHue := 0.19; IslandSat := 0.71; IslandColor := 3112315; IslandTol := 12; End;
  968. 2 : Begin IslandHue := 3.58; IslandSat := 0.43; IslandColor := 8224087; IslandTol := 14; End;
  969. 3 : Begin IslandHue := 0.12; IslandSat := 0.73; IslandColor := 9145506; IslandTol := 12; End;
  970. End;
  971. end;
  972.  
  973. procedure MainLoop();
  974. var
  975. fObj : TObj;
  976. x, y, i, InitialXP, UpdateXP, t: Integer;
  977. Label
  978. Waiting;
  979. begin
  980. repeat
  981. repeat
  982. if not loggedin then loginplayer;
  983. FindNormalRandoms;
  984.  
  985. if(TakeBreaks)then BreakHandler(BreakIn, BreakFor, Bir, Bfr);
  986.  
  987. if(TimeFromMark(TW) > 600000)then
  988. FindWizard;
  989.  
  990. if not WaitFindDTMEX(EssenceDTM, EX, EY, MIX1, MIY1, MIX2, MIY2, 100, 2000) then
  991. GetMoreEssence;
  992.  
  993. if(TimeFromMark(RCt) > (3600000 + RandomRange(-1800000, 1800000)))then
  994. begin
  995. RCLvl := GetSkillLevel(SKILL_RUNECRAFTING);
  996. MarkTime(RCt);
  997. end;
  998.  
  999. for i := 0 to High(Objects) do
  1000. begin
  1001. fObj := GetObject(i);
  1002.  
  1003. if(RCLvl >= fObj.LvlReq)then
  1004. begin
  1005. if(FindObjectPlatform)then
  1006. if(K_FindObj(x, y, i))then
  1007. begin
  1008. Waiting:
  1009.  
  1010. if(TimeFromMark(TP) > 60000)then
  1011. Proggy;
  1012.  
  1013. Wait(RandomRange(500, 750));
  1014. InitialXP := GetXPBarTotal;
  1015. CurrentXP := fObj.IXP;
  1016.  
  1017. MarkTime(T);
  1018. repeat
  1019. Wait(100);
  1020. if(FindNormalRandoms)then
  1021. begin
  1022. if(not(LoggedIn))then
  1023. SetFalse('Not Logged in');
  1024. SetAngle(SRL_ANGLE_HIGH);
  1025. MakeCompass('N');
  1026. end;
  1027. if(TimeFromMark(T) > RandomRange(7000, 7200))then
  1028. Break;
  1029.  
  1030. AntiBan;
  1031. for i := 0 to High(Objects) do
  1032. begin
  1033. fObj := GetObject(i);
  1034.  
  1035. if(RCLvl >= fObj.LvlReq) And (CurrentXP < fObj.IXP)then
  1036. if(FindObjectPlatform)then
  1037. if(K_FindObj(x, y, i))then
  1038. begin
  1039. Higher := True;
  1040. Break;
  1041. end;
  1042. end;
  1043.  
  1044. if(Higher)then
  1045. Break;
  1046.  
  1047. UpdateXP := GetXPBarTotal;
  1048.  
  1049. if(UpdateXP > InitialXP)then
  1050. begin
  1051. InitialXP := GetXPBarTotal;
  1052. T := 0;
  1053. MarkTime(T);
  1054. end;
  1055. until(False);
  1056.  
  1057. if(Higher)then
  1058. begin
  1059. Higher := False;
  1060. Goto Waiting;
  1061. end;
  1062. end;
  1063. end;
  1064. end;
  1065.  
  1066. if(FindNormalRandoms)then
  1067. begin
  1068. if(not(LoggedIn))then
  1069. SetFalse('Not Logged in');
  1070. SetAngle(SRL_ANGLE_HIGH);
  1071. MakeCompass('N');
  1072. end;
  1073. until(not(LoggedIn));
  1074.  
  1075. if(Players[CurrentPlayer].Active)then
  1076. SetFalse('Not Logged in');
  1077.  
  1078. NextPlayer(Players[CurrentPlayer].Active);
  1079. ScriptSetup();
  1080. until(AllPlayersInactive);
  1081. end;
  1082.  
  1083. begin
  1084. Smart_Server := 10;
  1085. Smart_Members := True;
  1086. Smart_Signed := True;
  1087.  
  1088. SetupSRL();
  1089. SetupSRLStats(1036, SRLStats_Username, SRLStats_Password);
  1090.  
  1091. {* Initial Break Settings *}
  1092. w := (BreakIn * 60000);
  1093. x := (BreakFor * 60000);
  1094. y := RandomRange(-Bir * 60000, Bir * 60000);
  1095. z := RandomRange(-Bfr * 60000, Bfr * 60000);
  1096.  
  1097. ActivateClient();
  1098. DeclarePlayers();
  1099. LoginPlayer();
  1100.  
  1101. while(not(RSReady()))do
  1102. Wait(9000);
  1103.  
  1104. AddOnTerminate('Fr33DTM');
  1105. SetDtm;
  1106.  
  1107. MarkTime(TP);
  1108. MarkTime(RCt);
  1109.  
  1110. ScriptSetup();
  1111.  
  1112. if(not(WaitFindDTMEX(EssenceDTM, EX, EY, MIX1, MIY1, MIX2, MIY2, 100, 2000)))then
  1113. GetMoreEssence;
  1114.  
  1115. MainLoop;
  1116. end
Advertisement
Add Comment
Please, Sign In to add comment