Advertisement
Guest User

Untitled

a guest
Feb 18th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.25 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 **update** replace karambwans with sharks and sanfew serums with super restores
  6. //make sure you are wearing glory
  7.  
  8. var
  9. x, y, count, slay, alter, red:integer;
  10. target, status: String;
  11.  
  12. const
  13. USERNAME = '';
  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_gametab(1);
  201. If (Not FindColorTolerance(X,Y,2303647,609,381,637,391,20)) Then
  202. begin
  203. wait(250);
  204. MouseBox1(589,362,695,389, mouse_left);
  205. wait(250);
  206. end;
  207. rsps_prayercheck();
  208. sleep(500);
  209. MouseBox1(555,15,568,24, mouse_left);
  210. count := 0
  211. repeat
  212. inc(count);
  213. presskey(38);
  214. until count > 25;
  215. end;
  216. procedure login;
  217. begin
  218. if (isloggedIn) then
  219. begin
  220. exit;
  221. end else
  222. begin
  223. wait(200);
  224. movemouse(327, 256);
  225. Status := 'Entering Username';
  226. proggy;
  227. Wait(100);
  228. clickmouse(x, y, mouse_left);
  229. count := 0;
  230. repeat
  231. Inc(count);
  232. PressKey(VK_Back);
  233. until count > 25;
  234. Wait(250);
  235. SendKeys(USERNAME, 0, 0);
  236. wait(1000);
  237. movemouse(327, 272);
  238. Status := 'Entering Username';
  239. proggy;
  240. Wait(100);
  241. count := 0;
  242. clickmouse(x, y, mouse_left);
  243. repeat
  244. Inc(count);
  245. PressKey(VK_Back);
  246. until count > 25;
  247. Wait(250);
  248. SendKeys(PASSWORD, 0, 0);
  249. Status := ('logging in');
  250. proggy;
  251. Wait(1000);
  252. movemouse(300, 320);
  253. Wait(200);
  254. ClickMouse(x, y, mouse_left);
  255. Wait(4000);
  256. setmeup;
  257. end;
  258. end;
  259.  
  260. function get_wildlevel:string;
  261. var
  262. blueTPA: tpointarray;
  263. blueATPA: t2dpointarray;
  264. begin
  265. FindColorsTolerance(blueTPA, 65535, 253, 307, 473, 325, 60);
  266. if (length(blueTPA) > 1) then
  267. blueATPA := splitTPAEx(blueTPA, 1, 10);
  268. sortATPAFromFirstPointX(blueATPA, point(0, 0));
  269. result:= getTextATPA(blueATPA, 5, 'UpChars07');
  270. //DebugTPA(blueTPA, 'bmp');
  271. end;
  272.  
  273. Function Wild_level(Text: TStringArray): Boolean;
  274. Var
  275. TheText: String;
  276. i, n: Integer;
  277. Begin
  278. TheText := get_wildlevel;
  279. n := High(Text);
  280. For i := 0 to n do
  281. If (Pos(Text[i], TheText) > 0) then
  282. Begin
  283. Result := True;
  284. Exit;
  285. End;
  286. End;
  287.  
  288. Procedure actHuman;
  289. Begin
  290. case random(1000) of
  291. 0..250: exit;
  292. 251..900: MouseBox1(619,82,640,95, mouse_left);
  293. 901..1000: MouseBox1(624,82,638,90, mouse_left);
  294. End;
  295. End;
  296.  
  297. function inWild: boolean;
  298. begin
  299. red := DTMFromString('mQwAAAHicY2ZgYOhlYmDoA+IJQOwH5AcBsS8Qvze3B5KMYJoLyIJhRiQMBADzdAWO');
  300. slay := DTMFromString('mQwAAAHicY2ZgYPBjYmAIBGJvIPYF8oOAOACIf/yfy/DlTxGY5gLyYZgRCQMBAGilCY4=');
  301. alter := DTMFromString('mQwAAAHicY2ZgYKhmYmAoB+JKILZjgGBHIJ4/fz7D339cDP///GHgAvJhmBEJAwEAYQIJLA==');
  302.  
  303. if not findDTM(slay, x, y, 550, 2, 731, 163) or
  304. not findDTM(alter, x, y, 550, 2, 731, 163) or
  305. not findDTM(red, x, y, 550, 2, 731, 163)then
  306.  
  307. begin
  308. result := true
  309. //writeln('we are in wild')
  310. end
  311. else
  312. begin
  313. result := false
  314. //writeln('we are not in the wild')
  315. wait(randomrange(500, 4000));
  316. rsps_gametab(3);
  317. wait(200)
  318. MouseBox1(577,420,587,424, mouse_left);
  319. wait(500)
  320. rsps_prayercheck();
  321. wait(50)
  322. Status := 'Teleporting to easts';
  323. proggy;
  324. typesend('::restore');
  325. wait(300);
  326. typesend('::easts');
  327. wait(randomrange(5000,9000));
  328. acthuman;
  329. end;
  330. freedtm(slay);
  331. freedtm(red);
  332. freedtm(alter);
  333. end;
  334.  
  335. procedure teleport;
  336. var
  337. x, y, glory:integer;
  338. begin
  339. Status := 'Teleporting to edge';
  340. proggy;
  341. glory := DTMFromString('mWAAAAHicY2FgYGhkYmCogeIOIBZmZGBgAWJRIOYE4nTeNoYrZ88yXLogxXDr6lUGSaAeZMyIhkEAAAuLClc=');
  342. presskey(113)
  343. wait(25)
  344. presskey(113)
  345. wait(10);
  346. if FindDTM(glory, x, y, 548, 206, 730, 461) then
  347. begin
  348. Wait(100)
  349. MMouse(x, y, 0, 0);
  350. clickmouse(x, y, mouse_right);
  351. Wait(300);
  352. movemouse(x, y+43)
  353. wait(50);
  354. clickmouse(x, y, mouse_left);
  355. wait(1000);
  356. mousebox1(235, 377, 283, 385, mouse_left);
  357. wait(4000);
  358. inwild();
  359. end;
  360. freedtm(glory);
  361. end;
  362.  
  363. procedure runnorth;
  364. begin
  365. Status := 'Running North';
  366. proggy;
  367. mmouse(626, 62, 4, 4) //for lvl 17
  368. //mmouse(626, 65, 4, 4)
  369. wait(10);
  370. clickmouse(x, y, mouse_left);
  371. end;
  372. procedure runsouth;
  373. begin
  374. Status := 'Running South';
  375. proggy;
  376. mmouse(627, 97, 4, 4)
  377. wait(10);
  378. clickmouse(x, y, mouse_left);
  379. end;
  380. procedure runwest;
  381. begin
  382. Status := 'Running West';
  383. proggy;
  384. mmouse(585, 84, 5, 5)
  385. wait(10);
  386. clickmouse(x, y, mouse_left);
  387. end;
  388. procedure runeast;
  389. begin
  390. Status := 'Running East';
  391. proggy;
  392. mmouse(646, 84, 4, 4)
  393. wait(10);
  394. clickmouse(x, y, mouse_left);
  395. end;
  396. procedure ss_MMToMSPoint(var X, Y : Integer);
  397. var
  398. x1, y1 : Integer;
  399. begin
  400. x1 := X;
  401. y1 := X;
  402.  
  403. X := Round((X-625)*255/25) + 262;
  404. Y := Round((Y-87)*176/28) + 173;
  405.  
  406. if X < 3 then X := 3;
  407. if Y < 3 then Y := 3;
  408. if X > 516 then X := 516;
  409. if Y > 338 then Y := 338;
  410. end;
  411.  
  412. procedure wildcheck;
  413. begin
  414. If (wild_level(['18'])) or
  415. (wild_level(['17'])) or
  416. (wild_level(['16'])) or
  417. (wild_level(['15'])) or
  418. (wild_level(['14'])) then
  419. RunNorth();
  420. if (wild_level(['20'])) or
  421. (wild_level(['21'])) or
  422. (wild_level(['22'])) or
  423. (wild_level(['23'])) or
  424. (wild_level(['24'])) then
  425. RunSouth();
  426. If findcolortolerance(x, y,10189928, 647, 104, 666, 157, 25) then
  427. RunWest();
  428. If findcolortolerance(x, y,5007472, 607, 18, 617, 118, 10) or
  429. findcolortolerance(x, y,1883881, 610, 121, 629, 146, 10) then
  430. RunEast();
  431. end;
  432. procedure AntiLure;
  433. begin
  434. inwild();
  435. wildcheck;
  436. end;
  437.  
  438. procedure Attack;
  439. Var
  440. TPAA: T2DPointArray;
  441. TPA: TPointArray;
  442. CTS, I, t: Integer;
  443. Begin
  444. CTS := GetColorToleranceSpeed;
  445. ColorToleranceSpeed(2);
  446. setcolorspeed2modifiers(0.21, 1.01);
  447. if FindColorsSpiralTolerance(626, 86, TPA, 517888, 606, 67, 656, 103, 25) then
  448. begin
  449. ColorToleranceSpeed(CTS);
  450. TPAA := TPAToATPAEx(TPA, 3, 1); //Put the Width and Heigh here
  451. SortATPASize(TPAA, True);
  452. For I := 0 To High(TPAA) Do
  453. If GetArraylength(TPAA[i]) > 2 Then // Set How Much Points you need for your function to take Ation
  454. if MiddleTPAEx(TPAA[i], x, y) then
  455. Begin
  456. ss_MMToMSPoint(x, y);
  457. mmouse(x,y,1,1)
  458. Status := 'looking for ' + toStr(TARGET);
  459. proggy;
  460. wait(20)
  461. if (rspsIsUpTextMultiCustom([TARGET])) then
  462. begin
  463. clickmouse(x, y, mouse_left);
  464. Status := 'Attacking '+ toStr(TARGET);
  465. proggy;
  466. t:=0;
  467. MarkTime(t);
  468. while TimeFromMark(t) < 2000 do
  469. begin
  470. antilure;
  471. wait(10)
  472. end;
  473. end else
  474. exit;
  475. end else
  476. exit;
  477. end;
  478. end;
  479.  
  480. function fighting: boolean;
  481. begin
  482. if findcolortolerance(x, y, 37890, 17, 36, 20, 46, 20) or
  483. findcolortolerance(x, y, 1579112, 17, 36, 20, 46, 20) then
  484. begin
  485. result := true
  486. Status := 'In a fight';
  487. proggy;
  488. end
  489. else
  490. begin
  491. result := false
  492. Status := 'Idling';
  493. proggy;
  494. attack();
  495. proggy;
  496. end;
  497. end;
  498.  
  499. procedure heal;
  500. var
  501. karambwan, x, y:integer;
  502. begin
  503. rsps_gametab(4);
  504. karambwan:= DTMFromString('mbQAAAHicY2VgYJjKxMDQD8WzgXg+EHsxMjD4AXEoEHsAcQgQz6xNY5hSlcLQnB3B0JgZzrBlciUDF1A/OmbEgsEAADP/C/c=');
  505. if FindDTM(karambwan, x, y, 547, 205, 730, 461) then
  506. begin
  507. AntiLure;
  508. inwild();
  509. Wait (25 + random(25));
  510. Status := 'Eating Shark';
  511. proggy;
  512. MMouse(x, y, 1, 1);
  513. Mouse(x, y, 1, 1, true);
  514. freeDTM(karambwan);
  515. end else
  516. teleport;
  517. //ToBank;
  518. //Bank;
  519. end;
  520.  
  521. function Restore: Boolean;
  522. var
  523. x, y, i: Integer;
  524. potDTMs: TIntegerarray;
  525. begin
  526. potDTMs := [
  527. DTMFromString('mQwAAAHicY2ZgYJjOxMAwBYhnAbEwIwMDNxRPMY1hKCsrZ/DzD2GQBKqDYUYkDAQA8OUFwg=='),
  528. DTMFromString('mWAAAAHicY2FgYDjIxMCwG4iPMEHYvIwMDAJALAzE7EC8wjaDYZtTIcM0s1iGPS5lDEZAPciYEQ2DAAAFBQlq'), //4dose
  529. DTMFromString('mWAAAAHicY2FgYHBhYmCwA2J3IHYCYkNGBgZTIDYHYk0gXmydyrDJIZ9hmlksQ1VVNYMkUA8yZkTDIAAAfjQHhg=='), //3dose
  530. DTMFromString('mWAAAAHicY2FgYMhhYmBIB+JiIM4DYmNGBgZTIDYHYh0g3mCfy7DJIZ+hQc+fISEhhcEIqAcZM6JhEAAAsKAIOg=='), //2dose
  531. DTMFromString('mQwAAAHicY2ZgYJjOxMAwBYhnAbEwIwMDNxRPMY1hKCsrZ/DzD2GQBKqDYUYkDAQA8OUFwg==') //1dose
  532.  
  533. ];
  534. rsps_gametab(4);
  535. for i := 0 to High(potDTMs) do
  536. if FindDTM(potDTMs[i], x, y, 548, 206, 730, 461) then
  537. begin
  538. AntiLure;
  539. inwild();
  540. Wait(600)
  541. Status := 'Restoring';
  542. proggy;
  543. //WriteLn('Drinking 1 dose restore');
  544. MMouse(x, y, 2, 2);
  545. clickmouse(x, y, mouse_left);
  546. Wait(400);
  547. Result := True;
  548. for i := 0 to high(potDTMs) do
  549. FreeDTM(potDTMs[i]);
  550. exit;
  551. end else
  552. teleport;
  553. end;
  554.  
  555. function Brew: Boolean;
  556. var
  557. x, y, i: Integer;
  558. potDTMs: TIntegerArray;
  559. begin
  560. //else
  561. potDTMs := [
  562. DTMFromString('mWAAAAHicY2FgYHBmYmCwBWJ3IHYC4hdAsTdQ/ACIjx91Yzh9Kp5h43p7hrq6OgZJoBgyZkTDIAAAexoL/Q=='),
  563. DTMFromString('mWAAAAHicY2FgYMhjYmDIAuIiJgj7JVDsLRC/A+JHQHz8qBvD6ZMRDJs32jMUFBQxSALFkDEjGgYBAKr5DIY='),
  564. DTMFromString('mWAAAAHicY2FgYJjBxMAwAYjnAfF0IH4FFHsHxfeB+NoVH4bTJyMYFi60ZNi7dy+DJFAMGTOiYRAAAAB6Dgs='),
  565. DTMFromString('mWAAAAHicY2FgYDjIxMCwF4iPAfF+IH4KFHsDxG+B+BEQl5WVMRw74gbGdXV1DJJAMWTMiIZBAAAALQ2U')
  566. ];
  567. rsps_gametab(4);
  568. for i := 0 to High(potDTMs) do
  569. if FindDTM(potDTMs[i], x, y, 548, 206, 730, 461) then
  570. begin
  571. AntiLure;
  572. inwild;
  573. heal;
  574. Status := 'Brewing';
  575. proggy;
  576. MMouse(x, y, 2, 2);
  577. clickmouse(x, y, mouse_left);
  578. wait(1200);
  579. begin
  580. for i := 0 to high(potDTMs) do
  581. FreeDTM(potDTMs[i]);
  582. restore;
  583. wait(1000)
  584. break;
  585. end;
  586. end else
  587. teleport;
  588. end;
  589.  
  590. function Lowish_HP(): Boolean;
  591. var
  592. x, y, i: Integer;
  593. colours: TIntegerArray;
  594. begin
  595. colours := [1250067]
  596.  
  597. for i := 0 to High(colours) do
  598. begin
  599. antiDscim();
  600. if FindColorTolerance(x, y, colours[i], 550, 52, 559, 53, 20) then
  601. begin
  602. //WriteLn('Health Point is low');
  603. Brew();
  604. Result := True
  605. end else
  606. // WriteLn('Health point not low');
  607. end;
  608. end;
  609.  
  610. function Lowish_Prayer: Boolean;
  611. var
  612. x, y, i: Integer;
  613. colours1: TIntegerArray;
  614. begin
  615. colours1 := [1250067]
  616.  
  617. for i := 0 to High(colours1) do
  618. begin
  619. if FindColorTolerance(x, y, colours1[i], 544, 103, 547, 106, 12) then
  620. begin
  621. //WriteLn('Prayer Point is low');
  622. Restore();
  623. Result := True
  624. end else
  625. // WriteLn('Prayer point not low');
  626. end;
  627. end;
  628.  
  629. begin
  630. //UserPrompt;
  631. setupsrl;
  632. mouseresetclientarea;
  633. imageresetclientarea;
  634. login;
  635. setmeup;
  636. repeat
  637. login();
  638. antiDscim();
  639. Lowish_HP();
  640. Lowish_Prayer();
  641. Antilure();
  642. inwild();
  643. //fighting();
  644. until (false);
  645. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement