-
Notifications
You must be signed in to change notification settings - Fork 77
/
Copy pathSRL.simba
202 lines (177 loc) · 6.66 KB
/
SRL.simba
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
//----------------------------------------------------------------------------//
//-- SRL Resource Library --//
//----------------------------------------------------------------------------//
//-- by: Azeroth, Bebe, BenLand100, benleegt, Boreas, c0de, Cheesehunk --//
//-- Coh3n, dakota, Dankness, driger1592, EvilChicken!, Flyboy, --//
//-- Freddy1990, Hobbit, IceFire908, inferno, Kernel Klink, Knightstreak, --//
//-- Krazy_Meerkat, Krichevskoy, Liquid, Lorax, lordsaturn, Mad Cow, --//
//-- marpis, Markus, masquerader, mastaraymond, moparisthebest, --//
//-- Mutant Squirrle, n3ss3s, N1ke, Naum, Nava2, NCDS, nielsie95, --//
//-- phantombmx, pups, Pyro, RAM, Rasta Magician, realrune, Renax, Ron, --//
//-- RsN, SKy Scripter, solemn wishes, Spky, SRL, Starblaster100, --//
//-- Stupid3ooo,Sumilion, tarajunky, The Claw, The_Rs_Monkey, TRiLeZ, --//
//-- Wizzup?, WT-Fakawi, XxKanexX, Yakman, YoHoJo, ZephyrsFury, _ChArMz, --//
//-- --//
//-- ....... and the SRL Community. --//
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
//-- SRL Level 1 Includes --//
//-- --//
//-- Low Level SCAR Math, Mouse Movement and Color routines. --//
//----------------------------------------------------------------------------//
{$DEFINE SRL5}
{$IFDEF PascalScript}
{$DEFINE NPCChars}
{$ENDIF}
{$IFDEF Lape}
{$INCLUDE SRLLape.simba}
{$ENDIF}
{$IFDEF SMART8}
{$IFNDEF SMART}
{$DEFINE SMART}
{$ENDIF}
{$ENDIF}
{$IFDEF SMART}
{$IFNDEF SRL_SMART}
{$IFDEF SIMBAMAJOR980}
{$I SRL-OSR/SRL/Misc/Smart.Simba}
{$ELSE}
Procedure ActivateClient; {$IFDEF LAPE}override;{$ENDIF} begin end;
{$ENDIF}
{$ENDIF}
{$ENDIF}
//{$include SRL-OSR/SRL/core/defines.simba}
{$ifdef Simba}
{$i SRL-OSR/SRL/core/simba.simba}
{$endif}
{$include SRL-OSR/SRL/core/globals.simba}
{$include SRL-OSR/SRL/core/math.simba}
{$include SRL-OSR/SRL/core/mouse.simba}
{$include SRL-OSR/SRL/core/color.simba}
{$include SRL-OSR/SRL/core/players.simba}
//----------------------------------------------------------------------------//
//-- SRL Level 2 Includes --//
//-- --//
//-- Interface and OCR routines. --//
//----------------------------------------------------------------------------//
{$include SRL-OSR/SRL/core/text.simba}
{$include SRL-OSR/SRL/core/timing.simba}
{$include SRL-OSR/SRL/core/SRLlog.simba}
{$include SRL-OSR/SRL/core/chat.simba}
{$include SRL-OSR/SRL/core/bitmaps.simba}
{$include SRL-OSR/SRL/core/amount.simba}
{$include SRL-OSR/SRL/core/gametab.simba}
//----------------------------------------------------------------------------//
//-- SRL Level 3 Includes --//
//-- --//
//-- MapWalking, AntiRandoms, Objects, Bank, Symbol and many more... --//
//----------------------------------------------------------------------------//
procedure SetScreenName(ScreenName: string); forward;
{$include SRL-OSR/SRL/core/animation.simba}
{$include SRL-OSR/SRL/core/flag.simba}
{$include SRL-OSR/SRL/core/worldswitcher.simba}
{$include SRL-OSR/SRL/core/login.simba}
{$include SRL-OSR/SRL/core/autocolor.simba}
{$include SRL-OSR/SRL/core/mapwalk.simba}
{$include SRL-OSR/SRL/core/object.simba}
{$include SRL-OSR/SRL/core/inventory.simba}
{$include SRL-OSR/SRL/core/bank.simba}
{$include SRL-OSR/SRL/core/symbol.simba}
{$include SRL-OSR/SRL/core/rc.simba}
{$include SRL-OSR/SRL/core/cautorespond.simba}
{$include SRL-OSR/SRL/core/antiban.simba}
{$include SRL-OSR/SRL/core/globalstats.simba}
{$include SRL-OSR/SRL/core/antirandoms/antirandoms.simba}
{$IFDEF LoadExtraFonts}
{$include SRL-OSR/SRL/misc/fontupdater.simba}
{$ENDIF}
{$IFNDEF SIMBAMAJOR980}
{$IFDEF SMART}
{$IFNDEF SRL_SMART}
{$include SRL-OSR/SRL/misc/SmartParams.Simba}
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$DEFINE SRL_OPENDEV}
{*******************************************************************************
procedure FreeSRL;
by: SRL Dev Team
Description: Tries to free all the variables it allocated during runtime.
*******************************************************************************}
procedure FreeSRL;
begin
FreeSRLBitmaps;
FreeSRLFonts;
end;
{*******************************************************************************
procedure SetupSRL;
by: SRL Dev Team
Last Edit: 22 June 2010 -- Nava2
Description: Sets up all variables needed to run SRL.
*******************************************************************************}
procedure SetupSRL;
var
t: Integer;
begin
clearDebug();
{$IFNDEF SMART}
{$IFDEF SIMBA}
if (not IsTargetValid) then
srl_Warn('SetUpSRL', 'Target client is not valid! ' +
'Drag the crosshairs over the target client.', warn_Terminate);
{$ENDIF}
{$ENDIF}
SetupBoxes; //Sets up box variables in globals.simba
t := GetTimeRunning;
MouseSpeed := 15;
{$IFDEF UseLaptopMouse}LMouse_MissChance := 75;{$ENDIF}
CheckHPFirst := True;
Reincarnate := False;
TalkAfterRandoms := False;
SRL_CombatRandoms := True;
setlength(SRL_FindRandomRunDirection,3);
RoadColor := 0;
WaterColor := 0;
BankColor := 0;
SRL_DisableRandoms := False;
SRL_OnFindRandomCall := nil;
LampSkill := 'mining';
//SetUpSRLReport;
LoadCosineArrays;
SymbolAccuracy:= 0.8;
LoadSRLBitMaps;
LoadSRLFonts;
{$IFNDEF SRL_RANDOMS_TEST}
_SetRandoms();
{$ENDIF}
SetupSRLAutoResponder;
SRL_RandomScreenShot := False;
UseFindMod := True;
LogoutOnMod := True;
UseFindTrade := True;
UseAutoResponder := True;
SRL_DisableIPLog := false;
SRL_SavePath := includePath + 'SRL-OSR/logs/';
SRL_StartTime := theDate(DATE_MONTH)+' at '+theTime;
WarnSensitivity := -2;
SetupAutoColors;
CheckUserNicks;
{$IFDEF LoadExtraFonts}
srl_UpdateFonts(srl_FontsUp2date);
{$ENDIF}
AddOnTerminate('FreeSRL');
SetSupressExceptions(true);
Writeln ('SRL Compiled in '+ IntToStr(GetTimeRunning - t) + ' msec');
{$IFDEF SMART}
initSmart(Smart_ForceNew);
{$ENDIF}
repeat
wait(100);
if ((GetTimeRunning - t) > 120000) then
break;
until(RSReady);
SetupGauss;
Proc_WorldSwitcherEnabled;
if (Length(Players) > 0) then
SetScreenName(Players[CurrentPlayer].Nick);
end;