Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program RSPSPK_East_Ragger;
- {$i srl/srl.simba}
- //works for rsps pk
- //use this inv setup : http://prntscr.com/99zbh5 **update** replace karambwans with sharks and sanfew serums with super restores
- //make sure you are wearing glory
- var
- x, y, count, slay, alter, red:integer;
- target, status: String;
- const
- USERNAME = '';
- PASSWORD = '';
- procedure proggy;
- begin
- cleardebug;
- writeln('Oral Time ~~ RSPS PK Rag bot');
- writeln(' Time Running: '+ MsToTime(GetTimeRunning,3))
- Writeln(' Status: ' + Status)
- exit;
- end;
- function DebugTPA(Points: TPointArray; BmpName: string): Boolean;
- var
- Bmp: integer;
- Box : TBox;
- TempTPA : TPointArray;
- begin
- Box := GetTPABounds(Points);
- Bmp := BitmapFromClient(Box.x1,Box.y1,Box.x2,Box.y2);
- TempTPA := CopyTPA(Points);
- OffsetTPA(TempTPA,Point(-box.x1,-box.y1));
- DrawTPABitmap(Bmp,TempTPA,clRed);
- DisplayDebugImgWindow(box.x2-Box.x1 + 1, box.y2-box.y1 + 1);
- DrawBitmapDebugImg(Bmp);
- if bmpname <> '' then
- SaveBitmap(Bmp, ScriptPath + BmpName +'.bmp');
- FreeBitmap(Bmp);
- Result := True;
- end;
- function rsps_getUpText:string;
- var
- blueTPA: tpointarray;
- blueATPA: t2dpointarray;
- begin
- FindColorsTolerance(blueTPA, 15067873, 0, 0, 286, 25, 100); //cant find capital letters
- if (length(blueTPA) > 1) then
- blueATPA := splitTPAEx(blueTPA, 1, 10);
- sortATPAFromFirstPointX(blueATPA, point(0, 0));
- result:= getTextATPA(blueATPA, 5, 'UpChars07');
- //DebugTPA(blueTPA, 'bmp');
- end;
- Function rspsIsUpTextMultiCustom(Text: TStringArray): Boolean;
- Var
- TheText: String;
- i, n: Integer;
- Begin
- TheText := rsps_getUpText;
- n := High(Text);
- For i := 0 to n do
- If (Pos(Text[i], TheText) > 0) then
- Begin
- Result := True;
- Exit;
- End;
- End;
- Procedure MouseBox1(X1, Y1, X2, Y2: Integer; ClickType: Integer);
- Begin
- MMouse(RandomRange(X1,X2),RandomRange(Y1,Y2),0,0);
- ClickMouse2(ClickType);
- Wait(RandomRange(37,50));
- End;
- Function rsps_GameTab(TabNumber:Integer): Boolean;
- Var
- X,Y:Integer;
- Begin
- Result:=False;
- If (Not FindColorTolerance(X,Y,13758452,600,175,620,197,16)) Then
- Exit;
- Case TabNumber Of
- 1:Begin
- If (Not FindColorTolerance(X,Y,1910383,535,172,540,176,13)) Then
- MouseBox1(533,174,552,197, mouse_left);
- End;
- 2:Begin
- If (Not FindColorTolerance(X,Y,1910383,564,172,571,176,13)) Then
- MouseBox1(563,171,590,197, mouse_left);
- End;
- 3:Begin
- If (Not FindColorTolerance(X,Y,1910383,596,172,600,176,13)) Then
- MouseBox1(597,171,622,197, mouse_left);
- End;
- 4:Begin
- If (Not FindColorTolerance(X,Y,1910383,630,172,635,176,13)) Then
- MouseBox1(629,171,655,197, mouse_left);
- End;
- 5:Begin
- If (Not FindColorTolerance(X,Y,1910383,663,172,670,176,13)) Then
- MouseBox1(662,171,688,197, mouse_left);
- End;
- 6:Begin
- If (Not FindColorTolerance(X,Y,1910383,727,172,735,176,13)) Then
- MouseBox1(695,171,719,197, mouse_left);
- End;
- 7:Begin
- If (Not FindColorTolerance(X,Y,1910383,730,173,734,180,13)) Then
- MouseBox1(729,175,752,197, mouse_left);
- End;
- 8:Begin
- If (Not FindColorTolerance(X,Y,1910383,525,469,534,473,13)) Then
- MouseBox1(529,469,554,490, mouse_left);
- End;
- 9:Begin
- If (Not FindColorTolerance(X,Y,1910383,563,469,570,473,13)) Then
- MouseBox1(564,469,587,495, mouse_left);
- End;
- 10:Begin
- If (Not FindColorTolerance(X,Y,1910383,596,469,602,473,13)) Then
- MouseBox1(597,469,620,495, mouse_left);
- End;
- 11:Begin
- If (Not FindColorTolerance(X,Y,1910383,629,469,634,473,13)) Then
- MouseBox1(630,469,655,495, mouse_left);
- End;
- 12:Begin
- If (Not FindColorTolerance(X,Y,1910383,662,469,669,473,13)) Then
- MouseBox1(662,469,688,495, mouse_left);
- End;
- 13:Begin
- If (Not FindColorTolerance(X,Y,1910383,695,469,700,473,13)) Then
- MouseBox1(697,469,720,495, mouse_left);
- End;
- 14:Begin
- If (Not FindColorTolerance(X,Y,1910383,728,469,733,473,13)) Then
- MouseBox1(729,469,752,490, mouse_left);
- End;
- End;
- Result:=True;
- End;
- Function rsps_prayercheck(): Boolean;
- Var
- X,Y:Integer;
- Begin
- rsps_gametab(6);
- Begin
- Status := 'Checking Prayer';
- proggy;
- If (Not FindColorTolerance(X,Y,7451338,548,288,580,319,13)) Then
- MouseBox1(562,299,572,307, mouse_left);
- wait(200);
- If (Not FindColorTolerance(X,Y,7451338,663,326,693,355,13)) Then
- MouseBox1(672,333,684,345, mouse_left);
- End;
- Result:=True;
- rsps_gametab(4);
- end;
- procedure AntiDscim;
- var
- x, y: Integer;
- begin
- begin
- if FindBlackChatMessage('ured') then
- begin
- Status := ('We were d scimmed');
- proggy;
- wait(4000);
- rsps_prayercheck();
- end else
- exit;
- end;
- end;
- procedure UserPrompt;
- begin
- (InputQuery('OralsRagBot.Exe ', 'Type in your rags (case sensitive): ', target));
- end;
- function IsLoggedIn: boolean;
- begin
- if not findcolortolerance(x, y, 4110568, 437, 469, 445, 479, 20) then
- begin
- result := true
- end else
- begin
- result := false
- end;
- end;
- procedure setmeup;
- begin
- Status := ('Setting up');
- proggy;
- sleep(500);
- rsps_gametab(1);
- If (Not FindColorTolerance(X,Y,2303647,609,381,637,391,20)) Then
- begin
- wait(250);
- MouseBox1(589,362,695,389, mouse_left);
- wait(250);
- end;
- rsps_prayercheck();
- sleep(500);
- MouseBox1(555,15,568,24, mouse_left);
- count := 0
- repeat
- inc(count);
- presskey(38);
- until count > 25;
- end;
- procedure login;
- begin
- if (isloggedIn) then
- begin
- exit;
- end else
- begin
- wait(200);
- movemouse(327, 256);
- Status := 'Entering Username';
- proggy;
- Wait(100);
- clickmouse(x, y, mouse_left);
- count := 0;
- repeat
- Inc(count);
- PressKey(VK_Back);
- until count > 25;
- Wait(250);
- SendKeys(USERNAME, 0, 0);
- wait(1000);
- movemouse(327, 272);
- Status := 'Entering Username';
- proggy;
- Wait(100);
- count := 0;
- clickmouse(x, y, mouse_left);
- repeat
- Inc(count);
- PressKey(VK_Back);
- until count > 25;
- Wait(250);
- SendKeys(PASSWORD, 0, 0);
- Status := ('logging in');
- proggy;
- Wait(1000);
- movemouse(300, 320);
- Wait(200);
- ClickMouse(x, y, mouse_left);
- Wait(4000);
- setmeup;
- end;
- end;
- function get_wildlevel:string;
- var
- blueTPA: tpointarray;
- blueATPA: t2dpointarray;
- begin
- FindColorsTolerance(blueTPA, 65535, 253, 307, 473, 325, 60);
- if (length(blueTPA) > 1) then
- blueATPA := splitTPAEx(blueTPA, 1, 10);
- sortATPAFromFirstPointX(blueATPA, point(0, 0));
- result:= getTextATPA(blueATPA, 5, 'UpChars07');
- //DebugTPA(blueTPA, 'bmp');
- end;
- Function Wild_level(Text: TStringArray): Boolean;
- Var
- TheText: String;
- i, n: Integer;
- Begin
- TheText := get_wildlevel;
- n := High(Text);
- For i := 0 to n do
- If (Pos(Text[i], TheText) > 0) then
- Begin
- Result := True;
- Exit;
- End;
- End;
- Procedure actHuman;
- Begin
- case random(1000) of
- 0..250: exit;
- 251..900: MouseBox1(619,82,640,95, mouse_left);
- 901..1000: MouseBox1(624,82,638,90, mouse_left);
- End;
- End;
- function inWild: boolean;
- begin
- red := DTMFromString('mQwAAAHicY2ZgYOhlYmDoA+IJQOwH5AcBsS8Qvze3B5KMYJoLyIJhRiQMBADzdAWO');
- slay := DTMFromString('mQwAAAHicY2ZgYPBjYmAIBGJvIPYF8oOAOACIf/yfy/DlTxGY5gLyYZgRCQMBAGilCY4=');
- alter := DTMFromString('mQwAAAHicY2ZgYKhmYmAoB+JKILZjgGBHIJ4/fz7D339cDP///GHgAvJhmBEJAwEAYQIJLA==');
- if not findDTM(slay, x, y, 550, 2, 731, 163) or
- not findDTM(alter, x, y, 550, 2, 731, 163) or
- not findDTM(red, x, y, 550, 2, 731, 163)then
- begin
- result := true
- //writeln('we are in wild')
- end
- else
- begin
- result := false
- //writeln('we are not in the wild')
- wait(randomrange(500, 4000));
- rsps_gametab(3);
- wait(200)
- MouseBox1(577,420,587,424, mouse_left);
- wait(500)
- rsps_prayercheck();
- wait(50)
- Status := 'Teleporting to easts';
- proggy;
- typesend('::restore');
- wait(300);
- typesend('::easts');
- wait(randomrange(5000,9000));
- acthuman;
- end;
- freedtm(slay);
- freedtm(red);
- freedtm(alter);
- end;
- procedure teleport;
- var
- x, y, glory:integer;
- begin
- Status := 'Teleporting to edge';
- proggy;
- glory := DTMFromString('mWAAAAHicY2FgYGhkYmCogeIOIBZmZGBgAWJRIOYE4nTeNoYrZ88yXLogxXDr6lUGSaAeZMyIhkEAAAuLClc=');
- presskey(113)
- wait(25)
- presskey(113)
- wait(10);
- if FindDTM(glory, x, y, 548, 206, 730, 461) then
- begin
- Wait(100)
- MMouse(x, y, 0, 0);
- clickmouse(x, y, mouse_right);
- Wait(300);
- movemouse(x, y+43)
- wait(50);
- clickmouse(x, y, mouse_left);
- wait(1000);
- mousebox1(235, 377, 283, 385, mouse_left);
- wait(4000);
- inwild();
- end;
- freedtm(glory);
- end;
- procedure runnorth;
- begin
- Status := 'Running North';
- proggy;
- mmouse(626, 62, 4, 4) //for lvl 17
- //mmouse(626, 65, 4, 4)
- wait(10);
- clickmouse(x, y, mouse_left);
- end;
- procedure runsouth;
- begin
- Status := 'Running South';
- proggy;
- mmouse(627, 97, 4, 4)
- wait(10);
- clickmouse(x, y, mouse_left);
- end;
- procedure runwest;
- begin
- Status := 'Running West';
- proggy;
- mmouse(585, 84, 5, 5)
- wait(10);
- clickmouse(x, y, mouse_left);
- end;
- procedure runeast;
- begin
- Status := 'Running East';
- proggy;
- mmouse(646, 84, 4, 4)
- wait(10);
- clickmouse(x, y, mouse_left);
- end;
- procedure ss_MMToMSPoint(var X, Y : Integer);
- var
- x1, y1 : Integer;
- begin
- x1 := X;
- y1 := X;
- X := Round((X-625)*255/25) + 262;
- Y := Round((Y-87)*176/28) + 173;
- if X < 3 then X := 3;
- if Y < 3 then Y := 3;
- if X > 516 then X := 516;
- if Y > 338 then Y := 338;
- end;
- procedure wildcheck;
- begin
- If (wild_level(['18'])) or
- (wild_level(['17'])) or
- (wild_level(['16'])) or
- (wild_level(['15'])) or
- (wild_level(['14'])) then
- RunNorth();
- if (wild_level(['20'])) or
- (wild_level(['21'])) or
- (wild_level(['22'])) or
- (wild_level(['23'])) or
- (wild_level(['24'])) then
- RunSouth();
- If findcolortolerance(x, y,10189928, 647, 104, 666, 157, 25) then
- RunWest();
- If findcolortolerance(x, y,5007472, 607, 18, 617, 118, 10) or
- findcolortolerance(x, y,1883881, 610, 121, 629, 146, 10) then
- RunEast();
- end;
- procedure AntiLure;
- begin
- inwild();
- wildcheck;
- end;
- procedure Attack;
- Var
- TPAA: T2DPointArray;
- TPA: TPointArray;
- CTS, I, t: Integer;
- Begin
- CTS := GetColorToleranceSpeed;
- ColorToleranceSpeed(2);
- setcolorspeed2modifiers(0.21, 1.01);
- if FindColorsSpiralTolerance(626, 86, TPA, 517888, 606, 67, 656, 103, 25) then
- begin
- ColorToleranceSpeed(CTS);
- TPAA := TPAToATPAEx(TPA, 3, 1); //Put the Width and Heigh here
- SortATPASize(TPAA, True);
- For I := 0 To High(TPAA) Do
- If GetArraylength(TPAA[i]) > 2 Then // Set How Much Points you need for your function to take Ation
- if MiddleTPAEx(TPAA[i], x, y) then
- Begin
- ss_MMToMSPoint(x, y);
- mmouse(x,y,1,1)
- Status := 'looking for ' + toStr(TARGET);
- proggy;
- wait(20)
- if (rspsIsUpTextMultiCustom([TARGET])) then
- begin
- clickmouse(x, y, mouse_left);
- Status := 'Attacking '+ toStr(TARGET);
- proggy;
- t:=0;
- MarkTime(t);
- while TimeFromMark(t) < 2000 do
- begin
- antilure;
- wait(10)
- end;
- end else
- exit;
- end else
- exit;
- end;
- end;
- function fighting: boolean;
- begin
- if findcolortolerance(x, y, 37890, 17, 36, 20, 46, 20) or
- findcolortolerance(x, y, 1579112, 17, 36, 20, 46, 20) then
- begin
- result := true
- Status := 'In a fight';
- proggy;
- end
- else
- begin
- result := false
- Status := 'Idling';
- proggy;
- attack();
- proggy;
- end;
- end;
- procedure heal;
- var
- karambwan, x, y:integer;
- begin
- rsps_gametab(4);
- karambwan:= DTMFromString('mbQAAAHicY2VgYJjKxMDQD8WzgXg+EHsxMjD4AXEoEHsAcQgQz6xNY5hSlcLQnB3B0JgZzrBlciUDF1A/OmbEgsEAADP/C/c=');
- if FindDTM(karambwan, x, y, 547, 205, 730, 461) then
- begin
- AntiLure;
- inwild();
- Wait (25 + random(25));
- Status := 'Eating Shark';
- proggy;
- MMouse(x, y, 1, 1);
- Mouse(x, y, 1, 1, true);
- freeDTM(karambwan);
- end else
- teleport;
- //ToBank;
- //Bank;
- end;
- function Restore: Boolean;
- var
- x, y, i: Integer;
- potDTMs: TIntegerarray;
- begin
- potDTMs := [
- DTMFromString('mQwAAAHicY2ZgYJjOxMAwBYhnAbEwIwMDNxRPMY1hKCsrZ/DzD2GQBKqDYUYkDAQA8OUFwg=='),
- DTMFromString('mWAAAAHicY2FgYDjIxMCwG4iPMEHYvIwMDAJALAzE7EC8wjaDYZtTIcM0s1iGPS5lDEZAPciYEQ2DAAAFBQlq'), //4dose
- DTMFromString('mWAAAAHicY2FgYHBhYmCwA2J3IHYCYkNGBgZTIDYHYk0gXmydyrDJIZ9hmlksQ1VVNYMkUA8yZkTDIAAAfjQHhg=='), //3dose
- DTMFromString('mWAAAAHicY2FgYMhhYmBIB+JiIM4DYmNGBgZTIDYHYh0g3mCfy7DJIZ+hQc+fISEhhcEIqAcZM6JhEAAAsKAIOg=='), //2dose
- DTMFromString('mQwAAAHicY2ZgYJjOxMAwBYhnAbEwIwMDNxRPMY1hKCsrZ/DzD2GQBKqDYUYkDAQA8OUFwg==') //1dose
- ];
- rsps_gametab(4);
- for i := 0 to High(potDTMs) do
- if FindDTM(potDTMs[i], x, y, 548, 206, 730, 461) then
- begin
- AntiLure;
- inwild();
- Wait(600)
- Status := 'Restoring';
- proggy;
- //WriteLn('Drinking 1 dose restore');
- MMouse(x, y, 2, 2);
- clickmouse(x, y, mouse_left);
- Wait(400);
- Result := True;
- for i := 0 to high(potDTMs) do
- FreeDTM(potDTMs[i]);
- exit;
- end else
- teleport;
- end;
- function Brew: Boolean;
- var
- x, y, i: Integer;
- potDTMs: TIntegerArray;
- begin
- //else
- potDTMs := [
- DTMFromString('mWAAAAHicY2FgYHBmYmCwBWJ3IHYC4hdAsTdQ/ACIjx91Yzh9Kp5h43p7hrq6OgZJoBgyZkTDIAAAexoL/Q=='),
- DTMFromString('mWAAAAHicY2FgYMhjYmDIAuIiJgj7JVDsLRC/A+JHQHz8qBvD6ZMRDJs32jMUFBQxSALFkDEjGgYBAKr5DIY='),
- DTMFromString('mWAAAAHicY2FgYJjBxMAwAYjnAfF0IH4FFHsHxfeB+NoVH4bTJyMYFi60ZNi7dy+DJFAMGTOiYRAAAAB6Dgs='),
- DTMFromString('mWAAAAHicY2FgYDjIxMCwF4iPAfF+IH4KFHsDxG+B+BEQl5WVMRw74gbGdXV1DJJAMWTMiIZBAAAALQ2U')
- ];
- rsps_gametab(4);
- for i := 0 to High(potDTMs) do
- if FindDTM(potDTMs[i], x, y, 548, 206, 730, 461) then
- begin
- AntiLure;
- inwild;
- heal;
- Status := 'Brewing';
- proggy;
- MMouse(x, y, 2, 2);
- clickmouse(x, y, mouse_left);
- wait(1200);
- begin
- for i := 0 to high(potDTMs) do
- FreeDTM(potDTMs[i]);
- restore;
- wait(1000)
- break;
- end;
- end else
- teleport;
- end;
- function Lowish_HP(): Boolean;
- var
- x, y, i: Integer;
- colours: TIntegerArray;
- begin
- colours := [1250067]
- for i := 0 to High(colours) do
- begin
- antiDscim();
- if FindColorTolerance(x, y, colours[i], 550, 52, 559, 53, 20) then
- begin
- //WriteLn('Health Point is low');
- Brew();
- Result := True
- end else
- // WriteLn('Health point not low');
- end;
- end;
- function Lowish_Prayer: Boolean;
- var
- x, y, i: Integer;
- colours1: TIntegerArray;
- begin
- colours1 := [1250067]
- for i := 0 to High(colours1) do
- begin
- if FindColorTolerance(x, y, colours1[i], 544, 103, 547, 106, 12) then
- begin
- //WriteLn('Prayer Point is low');
- Restore();
- Result := True
- end else
- // WriteLn('Prayer point not low');
- end;
- end;
- begin
- //UserPrompt;
- setupsrl;
- mouseresetclientarea;
- imageresetclientarea;
- login;
- setmeup;
- repeat
- login();
- antiDscim();
- Lowish_HP();
- Lowish_Prayer();
- Antilure();
- inwild();
- //fighting();
- until (false);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement