forked from SRL/SRL-6
-
Notifications
You must be signed in to change notification settings - Fork 1
/
srl.simba
111 lines (91 loc) · 3.26 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
(*
SRL
===
The SRL file is the most important file in SRL. It's the file included in
every script that requires an SRL function. Without this file included, the
SRL library isn't available to you.
*)
{$DEFINE SRL6}
{$include_once lib/utilities/wrappers.simba}
{$include_once lib/utilities/time.simba}
{$include_once lib/core/debug.simba}
{$include_once lib/core/globals.simba}
{$include_once lib/utilities/math.simba}
{$include_once lib/core/mouse.simba}
{$include_once lib/utilities/drawing.simba}
{$include_once lib/utilities/pixelshift.simba}
{$include_once lib/utilities/types/types.simba}
{$include_once lib/utilities/color.simba}
{$include_once lib/core/tesseract.simba}
{$include_once lib/core/text.simba}
{$include_once lib/interfaces/interfaces.simba}
{$include_once lib/interfaces/chooseoption.simba}
{$include_once lib/misc/items.simba}
{$include_once lib/interfaces/gametabs/gametab.simba}
{$include_once lib/interfaces/gametabs/backpack.simba}
{$include_once lib/interfaces/gametabs/stats.simba}
{$include_once lib/interfaces/options.simba}
{$include_once lib/interfaces/lobby/lobby.simba}
{$include_once lib/interfaces/lobby/worlds.simba}
{$include_once lib/interfaces/conversationbox.simba}
{$include_once lib/interfaces/actionbar.simba}
{$include_once lib/interfaces/mainscreen.simba}
{$include_once lib/interfaces/minimap.simba}
{$include_once lib/interfaces/pinscreen.simba}
{$include_once lib/interfaces/chatbox.simba}
{$include_once lib/interfaces/bankscreen.simba}
{$include_once lib/interfaces/depositbox.simba}
{$include_once lib/interfaces/options.simba}
{$include_once lib/interfaces/production.simba}
{$include_once lib/interfaces/lodestone.simba}
{$include_once lib/interfaces/toolscreen.simba}
{$include_once lib/interfaces/progressscreen.simba}
{$include_once lib/interfaces/powerscreen.simba}
{$include_once lib/interfaces/collectbox.simba}
{$include_once lib/interfaces/grandexchange.simba}
{$include_once lib/interfaces/heroscreen.simba}
{$include_once lib/interfaces/beastofburden.simba}
{$include_once lib/interfaces/lootscreen.simba}
{$include_once lib/interfaces/targetinfo.simba}
{$include_once lib/interfaces/tradescreen.simba}
{$include_once lib/interfaces/metrics.simba}
{$include_once lib/core/players.simba}
{$include_once lib/core/client.simba}
{$include_once lib/misc/srlstats.simba}
{$include_once lib/misc/antiban.simba}
{$IFDEF SMART}
{$include_once lib/misc/smart.simba}
{$ENDIF}
{$f+}
function setupSRL(): boolean;
var
t: longWord := getTimeRunning();
i, j: integer;
begin
print('setupSRL()', TDebug.HEADER);
print('Setting up SRL...');
setSupressExceptions(true);
{$IFNDEF SMART}
activateClient();
{$ELSE}
for i = 1 to smartResetAttempts do
begin
inc(j);
print('attempting to spawn smart, attempt #: ' + toStr(j));
if initSmart(smartForceNewClient) then
break;
end;
if (smartEnableDrawing) then
smartSetupDrawing();
{$ENDIF}
if (waitClientReady()) then
print('Client is ready.')
else begin
print('Client is taking too long to load, terminating...');
print('setupSRL(): '+toStr(result), TDebug.FOOTER);
terminateScript();
end;
result := true;
print('Setup SRL in '+msToTime(GetTimeRunning() - t, TIME_FORMAL));
print('setupSRL(): '+toStr(result), TDebug.FOOTER);
end;