SRL Archive - SRL Suggestions

Potential Antiban


Le Jingle

2012-04-12 21:16:41

Well, made a function that I thought would be useful. Basically I notice that when I'm killing monsters or doing boring bank skills, I tend to have a hand on the keyboard, specifically rotating the camera via the arrow keys.. Which leads me to this suggestion:



//Personally synthesized from work/advice via MasterBB, R1ch, Nebula and Wizzup?
Procedure AntiBanRandomAngleToggle;
var
StartAngle, ttlkeys, clicks, i: integer;
begin
FindNormalRandoms;
StartAngle := round(rs_GetCompassAngleDegrees());
ttlkeys:= RandomRange(15, 50);
begin
repeat
begin
i:= random(4);
case (i) of
1: begin
KeyDown(VK_Left);
Wait(200+random(50));
KeyUp(VK_Left);
IncEx(clicks, 1);
end;
2: begin
KeyDown(VK_Right);
Wait(200+random(50));
KeyUp(VK_Right);
IncEx(clicks, 1);
end;
3: begin
KeyDown(40);
Wait(200+random(50));
KeyUp(40);
IncEx(clicks, 1);
end;
4: begin
KeyDown(38);
Wait(200+random(50));
KeyUp(38);
IncEx(clicks, 1);
end;
end;
end;
until (clicks = ttlkeys)
if (clicks = ttlkeys) then
begin
Wait(100+Random(50));
MakeCompass(StartAngle);
end;
end;
end;


Feel free to take a look / test it out and let me know what you think.
Advice / criticism / comments welcome :>

Yago

2012-04-12 21:19:01

I think there's something similar in the includes.

Le Jingle

2012-04-12 21:22:25

Well from what I saw, there's RandomMovement and CompassMovement, which are similar, but don't offer just the key movements in either 4 directions.

Coh3n

2012-04-12 21:26:24

Not bad, maybe have total keys a parameter so the scripter choose how many times to press the keys down?

Le Jingle

2012-04-12 23:18:19

So something like this? :)



(*
Toggle Screen Angle
~~~~~~~~~

.. code-block:: pascal

ToggleScreenAngle(TotalKeys: Integer; WaitPeriod: extended);

Uses the keyboard arrow keys to act like a bored human wanting to adjust thier
screen via arrow keys. Will return original start angle.

.. note::

by Le Jingle (Ideas/Advice: Coh3n, MasterBB, R1ch, Nebula and Wizzup?)

Example:

ToggleScreenAngle(40, 100);

.. code-block:: pascal

*)

Procedure ToggleScreenAngle(TotalKeys, WaitPeriod: Integer);
var
StartAngle, clicks, i: integer;
begin
FindNormalRandoms;
StartAngle := round(rs_GetCompassAngleDegrees());
repeat
begin
i:= random(4);
case (i) of
1: begin
KeyDown(VK_Left);
Wait((WaitPeriod)+random(50));
KeyUp(VK_Left);
IncEx(clicks, 1);
end;
2: begin
KeyDown(VK_Right);
Wait((WaitPeriod)+random(50));
KeyUp(VK_Right);
IncEx(clicks, 1);
end;
3: begin
KeyDown(40);
Wait((WaitPeriod)+random(50));
KeyUp(40);
IncEx(clicks, 1);
end;
4: begin
KeyDown(38);
Wait((WaitPeriod)+random(50));
KeyUp(38);
IncEx(clicks, 1);
end;
end;
end;
until (clicks = TotalKeys)
if (clicks = TotalKeys) then
Wait(100+Random(50));
MakeCompass(StartAngle);
end;


* Just remembered why I use this, it's convenient for scripts where you rotate the screen often. And works good when the script is set to ClickNorth(SRL_ANGLE_HIGH); after then antiban (given the script works off of being north+high.