Le Jingle
2012-11-11 20:53:16
Hi all, I figured it'd only be beneficial if people wanted to see and or use some of my Antiban procedures. Surprisingly that OffMM (yes, I like the name asha gave it, as opposed to my previous name of MMWeGotOff…) snippet I see more than I'd expect, so here's some more things that I use from time to time in a script:
Note some of these have been already posted, and I've edited them to uphold better standards. Further improvements that I've missed are welcomed. I've more, but most of my others are player specific.
MMRandom: (Originally suggested by [D]ude)
OffMM: (previously MMWeGotOff.. -.-)
CheckAura: (checks for an Aura and possibly uses if able to)
Toggle Screen Angle: (Used it mostly in Flight's Livid Farmer, ~pauline~)
HoverSkillMulti: (Same as HoverSkill, except added waits and able for multiple skills.)
PlayWithChats: (Chat settings underneath the chat box)
Hope this helps some people out!
Cheers,
Lj!
Note some of these have been already posted, and I've edited them to uphold better standards. Further improvements that I've missed are welcomed. I've more, but most of my others are player specific.
MMRandom: (Originally suggested by [D]ude)
(*
MMRandom
~~~~~~~~~~~~
.. code-block:: pascal
procedure MMRandom(WaitPer, TimeOut:integer);
Performs Randomized MMouse's across the client.
Waits after each preformed movement and times out; WaitPer, TimeOut
.. note::
Author: [D]ude
Last Modified: Le Jingle
Example:
.. code-block:: pascal
MMRandom(1000, 2000);
*)
procedure MMRandom(WaitPer, TimeOut:integer);
var
x, y, fx, fy, t, w, h:integer;
begin
MouseSpeed := RandomRange(5, 15);
MarkTime(t);
GetMousePos(x, y);
GetClientDimensions(w, h);
repeat
fx := x + randomrange(0, w-x);
fy := y + randomrange(0, h-y);
wait(WaitPer);
MMouse(fx, fy, 5, 5);
until (TimeFromMark(t) >= TimeOut);
end;
OffMM: (previously MMWeGotOff.. -.-)
(*
OffMM
~~~~~~~~
.. code-block:: pascal
Procedure OffMM(Dir, TimeOut: Integer);
Idea = To move the mouse off the RS Screen; form of AntiBan.
Specifics = Moves the mouse to the choosen side of the screen, Dir,
indicated by below. Waits, TimeOut, until ending.
1 = Go top side, off-screen
2 = Go bottom side, off-screen
3 = Go left side, off-screen
4 = Go right side, off-screen
.. note::
by Le Jingle.
Example:
.. code-block:: pascal
MmmWeGotOff(Random(4), 30000);
*)
Procedure OffMM(Dir, TimeOut: Integer);
Var
w, h, rx, ry: Integer;
Begin
GetClientDimensions(w, h);
rx := RandomRange(0, w);
ry := RandomRange(0, h+50);
Case (Dir) Of
0..1: MMouse(w, RandomRange(-10,-50), rx, 0);
2: MMouse(w, h+RandomRange(10,50), rx, 0);
3: MMouse(RandomRange(-10,-50), h, 0, ry);
4: MMouse(w+RandomRange(10,50), h, 0, ry);
End;
Wait(TimeOut);
End;
CheckAura: (checks for an Aura and possibly uses if able to)
(*
CheckAura
~~~~~~~~
.. code-block:: pascal
Function CheckAura: Boolean;
Checks if there's an Aura on player, then will click to read if chat
if it's read for use. If it's ready, it will activate, else nothing.
.. note::
by Le Jingle.
Example:
.. code-block:: pascal
CheckAura;
*)
Function CheckAura: Boolean;
Var
n, x, y: Integer;
TB: Tbox;
Begin
Result := False;
if not loggedin then
exit;
SetChat('all', CHAT_GAME);
SetChat('hide', CHAT_PUBLIC);
n := GetCurrentTab;
GameTab(Tab_Equip);
TB := IntToBox(585, 211, 617, 243);
if FindColor(x, y, srl_outline_black, TB.x1, TB.y1, TB.x2, TB.y2) then
begin
MouseBox(585, 211, 617, 243, Mouse_Right);
ChooseOptionMultiEx(['ura time', 'me remain', 'remaining'], 'action', ClickLeft);
Wait(900+Random(100));
if FindBlackChatMessage('The aura has finished') then
MouseBox(585, 211, 617, 243, mouse_left);
result := GameTab(n);
end else
GameTab(n);
End;
Toggle Screen Angle: (Used it mostly in Flight's Livid Farmer, ~pauline~)
(*
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);
Wait(100+Random(50));
MakeCompass(StartAngle);
end;
HoverSkillMulti: (Same as HoverSkill, except added waits and able for multiple skills.)
(*
HoverSkillMulti
~~~~~~~~~
.. code-block:: pascal
procedure HoverSkillMulti(Skills:TVariantArray; w: integer);
Hovers multiple skills at a time and waits, w, for each skill.
.. note::
by Le Jingle
Example:
HoverSkillMulti([2, 5, 7], Random(1000));
.. code-block:: pascal
*)
procedure HoverSkillMulti(Skills:TVariantArray; w: integer);
var
i: integer;
begin
if not loggedin then
exit;
for i := 0 to High(skills) do
begin
HoverSkill(skills[i], false);
Wait(w);
end;
end;
PlayWithChats: (Chat settings underneath the chat box)
(*
PlayWithChats
~~~~~~~~~
.. code-block:: pascal
procedure SetChatFun(sChat, eChat, times: integer);
Sets any chat in range of sChat, aka start of chat, to eChat, aka
end of chat to a random state. Continues untils integer, times.
.. note::
by Le Jingle
Example:
SetChatFun(0, 6, 10);
.. code-block:: pascal
*)
procedure SetChatFun(sChat, eChat, times: integer);
var
i: integer;
s: TStringArray;
begin
SetLength(s, 4);
s := ['on', 'off', 'hide', 'friends'];
for i := 0 to times do
SetChat(s[random(4)], RandomRange(sChat, eChat));
end;
Hope this helps some people out!
Cheers,
Lj!