Advertisement
Guest User

Untitled

a guest
Jan 21st, 2016
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.83 KB | None | 0 0
  1. program RSPSPK_East_Ragger;
  2. {$i srl/srl.simba}
  3.  
  4. //works for rsps pk
  5. //use this inv setup : http://prntscr.com/99zbh5
  6. //make sure you are wearing glory
  7.  
  8. var
  9. x, y, count, water:integer;
  10. target, status: String;
  11.  
  12. const
  13. USERNAME = 'parabot';
  14. PASSWORD = '';
  15.  
  16. procedure proggy;
  17. begin
  18. cleardebug;
  19. writeln('Oral Time ~~ RSPS PK Rag bot');
  20. writeln(' Time Running: '+ MsToTime(GetTimeRunning,3))
  21. Writeln(' Status: ' + Status)
  22. exit;
  23. end;
  24.  
  25. function DebugTPA(Points: TPointArray; BmpName: string): Boolean;
  26. var
  27. Bmp: integer;
  28. Box : TBox;
  29. TempTPA : TPointArray;
  30. begin
  31. Box := GetTPABounds(Points);
  32. Bmp := BitmapFromClient(Box.x1,Box.y1,Box.x2,Box.y2);
  33. TempTPA := CopyTPA(Points);
  34. OffsetTPA(TempTPA,Point(-box.x1,-box.y1));
  35. DrawTPABitmap(Bmp,TempTPA,clRed);
  36. DisplayDebugImgWindow(box.x2-Box.x1 + 1, box.y2-box.y1 + 1);
  37. DrawBitmapDebugImg(Bmp);
  38. if bmpname <> '' then
  39. SaveBitmap(Bmp, ScriptPath + BmpName +'.bmp');
  40. FreeBitmap(Bmp);
  41. Result := True;
  42. end;
  43.  
  44. function rsps_getUpText:string;
  45. var
  46. blueTPA: tpointarray;
  47. blueATPA: t2dpointarray;
  48. begin
  49. FindColorsTolerance(blueTPA, 15067873, 0, 0, 286, 25, 100); //cant find capital letters
  50. if (length(blueTPA) > 1) then
  51. blueATPA := splitTPAEx(blueTPA, 1, 10);
  52. sortATPAFromFirstPointX(blueATPA, point(0, 0));
  53. result:= getTextATPA(blueATPA, 5, 'UpChars07');
  54. //DebugTPA(blueTPA, 'bmp');
  55. end;
  56.  
  57. Function rspsIsUpTextMultiCustom(Text: TStringArray): Boolean;
  58. Var
  59. TheText: String;
  60. i, n: Integer;
  61. Begin
  62. TheText := rsps_getUpText;
  63. n := High(Text);
  64. For i := 0 to n do
  65. If (Pos(Text[i], TheText) > 0) then
  66. Begin
  67. Result := True;
  68. Exit;
  69. End;
  70. End;
  71.  
  72. Procedure MouseBox1(X1, Y1, X2, Y2: Integer; ClickType: Integer);
  73. Begin
  74. MMouse(RandomRange(X1,X2),RandomRange(Y1,Y2),0,0);
  75. ClickMouse2(ClickType);
  76. Wait(RandomRange(37,50));
  77. End;
  78.  
  79. Function rsps_GameTab(TabNumber:Integer): Boolean;
  80. Var
  81. X,Y:Integer;
  82. Begin
  83. Result:=False;
  84. If (Not FindColorTolerance(X,Y,13758452,600,175,620,197,16)) Then
  85. Exit;
  86. Case TabNumber Of
  87. 1:Begin
  88. If (Not FindColorTolerance(X,Y,1910383,535,172,540,176,13)) Then
  89. MouseBox1(533,174,552,197, mouse_left);
  90. End;
  91. 2:Begin
  92. If (Not FindColorTolerance(X,Y,1910383,564,172,571,176,13)) Then
  93. MouseBox1(563,171,590,197, mouse_left);
  94. End;
  95. 3:Begin
  96. If (Not FindColorTolerance(X,Y,1910383,596,172,600,176,13)) Then
  97. MouseBox1(597,171,622,197, mouse_left);
  98. End;
  99. 4:Begin
  100. If (Not FindColorTolerance(X,Y,1910383,630,172,635,176,13)) Then
  101. MouseBox1(629,171,655,197, mouse_left);
  102. End;
  103. 5:Begin
  104. If (Not FindColorTolerance(X,Y,1910383,663,172,670,176,13)) Then
  105. MouseBox1(662,171,688,197, mouse_left);
  106. End;
  107. 6:Begin
  108. If (Not FindColorTolerance(X,Y,1910383,727,172,735,176,13)) Then
  109. MouseBox1(695,171,719,197, mouse_left);
  110. End;
  111. 7:Begin
  112. If (Not FindColorTolerance(X,Y,1910383,730,173,734,180,13)) Then
  113. MouseBox1(729,175,752,197, mouse_left);
  114. End;
  115. 8:Begin
  116. If (Not FindColorTolerance(X,Y,1910383,525,469,534,473,13)) Then
  117. MouseBox1(529,469,554,490, mouse_left);
  118. End;
  119. 9:Begin
  120. If (Not FindColorTolerance(X,Y,1910383,563,469,570,473,13)) Then
  121. MouseBox1(564,469,587,495, mouse_left);
  122. End;
  123. 10:Begin
  124. If (Not FindColorTolerance(X,Y,1910383,596,469,602,473,13)) Then
  125. MouseBox1(597,469,620,495, mouse_left);
  126. End;
  127. 11:Begin
  128. If (Not FindColorTolerance(X,Y,1910383,629,469,634,473,13)) Then
  129. MouseBox1(630,469,655,495, mouse_left);
  130. End;
  131. 12:Begin
  132. If (Not FindColorTolerance(X,Y,1910383,662,469,669,473,13)) Then
  133. MouseBox1(662,469,688,495, mouse_left);
  134. End;
  135. 13:Begin
  136. If (Not FindColorTolerance(X,Y,1910383,695,469,700,473,13)) Then
  137. MouseBox1(697,469,720,495, mouse_left);
  138. End;
  139. 14:Begin
  140. If (Not FindColorTolerance(X,Y,1910383,728,469,733,473,13)) Then
  141. MouseBox1(729,469,752,490, mouse_left);
  142. End;
  143. End;
  144. Result:=True;
  145. End;
  146. Function rsps_prayercheck(): Boolean;
  147. Var
  148. X,Y:Integer;
  149. Begin
  150. rsps_gametab(6);
  151. Begin
  152. Status := 'Checking Prayer';
  153. proggy;
  154. If (Not FindColorTolerance(X,Y,7451338,548,288,580,319,13)) Then
  155. MouseBox1(562,299,572,307, mouse_left);
  156. wait(200);
  157. If (Not FindColorTolerance(X,Y,7451338,663,326,693,355,13)) Then
  158. MouseBox1(672,333,684,345, mouse_left);
  159. End;
  160. Result:=True;
  161. rsps_gametab(4);
  162. end;
  163.  
  164. procedure AntiDscim;
  165. var
  166. x, y: Integer;
  167. begin
  168. begin
  169. if FindBlackChatMessage('ured') then
  170. begin
  171. Status := ('We were d scimmed');
  172. proggy;
  173. wait(4000);
  174. rsps_prayercheck();
  175. end else
  176. exit;
  177. end;
  178. end;
  179.  
  180. procedure UserPrompt;
  181. begin
  182. (InputQuery('OralsRagBot.Exe ', 'Type in your rags (case sensitive): ', target));
  183. end;
  184.  
  185. function IsLoggedIn: boolean;
  186. begin
  187. if not findcolortolerance(x, y, 4110568, 437, 469, 445, 479, 20) then
  188. begin
  189. result := true
  190. end else
  191. begin
  192. result := false
  193. end;
  194. end;
  195. procedure setmeup;
  196. begin
  197. Status := ('Setting up');
  198. proggy;
  199. sleep(500);
  200. rsps_prayercheck();
  201. sleep(500);
  202. MouseBox1(555,15,568,24, mouse_left);
  203. count := 0
  204. repeat
  205. inc(count);
  206. presskey(38);
  207. until count > 25;
  208. end;
  209. procedure login;
  210. begin
  211. if (isloggedIn) then
  212. begin
  213. exit;
  214. end else
  215. begin
  216. wait(200);
  217. movemouse(327, 256);
  218. Status := 'Entering Username';
  219. proggy;
  220. Wait(100);
  221. clickmouse(x, y, mouse_left);
  222. count := 0;
  223. repeat
  224. Inc(count);
  225. PressKey(VK_Back);
  226. until count > 25;
  227. Wait(250);
  228. SendKeys(USERNAME, 0, 0);
  229. wait(1000);
  230. movemouse(327, 272);
  231. Status := 'Entering Username';
  232. proggy;
  233. Wait(100);
  234. count := 0;
  235. clickmouse(x, y, mouse_left);
  236. repeat
  237. Inc(count);
  238. PressKey(VK_Back);
  239. until count > 25;
  240. Wait(250);
  241. SendKeys(PASSWORD, 0, 0);
  242. Status := ('logging in');
  243. proggy;
  244. Wait(1000);
  245. movemouse(300, 320);
  246. Wait(200);
  247. ClickMouse(x, y, mouse_left);
  248. Wait(4000);
  249. setmeup;
  250. end;
  251. end;
  252.  
  253. function get_wildlevel:string;
  254. var
  255. blueTPA: tpointarray;
  256. blueATPA: t2dpointarray;
  257. begin
  258. FindColorsTolerance(blueTPA, 65535, 253, 307, 473, 325, 60);
  259. if (length(blueTPA) > 1) then
  260. blueATPA := splitTPAEx(blueTPA, 1, 10);
  261. sortATPAFromFirstPointX(blueATPA, point(0, 0));
  262. result:= getTextATPA(blueATPA, 5, 'UpChars07');
  263. //DebugTPA(blueTPA, 'bmp');
  264. end;
  265.  
  266. Function Wild_level(Text: TStringArray): Boolean;
  267. Var
  268. TheText: String;
  269. i, n: Integer;
  270. Begin
  271. TheText := get_wildlevel;
  272. n := High(Text);
  273. For i := 0 to n do
  274. If (Pos(Text[i], TheText) > 0) then
  275. Begin
  276. Result := True;
  277. Exit;
  278. End;
  279. End;
  280.  
  281. Procedure actHuman;
  282. Begin
  283. case random(1000) of
  284. 0..400: exit;
  285. 401..900: MouseBox1(628,82,640,92, mouse_left);
  286. 901..1000: MouseBox1(624,82,638,90, mouse_left);
  287. End;
  288. End;
  289.  
  290. function inWild: boolean;
  291. begin
  292. water := DTMFromString('mWAAAAHicY2FgYAhnYmAIhuJIIC4CihUAcS4UczjcZyhof86wf/9+MJYEiiFjRjQMAgAsxQsG');
  293.  
  294. if not findDTM(water, x, y, 537, 0, 726, 165) then
  295.  
  296. begin
  297. result := true
  298. //writeln('we are in wild')
  299. end
  300. else
  301. begin
  302. result := false
  303. //writeln('we are not in the wild')
  304. wait(randomrange(500, 4000));
  305. rsps_gametab(3);
  306. wait(200)
  307. MouseBox1(577,420,587,424, mouse_left);
  308. wait(500)
  309. rsps_prayercheck();
  310. wait(50)
  311. Status := 'Teleporting to easts';
  312. proggy;
  313. typesend('::restore');
  314. wait(300);
  315. typesend('::easts');
  316. wait(randomrange(5000,9000));
  317. acthuman;
  318. // case random(0, 4) of
  319. // 0..2:
  320. //MouseBox1(621,87,642,103, mouse_left);
  321. // //2..4: begin end;
  322. //end;
  323. end;
  324. freedtm(water);
  325. end;
  326.  
  327. procedure teleport;
  328. var
  329. x, y, glory:integer;
  330. begin
  331. Status := 'Teleporting to edge';
  332. proggy;
  333. glory := DTMFromString('mWAAAAHicY2FgYGhkYmCogeIOIBZmZGBgAWJRIOYE4nTeNoYrZ88yXLogxXDr6lUGSaAeZMyIhkEAAAuLClc=');
  334. presskey(113)
  335. wait(25)
  336. presskey(113)
  337. wait(10);
  338. if FindDTM(glory, x, y, 548, 206, 730, 461) then
  339. begin
  340. Wait(100)
  341. MMouse(x, y, 0, 0);
  342. clickmouse(x, y, mouse_right);
  343. Wait(300);
  344. movemouse(x, y+43)
  345. wait(50);
  346. clickmouse(x, y, mouse_left);
  347. wait(1000);
  348. mousebox1(235, 377, 283, 385, mouse_left);
  349. wait(4000);
  350. inwild();
  351. end;
  352. freedtm(glory);
  353. end;
  354.  
  355. procedure runnorth;
  356. begin
  357. Status := 'Running North';
  358. proggy;
  359. mmouse(626, 55, 4, 4) //for lvl 17
  360. //mmouse(626, 65, 4, 4)
  361. wait(10);
  362. clickmouse(x, y, mouse_left);
  363. end;
  364. procedure runsouth;
  365. begin
  366. Status := 'Running South';
  367. proggy;
  368. mmouse(627, 97, 4, 4)
  369. wait(10);
  370. clickmouse(x, y, mouse_left);
  371. end;
  372. procedure runwest;
  373. begin
  374. Status := 'Running West';
  375. proggy;
  376. mmouse(585, 84, 5, 5)
  377. wait(10);
  378. clickmouse(x, y, mouse_left);
  379. end;
  380. procedure runeast;
  381. begin
  382. Status := 'Running East';
  383. proggy;
  384. mmouse(646, 84, 4, 4)
  385. wait(10);
  386. clickmouse(x, y, mouse_left);
  387. end;
  388. procedure ss_MMToMSPoint(var X, Y : Integer);
  389. var
  390. x1, y1 : Integer;
  391. begin
  392. x1 := X;
  393. y1 := X;
  394.  
  395. X := Round((X-625)*255/25) + 262;
  396. Y := Round((Y-87)*176/28) + 173;
  397.  
  398. if X < 3 then X := 3;
  399. if Y < 3 then Y := 3;
  400. if X > 516 then X := 516;
  401. if Y > 338 then Y := 338;;
  402. end;
  403.  
  404. procedure wildcheck;
  405. begin
  406. If (wild_level(['18'])) or
  407. (wild_level(['17'])) or
  408. (wild_level(['16'])) or
  409. (wild_level(['15'])) or
  410. (wild_level(['14'])) then
  411. RunNorth();
  412. if (wild_level(['20'])) or
  413. (wild_level(['21'])) or
  414. (wild_level(['22'])) or
  415. (wild_level(['23'])) or
  416. (wild_level(['24'])) then
  417. RunSouth();
  418. If findcolortolerance(x, y,10189928, 647, 104, 666, 157, 25) then
  419. RunWest();
  420. If findcolortolerance(x, y,5007472, 607, 18, 617, 118, 10) or
  421. findcolortolerance(x, y,1883881, 610, 121, 629, 146, 10) then
  422. RunEast();
  423. end;
  424. procedure AntiLure;
  425. begin
  426. //while IsMoving do wildcheck;
  427. wildcheck;
  428. end;
  429.  
  430. procedure Attack;
  431. Var
  432. TPAA: T2DPointArray;
  433. TPA: TPointArray;
  434. CTS, I: Integer;
  435. Begin
  436. //if findcolortolerance(x, y, 52611, 258, 127, 267, 145, 40) then
  437. //exit;
  438. //wait(100);
  439. antilure;
  440. CTS := GetColorToleranceSpeed;
  441. ColorToleranceSpeed(2);
  442. setcolorspeed2modifiers(0.21, 1.01);
  443. if FindColorsSpiralTolerance(626, 86, TPA, 517888, 606, 67, 656, 103, 25) then
  444. begin
  445. ColorToleranceSpeed(CTS);
  446. TPAA := TPAToATPAEx(TPA, 3, 1); //Put the Width and Heigh here
  447. SortATPASize(TPAA, True);
  448. For I := 0 To High(TPAA) Do
  449. If GetArraylength(TPAA[i]) > 2 Then // Set How Much Points you need for your function to take Ation
  450. if MiddleTPAEx(TPAA[i], x, y) then
  451. Begin
  452. ss_MMToMSPoint(x, y);
  453. mmouse(x,y,1,1)
  454. Status := 'looking for ' + toStr(TARGET);
  455. proggy;
  456. wait(20)
  457. if (rspsIsUpTextMultiCustom([TARGET])) then
  458. begin
  459. clickmouse(x, y, mouse_left);
  460. Status := 'Attacking '+ toStr(TARGET);
  461. proggy;
  462. wait(100);
  463. antilure;
  464. wait(2000);
  465. end else
  466. exit;
  467. end else
  468. exit;
  469. end;
  470. end;
  471.  
  472. function fighting: boolean;
  473. begin
  474. if findcolortolerance(x, y, 37890, 17, 36, 20, 46, 20) or
  475. findcolortolerance(x, y, 1579112, 17, 36, 20, 46, 20) then
  476. begin
  477. result := true
  478. Status := 'In a fight';
  479. proggy;
  480. end
  481. else
  482. begin
  483. result := false
  484. Status := 'Idling';
  485. proggy;
  486. attack();
  487. proggy;
  488. end;
  489. end;
  490.  
  491. procedure heal;
  492. var
  493. karambwan, x, y:integer;
  494. begin
  495. rsps_gametab(4);
  496. karambwan:= DTMFromString('mWAAAAHicY2FgYJjOxMDQD8QTgXgeEBcyMjBUAnEBEBcDcVagNUNLTiTD1KoUhmUdBQwiQD3ImBENgwAAH7sJ1w==');
  497. if FindDTM(karambwan, x, y, 547, 205, 730, 461) then
  498. begin
  499. AntiLure;
  500. inwild();
  501. Wait (25 + random(25));
  502. Status := 'Eating karambwan';
  503. proggy;
  504. MMouse(x, y, 1, 1);
  505. Mouse(x, y, 1, 1, true);
  506. freeDTM(karambwan);
  507. end else
  508. teleport;
  509. //ToBank;
  510. //Bank;
  511. end;
  512.  
  513. function Restore: Boolean;
  514. var
  515. x, y, i: Integer;
  516. potDTMs: TIntegerarray;
  517. begin
  518. potDTMs := [
  519. DTMFromString('mQwAAAHicY2ZgYJjOxMAwBYhnAbEwIwMDNxRPMY1hKCsrZ/DzD2GQBKqDYUYkDAQA8OUFwg=='),
  520. DTMFromString('mWAAAAHicY2FgYDjIxMCwG4iPMEHYvIwMDAJALAzE7EC8wjaDYZtTIcM0s1iGPS5lDEZAPciYEQ2DAAAFBQlq'), //4dose
  521. DTMFromString('mWAAAAHicY2FgYHBhYmCwA2J3IHYCYkNGBgZTIDYHYk0gXmydyrDJIZ9hmlksQ1VVNYMkUA8yZkTDIAAAfjQHhg=='), //3dose
  522. DTMFromString('mWAAAAHicY2FgYMhhYmBIB+JiIM4DYmNGBgZTIDYHYh0g3mCfy7DJIZ+hQc+fISEhhcEIqAcZM6JhEAAAsKAIOg=='), //2dose
  523. DTMFromString('mQwAAAHicY2ZgYJjOxMAwBYhnAbEwIwMDNxRPMY1hKCsrZ/DzD2GQBKqDYUYkDAQA8OUFwg==') //1dose
  524.  
  525. ];
  526. rsps_gametab(4);
  527. for i := 0 to High(potDTMs) do
  528. if FindDTM(potDTMs[i], x, y, 548, 206, 730, 461) then
  529. begin
  530. AntiLure;
  531. inwild();
  532. Wait(600)
  533. Status := 'Restoring';
  534. proggy;
  535. //WriteLn('Drinking 1 dose restore');
  536. MMouse(x, y, 2, 2);
  537. clickmouse(x, y, mouse_left);
  538. Wait(400);
  539. Result := True;
  540. for i := 0 to high(potDTMs) do
  541. FreeDTM(potDTMs[i]);
  542. exit;
  543. end else
  544. teleport;
  545. end;
  546.  
  547. function Brew: Boolean;
  548. var
  549. x, y, i: Integer;
  550. potDTMs: TIntegerArray;
  551. begin
  552. //else
  553. potDTMs := [
  554. DTMFromString('mWAAAAHicY2FgYHBmYmCwBWJ3IHYC4hdAsTdQ/ACIjx91Yzh9Kp5h43p7hrq6OgZJoBgyZkTDIAAAexoL/Q=='),
  555. DTMFromString('mWAAAAHicY2FgYMhjYmDIAuIiJgj7JVDsLRC/A+JHQHz8qBvD6ZMRDJs32jMUFBQxSALFkDEjGgYBAKr5DIY='),
  556. DTMFromString('mWAAAAHicY2FgYJjBxMAwAYjnAfF0IH4FFHsHxfeB+NoVH4bTJyMYFi60ZNi7dy+DJFAMGTOiYRAAAAB6Dgs='),
  557. DTMFromString('mWAAAAHicY2FgYDjIxMCwF4iPAfF+IH4KFHsDxG+B+BEQl5WVMRw74gbGdXV1DJJAMWTMiIZBAAAALQ2U')
  558. ];
  559. rsps_gametab(4);
  560. for i := 0 to High(potDTMs) do
  561. if FindDTM(potDTMs[i], x, y, 548, 206, 730, 461) then
  562. begin
  563. AntiLure;
  564. inwild;
  565. heal;
  566. Status := 'Brewing';
  567. proggy;
  568. MMouse(x, y, 2, 2);
  569. clickmouse(x, y, mouse_left);
  570. wait(1200);
  571. begin
  572. for i := 0 to high(potDTMs) do
  573. FreeDTM(potDTMs[i]);
  574. restore;
  575. wait(1000)
  576. break;
  577. end;
  578. end else
  579. teleport;
  580. end;
  581.  
  582. function Lowish_HP(): Boolean;
  583. var
  584. x, y, i: Integer;
  585. colours: TIntegerArray;
  586. begin
  587. colours := [2109237]
  588.  
  589. for i := 0 to High(colours) do
  590. begin
  591. antiDscim();
  592. if FindColorTolerance(x, y, colours[i], 554, 52, 559, 53, 20) then
  593. begin
  594. //WriteLn('Health Point is low');
  595. Brew();
  596. Result := True
  597. end else
  598. // WriteLn('Health point not low');
  599. end;
  600. end;
  601.  
  602. function Lowish_Prayer: Boolean;
  603. var
  604. x, y, i: Integer;
  605. colours1: TIntegerArray;
  606. begin
  607. colours1 := [3426899]
  608.  
  609. for i := 0 to High(colours1) do
  610. begin
  611. if FindColorTolerance(x, y, colours1[i], 558, 100, 562, 108, 20) then
  612. begin
  613. //WriteLn('Prayer Point is low');
  614. Restore();
  615. Result := True
  616. end else
  617. // WriteLn('Prayer point not low');
  618. end;
  619. end;
  620.  
  621. begin
  622. UserPrompt;
  623. setupsrl;
  624. mouseresetclientarea;
  625. imageresetclientarea;
  626. login;
  627. setmeup;
  628. repeat
  629. login();
  630. antiDscim();
  631. Lowish_HP();
  632. Lowish_Prayer();
  633. Antilure();
  634. inwild();
  635. //fighting();
  636. until (false);
  637. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement