-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAntiban.scar
96 lines (86 loc) · 3.54 KB
/
Antiban.scar
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
{==============================================================================\
| MSI Group Scripting Include |
| Antiban.scar |
|==============================================================================|
| For all debugging and progress report routines |
| |
| * procedure MSI_Antiban(); * by Naum, edited by Coh3n |
| * procedure MSI_FindRandoms; * by Coh3n |
\_____________________________________________________________________________}
{******************************************************************************}
{ Procedure MSI_AntiBan(HowLong, ChancePerc: Integer); }
{ By: Naum }
{ Date: 10 June 2010 }
{ 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), 100);
10001..20000:
Case Random(3) Of
0 : MSI_AntiBan(Round(HowLong/2) + Random(1000), 100);
1 : BoredHuman;
2 : RandomAngle(1);
End;
20001..999999:
begin
Time := GetSystemTime + HowLong;
while (Time > GetSystemTime) do
begin
MSI_AntiBan(7000 + Random(200), 100);
wait(random(5000));
end;
end;
End;
End;
{******************************************************************************}
{ procedure MSI_FindRandoms; }
{ By: Coh3n }
{ Date: 10 June 2010 }
{ Description: Checks for random events }
{******************************************************************************}
procedure MSI_FindRandoms;
begin
if (FindNormalRandoms) then
begin
MSI_Debug('MSI_FindRandoms', 'Found random event!', DEBUG_FUNCTIONS);
Inc(Stats_CustomVars[STATS_RANDOMS]);
MSI_SendStats;
end;
if (LevelUp) then
begin
MSI_Debug('MSI_FindRandoms', 'Player has leveled up!', DEBUG_FUNCTIONS);
Inc(Stats_CustomVars[STATS_LEVELS]);
MSI_SendStats;
end;
Wait(RandomRange(1000, 3000)); //to prevent lag on some computers
end;