forked from SRL/SRL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
osr.simba
87 lines (74 loc) · 3.31 KB
/
osr.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
// --- FIGURE OUT IF YOUR SIMBA CAN RUN SRL:
{$IFDEF SIMBAMAJOR980}{$DEFINE INCOMPATIBLE_VERSION}{$ENDIF}
{$IFDEF SIMBAMAJOR1000}{$DEFINE INCOMPATIBLE_VERSION}{$ENDIF}
{$IFDEF SIMBAMAJOR1100}{$DEFINE INCOMPATIBLE_VERSION}{$ENDIF}
{$IFNDEF INCOMPATIBLE_VERSION} // --- VERIFY SIMBA VERSION (¹)
{$IFNDECL SRL} // --- IF SRL ISN'T INCLUDED ALREADY (²)
{$DEFINE SRLVERSION := 2.0.0} // --- SRL VERSION DEFINE
{$DEFINE OSR} // --- OSRS BASEDEFINE
{$IFNDEF SRL:DEBUG} // --- ENABLE LAPE HINTS FOR SRL INTERNALS (³)
{$IFDEF HINTS}{$DEFINE !HAD_HINTS}{$H-}{$ENDIF}
{$ENDIF} // --- ENDIF LAPE HINTS FOR SRL INTERNALS (³) (see file-end)
{$include_once shared.simba}
begin
srl.DefaultClientBounds := [0, 0, 764, 502];
end;
{$IFDEF SMART} // --- IF USER ENABLED SMART
{$include_once shared/smartbase.simba}
{$include_once osr/smart.simba}
{$ENDIF} // --- ENDIF USER ENABLED SMART
{$include_once osr/misc.simba}
{$include_once osr/text.simba}
{$include_once osr/client.simba}
{$include_once osr/misc.simba}
{$include_once osr/lobby.simba}
{$include_once osr/worldswitcher.simba}
{$include_once osr/login.simba}
{$include_once osr/chooseoption.simba}
{$include_once osr/xpbar.simba}
{$include_once osr/interfaces/minimap.simba}
{$include_once osr/interfaces/mainscreen.simba}
{$include_once osr/interfaces/chatbox.simba}
{$include_once osr/interfaces/gametabs.simba}
{$include_once osr/player.simba}
{$include_once osr/players.simba}
{$include_once osr/interfaces/rsInterfaceBase.simba}
{$include_once osr/interfaces/depositbox.simba}
{$include_once osr/interfaces/smithingscreen.simba}
{$include_once osr/interfaces/shops.simba}
{$include_once osr/interfaces/bankscreen.simba}
{$include_once osr/interfaces/grandexch.simba}
{$include_once osr/interfaces/pinscreen.simba}
{$include_once osr/MM2MS.simba}
{$include_once osr/antiban.simba}
procedure TSRL.Setup(Options: ESRLOptionSet = SRL_DEFAULT_OPTIONS); override;
begin
inherited(Options);
if (@Self.OnSetup <> nil) then
Self.OnSetup();
Self.WriteLn('Setting up SRL for OSR');
Self.WriteLn('Waiting for client to load...');
{$IFDEF SMART}
if (not Smart.Init()) then
Self.WriteLn('Failed to setup SMART', dtFatal);
{$ELSE}
if (soActivateClient in Options) then
ActivateClient();
{$ENDIF}
if (not Self.IsClientReady(60000 * 3)) then
Self.WriteLn('OSRS didn''t load into a state where we can detect it.', dtFatal)
else
Self.WriteLn('Client ready!');
end;
{$IFDEF !HAD_HINTS}{$H+}{$ENDIF} // --- ENABLE LAPE HINTS FOR SRL INTERNALS (³)
{$ENDIF} // --- ENDIF SRL ISN'T INCLUDED ALREADY (²)
{$ELSE} // --- ELSE VERIFY SIMBA VERSION (¹)
begin
WriteLn('ERROR: Unable to include SRL, Incompatible Simba version detected.');
WriteLn(' SRL requires Simba 1.2 or newer.');
WriteLn('Recommended Simba 1.2 builds:');
WriteLn(' [main] https://github.com/slackydev/Simba/releases/tag/Simba-1.2.0-rc6_fixes');
WriteLn(' [alt] http://nala.villavu.com/downloads/master/05a0dc6397ebfbf77d10eae153e58a5050678f87/Simba.i386-win32.exe');
TerminateScript;
end;
{$ENDIF} // --- ENDIF VERIFY SIMBA VERSION (¹)