SRL Archive - MSI Suggestions

Antiban.scar


Sir R. M8gic1an

2010-04-18 14:44:22

Zyt3x brought this to my attention.

[php]
case
20001..999999 :
If Random(10) = 5 Then
MSI_AntiBan(7000 + Random(200));
[/php]

That should probably be

[php]
while (MyTime < WantedTime)
MSI_Antiban(7000 + random(200));
[/php]


Another thing:
I strongly dislike having the % of antiban possibility already set. It'd be much better for manipulation to have this:

[php]
Procedure MSI_AntiBan(HowLong, ChanceP : Integer);
begin
if Random(100) > ChanceP then
exit;

//…
end;
[/php]

~RM

Coh3n

2010-04-18 17:01:19

I don't know exactly what you mean by the first point. :o


{******************************************************************************}
{ Procedure MSI_AntiBan(HowLong : Integer); }
{ By: Naum, edited by Coh3n }
{ Description: The AntiBan procedure to be used throughout the scripts. }
{******************************************************************************}
Procedure MSI_AntiBan(HowLong, ChancePerc: Integer);
Var
CurTab, I : Integer;
Begin
if (Random(100) < ChancePerc) then
Exit;

Case HowLong Of
0..2000:
Case Random(3) Of
0 : SleepAndMoveMouse(HowLong + Random(HowLong/10));
1 : Begin
CurTab := GetCurrentTab;
GameTab(RandomRange(TAB_Combat, TAB_LogOut));
Wait(HowLong + Random(HowLong/10));
GameTab(CurTab);
End;
2 : RandomRClick;
End;

2001..5000:
Case Random(4) Of
0 : HoverSkill('Random', False);
1 : PickUpMouse;
2 : SleepAndMoveMouse(HowLong + Random(HowLong/10));
3 : If Random(4) = 2 Then
For I := 0 To Round(HowLong/800) Do
If I Mod 2 = 0 Then ExamineInv;
End;

5001..10000:
If Random(2) = 1 Then
RandomMovement
Else
MSI_AntiBan(Round(HowLong/2) + Random(1000));

10001..20000:
Case Random(3) Of
0 : MSI_AntiBan(Round(HowLong/2) + Random(1000));
1 : BoredHuman;
2 : RandomAngle(1);
End;

20001..999999:
MSI_AntiBan(7000 + Random(200));
End;
End;

Sir R. M8gic1an

2010-04-18 17:05:07


{******************************************************************************}
{ Procedure MSI_AntiBan(HowLong, ChancePerc: Integer); }
{ By: Naum, edited by Coh3n }
{ Description: The AntiBan procedure to be used throughout the scripts. }
{******************************************************************************}
Procedure MSI_AntiBan(HowLong, ChancePerc: Integer);
Var
CurTab, I, Time : Integer;
Begin
if (Random(100) < ChancePerc) then
Exit;

Case HowLong Of
0..2000:
Case Random(3) Of
0 : SleepAndMoveMouse(HowLong + Random(HowLong/10));
1 : Begin
CurTab := GetCurrentTab;
GameTab(RandomRange(TAB_Combat, TAB_LogOut));
Wait(HowLong + Random(HowLong/10));
GameTab(CurTab);
End;
2 : RandomRClick;
End;

2001..5000:
Case Random(4) Of
0 : HoverSkill('Random', False);
1 : PickUpMouse;
2 : SleepAndMoveMouse(HowLong + Random(HowLong/10));
3 : If Random(4) = 2 Then
For I := 0 To Round(HowLong/800) Do
If I Mod 2 = 0 Then ExamineInv;
End;

5001..10000:
If Random(2) = 1 Then
RandomMovement
Else
MSI_AntiBan(Round(HowLong/2) + Random(1000));

10001..20000:
Case Random(3) Of
0 : MSI_AntiBan(Round(HowLong/2) + Random(1000));
1 : BoredHuman;
2 : RandomAngle(1);
End;

20001..999999:
begin
Time := GetSystemTime + HowLong;
while (Time > GetSystemTime) do
begin
MSI_AntiBan(7000 + Random(200));
wait(random(5000));
end;
End;
End;

~RM

Coh3n

2010-04-18 17:10:22

Oh okay gotcha.

I'll commit right now.

Sir R. M8gic1an

2010-04-18 17:20:54

From: Coh3n
Oh okay gotcha.

I'll commit right now.


Should we add an ANTI_BAN_RATE constant?


PS: You'll get compiling errors :p Wrong number of parameters.

~RM

Coh3n

2010-04-18 17:24:25

From: Rasta Magician
Should we add an ANTI_BAN_RATE constant?

~RM

We could, or even add it to script setup so the user sets it?

Oh, and I was just watching it do it's work and realized we don't have a level up check anywhere so it was just standing there when it leveled up. Was just thinking we could add LevelUp to MSI_Antiban, except have it check that no matter what.

Sir R. M8gic1an

2010-04-18 17:26:05

From: Coh3n
We could, or even add it to script setup so the user sets it?

Oh, and I was just watching it do it's work and realized we don't have a level up check anywhere so it was just standing there when it leveled up. Was just thinking we could add LevelUp to MSI_Antiban, except have it check that no matter what.


Better off doing

MSI_AntiRandoms

and including level check there.

~RM

Coh3n

2010-04-18 17:28:27

From: Rasta Magician
Better off doing

MSI_AntiRandoms

and including level check there.

~RM

Yeah good point. We can also have stats info if a random is found.