Results 1 to 10 of 10

Thread: Is it possible to run multiple copies of a rsps bot on 1 computer?

  1. #1
    Join Date
    Jul 2007
    Posts
    70
    Mentioned
    0 Post(s)
    Quoted
    25 Post(s)

    Default Is it possible to run multiple copies of a rsps bot on 1 computer?

    I have a rsps(spawnpk) script that I want to run several copies on my computer at one time, is this possilbe? Thoughts?

  2. #2
    Join Date
    May 2012
    Location
    Glorious Nippon
    Posts
    1,011
    Mentioned
    50 Post(s)
    Quoted
    505 Post(s)

    Default

    Quote Originally Posted by imalama101 View Post
    I have a rsps(spawnpk) script that I want to run several copies on my computer at one time, is this possilbe? Thoughts?
    Check out KInput: https://villavu.com/forum/showthread.php?t=118176
    or RDP: https://villavu.com/forum/showthread.php?t=118173
    or some other form of fake input. IDK how thoroughly a private server would check for that sort of thing.

  3. #3
    Join Date
    Jul 2007
    Posts
    70
    Mentioned
    0 Post(s)
    Quoted
    25 Post(s)

    Default

    Quote Originally Posted by Citrus View Post
    Check out KInput:
    or RDP:
    or some other form of fake input. IDK how thoroughly a private server would check for that sort of thing.
    Your a champ!!!!!!!!! thanks again

    Also could you please remove that script from the last forums post I dont want it to go publlic : P THanks!
    Last edited by imalama101; 04-02-2018 at 03:35 PM.

  4. #4
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Quote Originally Posted by imalama101 View Post
    Also could you please remove that script from the last forums post I dont want it to go publlic : P THanks!
    Quote Originally Posted by Citrus View Post
    This should get you started. I didn't test it much though.
    Simba Code:
    1. program SpawnPKThiever;
    2. //just press play
    3. const
    4.   STOP_KEY = 130; //choose a key to stop the script
    5.  
    6.   MOUSE_MOVE = 3;
    7.   MSX1 = 8;
    8.   MSY1 = 33;
    9.   MSX2 = 518;
    10.   MSY2 = 366;
    11.   MSBOX: TBox = [MSX1, MSY1, MSX2, MSY2];
    12.   MSCX = (MSX2 - MSX1) div 2;
    13.   MSCY = (MSY2 - MSY1) div 2;
    14.   MSCP: TPoint = [MSCX, MSCY];
    15.  
    16. var
    17.   _w, _h: Int32;
    18.  
    19. procedure Wait(w1, w2: Int32); Overload;
    20. begin
    21.   Wait(Random(w1, w2));
    22. end;
    23.  
    24. procedure FastClick(Button: Byte);
    25. var
    26.   x, y: integer;
    27. begin
    28.   GetMousePos(x, y);
    29.   HoldMouse(x, y, Button);
    30.   Wait(80, 100);
    31.   ReleaseMouse(x, y, Button);
    32. end;
    33.  
    34. procedure Mouse(P: TPoint; Button: Byte);
    35. var
    36.   i, x, y: integer;
    37. begin
    38.   MoveMouse(P.X, P.Y);
    39.   if (Button = MOUSE_MOVE) then Exit;
    40.   Wait(20, 30);
    41.   FastClick(Button);
    42. end;
    43.  
    44. procedure Mouse(X, Y: Int32; Button: Byte); Overload;
    45. begin
    46.   Mouse(Point(X, Y), Button);
    47. end;
    48.  
    49. procedure MouseBox(const B: TBox; Button: Byte);
    50. begin
    51.   Mouse(Point(B.X1 + Random(B.X2 - B.X1), B.Y1 + Random(B.Y2 - B.Y1)), Button);
    52. end;
    53.  
    54. procedure Setup();
    55. var
    56.   i: Int32;
    57.   PP: TSysProcArr;
    58. begin
    59.   PP := GetProcesses();
    60.   for i := 0 to High(PP) do
    61.   begin
    62.     if (Pos('SpawnPK', PP[i].Title) > 0) then
    63.     begin
    64.       if (Pos('Simba', PP[i].Title) > 0) then Continue;
    65.       SetTarget(PP[i]);
    66.       GetClientDimensions(_w, _h);
    67.       if (_w > 800) then
    68.       begin
    69.         Mouse(750, 44, MOUSE_LEFT);
    70.         Wait(234);
    71.         GetClientDimensions(_w, _h);
    72.         if (_w > 800) then
    73.         begin
    74.           WriteLn('Please minimize the side panel.');
    75.           TerminateScript();
    76.         end else Exit;
    77.       end else Exit;
    78.     end;
    79.   end;
    80.   WriteLn('Error: Didn''t setup client.');
    81.   TerminateScript();
    82. end;
    83.  
    84. //https://github.com/SRL/SRL/blob/master/shared/text.simba#L18
    85. function FindTextIn(var Matches: TPointArray; const Text, Font: String; const Color: Int32; const B: TBox): Boolean;
    86. var
    87.   w, h: Int32;
    88.   TPA, TextTPA: TPointArray;
    89. begin
    90.   if FindColors(TPA, Color, B.X1, B.Y1, B.X2, B.Y2) then
    91.   begin
    92.     SetLength(Matches, 0);
    93.     TextTPA := TPAFromText(Text, Font, w, h);
    94.     Result := FindTextTPAinTPA(h-1, TextTPA, TPA, Matches);
    95.   end;
    96. end;
    97.  
    98. function WaitFunc(Func: function: Boolean; WaitTime, WaitInterval: Int32; Condition: Boolean = True): Boolean;
    99. var
    100.   t: UInt32;
    101. begin
    102.   t := GetTickCount() + WaitTime;
    103.   repeat
    104.     Result := Func();
    105.     if (Result = Condition) then Exit(True);
    106.     Wait(WaitInterval);
    107.   until (GetTickCount() > t);
    108.   Result := False;
    109. end;
    110.  
    111. function IsWalking(): boolean;
    112. var
    113.   BMPA, BMPB, w, h: Int32;
    114. begin
    115.   try
    116.     BMPA := BitmapFromClient(MSX1, MSY1, MSX2, MSY2);
    117.     Wait(69);
    118.     BMPB := BitmapFromClient(MSX1, MSY1, MSX2, MSY2);
    119.     GetBitmapSize(BMPA, w, h);
    120.     Result := (CalculatePixelShift(BMPA, BMPB, [0, 0, w-1, h-1]) > 69696);
    121.   finally
    122.     if BitmapExists(BMPA) then FreeBitmap(BMPA);
    123.     if BitmapExists(BMPB) then FreeBitmap(BMPB);
    124.   end;
    125. end;
    126.  
    127. function GetUpText(): String;
    128. const
    129.   COL = $006699;
    130. var
    131.   BMP, w, h, OldT, NewT: Int32;
    132.   B: TBox;
    133.   TPA: TPointArray;
    134. begin
    135.   if FindColors(TPA, 16777215, 12, 34, 500, 54) then
    136.   begin
    137.     OldT := GetImageTarget();
    138.     B := GetTPABounds(TPA);
    139.     BMP := BitmapFromClient(B.X1, B.Y1, B.X2+1, B.Y2+1);
    140.  
    141.     FastReplaceColor(BMP, $FFFFFF, COL); //white
    142.     FastReplaceColor(BMP, $FFFF00, COL); //cyan
    143.     FastReplaceColor(BMP, $00FF00, COL); //green
    144.  
    145.     GetBitmapSize(BMP, w, h);
    146.  
    147.     try
    148.       SetTargetBitmap(BMP);
    149.       Result := GetTextAtEx(0, 0, w-1, h-1, 0, 4, 4, COL, 0, 'UpChars07');
    150.     finally
    151.       NewT := GetImageTarget();
    152.       SetImageTarget(OldT);
    153.       FreeTarget(NewT);
    154.       if BitmapExists(BMP) then FreeBitmap(BMP);
    155.     end;
    156.   end;
    157. end;
    158.  
    159. function IsUpText(const S: String): Boolean;
    160. begin
    161.   Result := Pos(S, GetUpText());
    162. end;
    163.  
    164. function IsUpText(const SS: TStringArray): Boolean; Overload;
    165. begin
    166.   Result := IsArrInStr(SS, GetUpText());
    167. end;
    168.  
    169. function WaitUpText(const S: String; const WaitTime: UInt32): Boolean;
    170. var
    171.   t: UInt32;
    172. begin
    173.   t := GetTickCount() + WaitTime;
    174.   repeat
    175.     Result := IsUpText(S);
    176.     if Result then Exit;
    177.     Wait(44);
    178.   until (GetTickCount() > t);
    179. end;
    180.  
    181. function WaitUpText(const SS: TStringArray; const WaitTime: UInt32): Boolean; Overload;
    182. var
    183.   t: UInt32;
    184. begin
    185.   t := GetTickCount() + WaitTime;
    186.   repeat
    187.     Result := IsUpText(SS);
    188.     if Result then Exit;
    189.     Wait(44);
    190.   until (GetTickCount() > t);
    191. end;
    192.  
    193. function GetTabBox(const Tab: Int32): TBox;
    194. begin
    195.   if (not InRange(Tab, 1, 7)) then Exit;
    196.   Result.X1 := 499 + (Tab * 33);
    197.   Result.X2 := Result.X1 + 32;
    198.   Result.Y1 := 196;
    199.   Result.Y2 := 232;
    200. end;
    201.  
    202. function IsTabActive(const Tab: Int32): Boolean;
    203. const
    204.   COLOR = 1515095;
    205.   TOL = 30;
    206. var
    207.   B: TBox;
    208. begin
    209.   if (not InRange(Tab, 1, 7)) then Exit;
    210.   B := GetTabBox(Tab);
    211.   Result := (CountColorTolerance(COLOR, B.X1, B.Y1, B.X2, B.Y2, TOL) > 300);
    212. end;
    213.  
    214. function ClickTab(const Tab: Int32): Boolean;
    215. var
    216.   t: UInt32;
    217. begin
    218.   if IsTabActive(Tab) then Exit(True);
    219.   MouseBox(GetTabBox(Tab), MOUSE_LEFT);
    220.   t := GetTickCount() + 100;
    221.   repeat
    222.     Result := IsTabActive(Tab);
    223.     if Result then Exit;
    224.     Wait(20);
    225.   until (GetTickCount() > t);
    226. end;
    227.  
    228. function IsMoneyMakingScreen(): Boolean;
    229. var
    230.   TPA: TPointArray;
    231. begin
    232.   Result := FindTextIn(TPA, 'Money Making', 'UpChars07', 45311, MSBOX);
    233. end;
    234.  
    235. function ClickThieving(): Boolean;
    236. var
    237.   c: Int32;
    238.   TPA: TPointArray;
    239. begin
    240.   repeat
    241.     if FindTextIn(TPA, 'Thieving', 'StatChars07', $FFFFFF, MSBOX) then Exit(True);
    242.     if FindTextIn(TPA, 'Thieving', 'StatChars07', 2070783, MSBOX) then
    243.     begin
    244.       OffsetTPA(TPA, Point(4, 4));
    245.       Mouse(TPA[0], MOUSE_LEFT);
    246.       Wait(234);
    247.     end;
    248.   until (Inc(c) > 4);
    249. end;
    250.  
    251. function ClickTeleport(): Boolean;
    252. var
    253.   TPA: TPointArray;
    254. begin
    255.   if FindTextIn(TPA, 'Teleport', 'StatChars07', 39935, MSBOX) then
    256.   begin
    257.     OffsetTPA(TPA, Point(4, 4));
    258.     Mouse(TPA[0], MOUSE_LEFT);
    259.     Result := WaitFunc(@IsMoneyMakingScreen, 2345, 234, False);
    260.   end;
    261. end;
    262.  
    263. function Teleport(): Boolean;
    264. const
    265.   B: TBox = [591, 273, 610, 292];
    266. begin
    267.   if IsMoneyMakingScreen() then
    268.   begin
    269.     if ClickTeleport() then
    270.     begin
    271.       Wait(4567, 5678);
    272.       Exit(True);
    273.     end;
    274.   end;
    275.   if ClickTab(7) then
    276.   begin
    277.     Wait(121, 212);
    278.     MouseBox(B, MOUSE_LEFT);
    279.     //if WaitUpText(['Money Making', 'oney', 'aking'], 456) then
    280.     begin
    281.       //FastClick(MOUSE_LEFT);
    282.       if WaitFunc(@IsMoneyMakingScreen, 3456, 234, True) then
    283.       begin
    284.         if ClickThieving() then
    285.         begin
    286.           if ClickTeleport() then
    287.           begin
    288.             Wait(4567, 5678);
    289.             Result := True;
    290.           end;
    291.         end;
    292.       end;
    293.     end;
    294.   end;
    295. end;
    296.  
    297. function GetThievingLevel(): Int32;
    298. const
    299.   B: TBox = [630, 350, 655, 365];
    300. var
    301.   TPA: TPointArray;
    302. begin
    303.   if ClickTab(2) then
    304.     if FindColors(TPA, $00FFFF, B.X1, B.Y1, B.X2, B.Y2) then
    305.       Result := StrToIntDef(GetTextATPA(ClusterTPA(TPA, 1), 5, 'StatChars07'), -1);
    306. end;
    307.  
    308. function GetStallNumber(): Int32;
    309. begin
    310.   case GetThievingLevel() of
    311.     01..29: Result := 1; //?
    312.     30..49: Result := 2; //?
    313.     50..74: Result := 3;
    314.     75..98: Result := 4;
    315.         99: Result := 5;
    316.   end;
    317. end;
    318.  
    319. function GetStallText(const Stall: Int32): String;
    320. begin
    321.   case Stall of
    322.     1: Result := '250';
    323.     2: Result := '350';
    324.     3: Result := '450';
    325.     4: Result := '650';
    326.     5: Result := '850';
    327.   end;
    328. end;
    329.  
    330. function Thieve(): Boolean;
    331. const
    332.   TABLE_COLOR = 2708852;
    333.   TABLE_TOL = 2;
    334. var
    335.   i, Stall: Int32;
    336.   B: TBox;
    337.   TPA: TPointArray;
    338.   ATPA: T2DPointArray;
    339. begin
    340.   Stall := GetStallNumber();
    341.   if (not IsUpText(GetStallText(Stall))) then
    342.   begin
    343.     if FindColorsTolerance(TPA, TABLE_COLOR, MSX1, MSY1, MSX2, MSY2, TABLE_TOL) then
    344.     begin
    345.       ATPA := ClusterTPA(TPA, 1);
    346.       FilterTPAsBetween(ATPA, 0, 100);
    347.       FilterTPAsBetween(ATPA, 1000, 1000000);
    348.       if (Length(ATPA) < 1) then Exit;
    349.       SortATPAFromMidPoint(ATPA, Point(200, MSY2));
    350.       for i := 0 to High(ATPA) do
    351.       begin
    352.         Mouse(MedianTPA(ATPA[i]), MOUSE_MOVE);
    353.         if WaitUpText(GetStallText(Stall), 300) then Break;
    354.       end;
    355.       if (i = Length(ATPA)) then Exit;
    356.     end else Exit;
    357.   end;
    358.   FastClick(MOUSE_LEFT);
    359.   Wait(2450, 2500);
    360.   Result := True;
    361. end;
    362.  
    363. procedure Mainloop();
    364. begin
    365.   if IsKeyDown(STOP_KEY) then TerminateScript();
    366.   if (not Thieve()) then
    367.   begin
    368.     if WaitFunc(@IsWalking, 2345, 345, True) then
    369.     begin
    370.       while IsWalking() do Wait(444);
    371.     end else
    372.     begin
    373.       Teleport();
    374.     end;
    375.   end;
    376. end;
    377.  
    378. begin
    379.   ClearDebug();
    380.   Setup();
    381.   ActivateClient();
    382.   while True do Mainloop();
    383. end.
    You mean this script?

    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Badâ„¢ before everyone gets laser pistols

  5. #5
    Join Date
    Jul 2007
    Posts
    70
    Mentioned
    0 Post(s)
    Quoted
    25 Post(s)

    Default

    Quote Originally Posted by KeepBotting View Post
    You mean this script?

    dont do that lol

  6. #6
    Join Date
    May 2012
    Location
    Glorious Nippon
    Posts
    1,011
    Mentioned
    50 Post(s)
    Quoted
    505 Post(s)

    Default

    Quote Originally Posted by imalama101 View Post
    Your a champ!!!!!!!!! thanks again

    Also could you please remove that script from the last forums post I dont want it to go publlic : P THanks!
    Okay done.

  7. #7
    Join Date
    Jul 2007
    Posts
    70
    Mentioned
    0 Post(s)
    Quoted
    25 Post(s)

    Default

    Quote Originally Posted by Citrus View Post
    Also I want to return the favor in some way, if I could ever do such a thing for you. Thanks again for everything your extremely knowledgeable and have inspired me by your coding ability. I have a strong VB and C++ background from my mechanical engineering degree I am currently finishing up. Keep in touch with me buddy! Thanks again!

  8. #8
    Join Date
    May 2012
    Location
    Glorious Nippon
    Posts
    1,011
    Mentioned
    50 Post(s)
    Quoted
    505 Post(s)

    Default

    Quote Originally Posted by imalama101 View Post
    Also I want to return the favor in some way, if I could ever do such a thing for you. Thanks again for everything your extremely knowledgeable and have inspired me by your coding ability. I have a strong VB and C++ background from my mechanical engineering degree I am currently finishing up. Keep in touch with me buddy! Thanks again!
    I already have a mechanical engineering degree, so I don't need any help there.
    The best way for you to return the favor would be to learn to write your own scripts and help others who need it.

  9. #9
    Join Date
    Jul 2007
    Posts
    70
    Mentioned
    0 Post(s)
    Quoted
    25 Post(s)

    Default

    @Citrus I tried to get kinput to work but no luck. Do you have any experience with it?

  10. #10
    Join Date
    May 2012
    Location
    Glorious Nippon
    Posts
    1,011
    Mentioned
    50 Post(s)
    Quoted
    505 Post(s)

    Default

    Quote Originally Posted by imalama101 View Post
    @Citrus I tried to get kinput to work but no luck. Do you have any experience with it?
    Nope, none. You should probably ask questions here: https://villavu.com/forum/showthread.php?t=118176

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •