SRL Archive - OSR Help

RSPS Antiban Help


Elip007

2013-01-22 04:42:42

EDIT - Got my Script and Antiban to work. Thanks to Riwu and the SRL Antiban page :)



I am making a script for a RSPS. I was not able to include Antiban and I believe it's because I am using it for an RSPS.


The script I have runs and does what it needs to do, but there isn't enough mouse movements and I get disconnected for no activity. My bot mines the ores and it takes about 3 minutes to get a full inventory. Now before those 3 minutes are up, my mouse just sits there not doing anything and I end up getting disconnected.


Is there a procedure that I could include that will help me from getting disconnected?
If so, how would I add it and what would it be?


I believe that is the solution to solving my problem but just don't know how to go about solving it.

riwu

2013-01-22 04:52:12

Perhaps just a random right click of the screen?

GetClientDimensions(w, h);
Mouse(RandomRange(0, w - 1), RandomRange(0, h - 1), 0, 0, mouse_Right);
//some function to cancel the option
And also some random key presses?

TypeByte(VK_0 + RandomRange(0, 52));

Do it with a case statement, check out scripts to see how AntiBan is done.

Elip007

2013-01-22 04:57:53

From: riwu
check out scripts to see how AntiBan is done.


I have been doing that except for some reason they either don't work with a RSPS or I'm doing them completely wrong.
But yeah I'm gonna be screwing around with that until I get it to work. There must be an easy way around it that I am just missing.

riwu

2013-01-22 05:00:36

From: Elip007
I have been doing that except for some reason they either don't work with a RSPS or I'm doing them completely wrong.
But yeah I'm gonna be screwing around with that until I get it to work. There must be an easy way around it that I am just missing.

Yeah you can't use most of the include's antiban procedures, you have to make them yourself. I was referring to how they use the 'case Random() of' etc, then have your own procedures like what i've shown you above ;)

Elip007

2013-01-22 05:19:59

From: riwu
Yeah you can't use most of the include's antiban procedures, you have to make them yourself. I was referring to how they use the 'case Random() of' etc, then have your own procedures like what i've shown you above ;)


Yeah I had to learn it the hard way. Would be much easier if all Antibans worked.
Thanks for the help though! After a few tests I got it to work. All I really used was
procedure Anti;
var
Keys: TIntegerArray;
I: Integer;
Deg: Extended;
begin
Keys := [VK_RIGHT, VK_LEFT];
I := Random(2);
if (Random(2) = I) then
begin
ActivateClient;
Deg := RS_GetCompassAngleDegrees;
Wait(100 + random(50));
KeyDown(Keys[I]);
Wait(500 + random(1000));
KeyUp(Keys[I]);
Wait(500 + random(1000));
MakeCompass(Deg);
end else
if (Random(3) = 0) then
SleepAndMoveMouse(1000 + random(200));
end;

rj

2013-01-24 18:03:46

I could help you with a isloggedin function and a login function for 06 if you need

Elip007

2013-01-27 22:59:48

From: rjj95
I could help you with a isloggedin function and a login function for 06 if you need


I don't believe that is really necessary. For the RSPS that I use, Mining is done on one ore and I just add that anti every minute and it does the trick. As long as the mouse moves every now and then, the server wont disconnect you.

rj

2013-01-27 23:28:19

From: Elip007
I don't believe that is really necessary. For the RSPS that I use, Mining is done on one ore and I just add that anti every minute and it does the trick. As long as the mouse moves every now and then, the server wont disconnect you.


System updates, lag out, null, Anyway Here it is:

function IsloggedIn(): boolean;
var
Login, X, Y: Integer;
begin
Login := BitmapFromString(85, 9, 'meJzNVTEOwjAMTL+RiTXdkRALIx+' +
'AlZ0Nib0zAxsbEnt5AS/gBbygP+Eqo6ImtnEFAaIbmuZi3yVx0tRu' +
's3De+6nQMARCUz+BbuE0nKsef1L2uoA+PUIIQdLGymMz3k7xH2A5e' +
'9hBkCA01r7CN9pHhPnYHbctWQetgF0em7EcMfZpTX5inyLjA1twPT' +
'DaIvKb9ikRG58OsxcahtjDr/CNu9/xSVs0iyVb5CnlVq1E+wq+Vvt' +
'gohyMZEmenjFd5P+xT8hqH4hqbb9u+RJwaUTxcYR0PZfdCzFKOtyH' +
'ue3DEfsQsMBWpvEHIRUzCB+3X8jXIGuffTWMwDojXVrRRuAg5bDfz' +
'boDWTiihw==');
Result := true;
if FindBitmapToleranceIn(Login, X, Y, 284, 346, 480, 387, 195) then
begin
Result := false;
end;
FreeBitmap(login);
end;

Procedure LoginMyPlayer;
var
Button, X, Y: Integer;
begin
Status := ('Logging in');
Button := BitmapFromString(85, 9, 'meJzNVTEOwjAMTL+RiTXdkRALIx+' +
'AlZ0Nib0zAxsbEnt5AS/gBbygP+Eqo6ImtnEFAaIbmuZi3yVx0tRu' +
's3De+6nQMARCUz+BbuE0nKsef1L2uoA+PUIIQdLGymMz3k7xH2A5e' +
'9hBkCA01r7CN9pHhPnYHbctWQetgF0em7EcMfZpTX5inyLjA1twPT' +
'DaIvKb9ikRG58OsxcahtjDr/CNu9/xSVs0iyVb5CnlVq1E+wq+Vvt' +
'gohyMZEmenjFd5P+xT8hqH4hqbb9u+RJwaUTxcYR0PZfdCzFKOtyH' +
'ue3DEfsQsMBWpvEHIRUzCB+3X8jXIGuffTWMwDojXVrRRuAg5bDfz' +
'boDWTiihw==');
if FindBitmapToleranceIn(Button, X, Y, 284, 346, 480, 387, 195) then
begin
mmouse(373, 362, 1, 1);
wait(randomrange(100, 150));
clickmouse2(mouse_Left);
wait(6000 + Random(2500));
end;
end;

Just change the bitmaps and mouse coords

To use in your script before each main thing in procedure you can do:
if not IsLogged on then
begin
LoginMyPlayer;
end;