SCAR Code:
//----------------------------------------------------------------------------//
//-- Scar Standard Resource Library --//
//----------------------------------------------------------------------------//
//-- by: Azeroth, Bebe, BenLand100, benleegt, Boreas, c0de, --//
//-- Cheesehunk, dakota, Dankness, driger1592, EvilChicken!, Flyboy, --//
//-- Freddy1990, Hobbit, inferno, Kernel Klink, Knightstreak, --//
//-- Krazy_Meerkat, Krichevskoy, Liquid, Lorax, lordsaturn, Mad Cow, --//
//-- Markus, masquerader, mastaraymond, moparisthebest, Mutant Squirrle, --//
//-- n3ss3s, N1ke, Nava2, 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, 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. --//
//----------------------------------------------------------------------------//
{.include SRL/SRL/Core/Globals.scar}
{.include SRL/SRL/Core/Math.scar}
{.include SRL/SRL/Core/Mouse.scar}
{.include SRL/SRL/Core/Color.scar}
{.include SRL/SRL/Core/Players.scar}
{.include SRL/SRL/Core/Overwrite.scar}
//----------------------------------------------------------------------------//
//-- SRL Level 2 Includes --//
//-- --//
//-- Interface and OCR routines. --//
//----------------------------------------------------------------------------//
{.include SRL/SRL/Core/Text.scar}
{.include SRL/SRL/Core/Timing.scar}
{.include SRL/SRL/Core/SRLLog.scar}
{.include SRL/SRL/Core/Chat.scar}
{.include SRL/SRL/Core/GameTab.scar}
//----------------------------------------------------------------------------//
//-- SRL Level 3 Includes --//
//-- --//
//-- MapWalking, AntiRandoms, Objects, Bank, Symbol and many more... --//
//----------------------------------------------------------------------------//
{.include SRL/SRL/Core/Flag.scar}
{.include SRL/SRL/Core/Login.scar}
{.include SRL/SRL/Core/Mapwalk.scar}
{.include SRL/SRL/Core/Object.scar}
{.include SRL/SRL/Core/Bitmaps.scar}
{.include SRL/SRL/Core/Amount.scar}
{.include SRL/SRL/Core/Inventory.scar}
{.include SRL/SRL/Core/Bank.scar}
{.include SRL/SRL/Core/Symbol.scar}
{.include SRL/SRL/Core/RC.scar}
{.include SRL/SRL/Core/AutoColor.scar}
{.include SRL/SRL/Core/Globalstats.scar}
{.include SRL/SRL/Core/CAutoRespond.scar}
{.include SRL/SRL/Core/WorldSwitcher.scar}
{.include SRL/SRL/Core/AntiBan.scar}
{.include SRL/SRL/Core/AntiRandoms/Common.scar}
{.include SRL/SRL/Core/AntiRandoms/Certer.scar}
{.include SRL/SRL/Core/AntiRandoms/Demon.scar}
{.include SRL/SRL/Core/AntiRandoms/Forester.scar}
{.include SRL/SRL/Core/AntiRandoms/Quiz.scar}
{.include SRL/SRL/Core/AntiRandoms/Sandwich.scar}
{.include SRL/SRL/Core/AntiRandoms/EvilBob.scar}
{.include SRL/SRL/Core/AntiRandoms/Leo.scar}
{.include SRL/SRL/Core/AntiRandoms/Frog.scar}
{.include SRL/SRL/Core/AntiRandoms/Molly.scar}
{.include SRL/SRL/Core/AntiRandoms/Pillory.scar}
{.include SRL/SRL/Core/Antirandoms/Pinball.scar}
{.include SRL/SRL/Core/Antirandoms/Maze.scar}
{.include SRL/SRL/Core/Antirandoms/CapnArnav.scar}
{.include SRL/SRL/Core/Antirandoms/BeeKeeper.scar}
{.include SRL/SRL/Core/AntiRandoms/Abyss.scar}
{.include SRL/SRL/Core/AntiRandoms/Mordaut.scar}
{.include SRL/SRL/Core/AntiRandoms/PrisonPete.scar}
{.include SRL/SRL/Core/AntiRandoms/Mime.scar}
{.include SRL/SRL/Core/AntiRandoms/AntiRandoms.scar}
{.include SRL/SRL/Core/AntiRandoms/RandomTool.scar}
{$IFNDEF SCAR321_UP}
{.include SRL/SRL/Misc/FontUpdater.scar}
{$ENDIF}
{$DEFINE SRL_OPENDEV}
{*******************************************************************************
procedure SetupSRL;
by: SRL Dev Team
Description: Sets up all variables needed to run SRL.
*******************************************************************************}
procedure SetupSRL;
var
t: Integer;
{$IFDEF SRL_SMART}{s: TStringArray;
vv: TVariantArray;
i: Integer;
ReLoad: Boolean;}{$ENDIF}
begin
t := GetTimeRunning;
MouseSpeed := 15;
{$IFDEF UseLaptopMouse}LMouse_MissChance := 75;{$ENDIF}
CheckHPFirst := True;
Reincarnate := False;
TalkAfterRandoms := False;
RoadColor := 0;
WaterColor := 0;
BankColor := 0;
LampSkill := 'mining';
SetUpSRLReport;
LoadCosineArrays;
SymbolAccuracy:= 0.8;
LoadSRLBitMaps;
LoadSRLFonts;
LoadTeleRandoms;
SolveSRLRandoms := True;
SetupSRLAutoResponder;
UseFindMod := True;
LogoutOnMod := True;
UseFindTrade := True;
UseAutoResponder := True;
Screenshots := False;
GraphicsSet := False;
AllowPVP := False;
WarnSensitivity := -2;
{$IFNDEF SCAR321_UP}
srl_UpdateFonts(srl_FontsUp2date);
{$ENDIF}
InitializeSRLLogFile;
Writeln ('SRL Compiled in '+ IntToStr(GetTimeRunning - t) + ' msec');
Smart_Server := Smart_Server;
Smart_Members:= Smart_Members;
Smart_Signed := Smart_Signed;
Smart_SuperDetail := Smart_SuperDetail;
Smart_Use := true;
{$IFDEF SRL_SMART}
if Smart_Use then begin
{ ReLoad := False;
s := SmartLastSettings;
if High(s) <> 4 then SetLength(s, 5);
try
SmartGetColor(0, 0);
Reload := False;
except
Reload := True;
end;
if Reload then
begin
writeln('unopened');
if (Smart_Server = 0) then
begin
Smart_Server := RandomWorld(Smart_Members, False);
Smart_Signed := True;
Smart_SuperDetail := False;
end;
end else
begin
vv := [Smart_Server, Smart_Members, Smart_Signed, Smart_SuperDetail];
for i := 0 to 3 do
if not (s[i] = vv[i]) then
begin
ReLoad := True;
Break;
end;
end;
if ReLoad then
begin
Writeln('SMART Initialized.' + #10 + 'Loaded: Server ' + IntToStr(Smart_Server) + ', Members: ' + BoolToStr(Smart_Members)
+ ', Signed: ' + BoolToStr(Smart_Signed) + ', Super Detail: ' + BoolToStr(Smart_SuperDetail) + '.');
SmartSetupEx(Smart_Server, Smart_Members, Smart_Signed, Smart_SuperDetail);
end; }
if (Smart_Server = 0) then
begin
Smart_Server := RandomWorld(Smart_Members, False);
Smart_Signed := True;
Smart_SuperDetail := False;
end;
Writeln('SMART Initialized.' + #10 + 'Loaded: Server ' + IntToStr(Smart_Server) + ', Members: ' + BoolToStr(Smart_Members)
+ ', Signed: ' + BoolToStr(Smart_Signed) + ', Super Detail: ' + BoolToStr(Smart_SuperDetail) + '.');
SmartSetupEx(Smart_Server, Smart_Members, Smart_Signed, Smart_SuperDetail);
SetTargetDC(SmartGetDC);
repeat
Wait(100);
if (GetTimeRunning - t) > 120000 then
Break;
until(RSReady);
end;
{$ENDIF}
end;