IPwnz
2011-02-18 00:11:45
How Long have You Played Runescape?
7 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Visual Basic, Pascal, HTML, CSS, some Javascript (kind of holding off on learning more till college)
Are you a member of any other communities?
No (not Runescape or botting related)
Tell us about yourself…
Please show us one (or multiple) of your scripts.
7 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Visual Basic, Pascal, HTML, CSS, some Javascript (kind of holding off on learning more till college)
Are you a member of any other communities?
No (not Runescape or botting related)
Tell us about yourself…
From: IPwnz
I'm a senior in high school now, but I started playing RS back in 6th grade. I had absolutely no idea botting existed for years. I returned for a couple months before they killed free trade and, by reading through some old posts, was generally unhelpful scripting-wise. :) This time around, I'm back because of free trade again, but with my college major as a Game Designer, I hope to grow my scripting abilities in the wonderfully welcome SRL community. I've already had a great time talking with people on the IRC and the forums, and even if I don't make members thank you for providing such a great place for programmers to collaborate and share, because this isn't just about botting Runescape, it's about working through one challenge after another, both as programmers and as people.
Please show us one (or multiple) of your scripts.
program EdgevilleSmelterbyIPwnz;
//*******************************\\
// Edgeville Smelter by IPwnz \\
// version 2.1 \\
// last updated Feburary 17, 2011\\
//*******************************\\
// Setup \\
// Fill in lines 26-27 \\
// and your players. \\
// Start in Edge bank \\
// Hit The Start Button \\
//*******************************\\
// IMPORTANT: \\
// Remember that to use \\
// the Edgeville furnace you \\
// have to have done any task \\
// set in Varrock. \\
//*******************************\\
{$DEFINE SMART}
{$i srl/srl.scar}
{$i srl/srl/misc/stats.simba}
{$i reflection/reflection.simba}
const //(optional) if you want to use SRL Stats, input your info here
StatsUser = ''; //Your SRL Stats Username ([url]http://stats.villavu.com[/url])
StatsPass = ''; //Your SRL Stats Password
ScriptVersion = '2.1'; //Don't touch :)
type //Ignore this stuff
OptionsRecord = record
Loads,Break,TimeTotal,StartXP,TotalXP,CompletedLoads,Ore,Ore2,Bar,BarsInLoad,TotalBars: Integer;
BarType: String;
end;
var //Ignore this too
Options:array[0..99] of OptionsRecord;
BreakTime,TimeMark,PlayerNumber,CurrentOre:Integer;
procedure DeclarePlayers; //Set your players up here
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; // Username
Players[0].Pass := '5'; // Password
Players[0].Nick := ''; // 3-4 lowercase letters from username; used for random event detection
Players[0].Active := True; //Set to false only if you don't want to use this character
Players[0].Pin := ''; // Leave blank if the player doesn't have a bank pin
Options[0].Loads := 0; //how many loads to do, 0 for unlimited
Options[0].Break := 0; //Take a break every X hours? 0 for unlimited
Options[0].BarType := 'steel'; //bronze,iron,steel,mithril,adamant,rune,silver,gold
{
Players[1].Name := ''; // Username
Players[1].Pass := ''; // Password
Players[1].Nick := ''; // 3-4 lowercase letters from username; used for random event detection
Players[1].Active := True;
Players[1].Pin := ''; // Leave blank if the player doesn't have a bank pin
Options[1].Loads := 0; //how many loads to do, 0 for unlimited
Options[1].Break := 0; //Take a break every X hours? 0 for unlimited
Options[1].BarType := 'steel'; //bronze,iron,steel,cannonballs,mithril,adamant,rune,silver,gold
}
end;
{Don't touch anything beyond this point}
const
BronzeBarID = 2349;
IronBarID = 2351;
SteelBarID = 2353;
MithrilBarID = 2359;
AdamantineBarID = 2361;
RuniteBarID = 2363;
SilverBarID = 2355;
GoldBarID = 2357;
TinOreID = 438;
CopperOreID = 436;
IronOreID = 440;
IronOreID2 = 440;
CoalOreID = 453;
CoalOreID2 = 453;
CoalOreID3 = 453;
CoalOreID4 = 453;
MithrilOreID = 447;
AdamantineOreID = 449;
RuniteOreID = 451;
SilverOreID = 442;
GoldOreID = 444;
CBallID = 2;
CBallMouldID = 4;
FurnaceID = 26814;
procedure XPCalculator;
var
XPIncrease: Integer;
begin
if not (LoggedIn) or not (Players[CurrentPlayer].Active) then
Exit;
XPIncrease := GetXP(skill_Smithing);
Options[CurrentPlayer].TotalXP := XPIncrease - Options[CurrentPlayer].StartXP;
end;
procedure Antiban; //idea based on Coh3n's Antiban
begin
if not (LoggedIn) or not (Players[CurrentPlayer].Active) then
Exit;
case Random(80) of
12: RandomRClick;
24: XPCalculator;
36: PickUpMouse;
48: RandomMovement;
60: BoredHuman;
72: ExamineInv;
end;
end;
procedure LoadCalculator;
begin
if not (LoggedIn) or not (Players[CurrentPlayer].Active) then
Exit;
Options[CurrentPlayer].BarsInLoad := R_CountItem(Options[CurrentPlayer].Bar);
Options[CurrentPlayer].CompletedLoads := Options[CurrentPlayer].CompletedLoads + 1;
if not (Options[CurrentPlayer].Ore = SteelBarID) then
Options[CurrentPlayer].TotalBars := Options[CurrentPlayer].TotalBars + Options[CurrentPlayer].BarsInLoad
else
Options[CurrentPlayer].TotalBars := Options[CurrentPlayer].TotalBars + GetItemStackSizeAt(2);
Writeln('Done smelting load #' +ToStr(Options[CurrentPlayer].CompletedLoads));
if not (Options[CurrentPlayer].Ore = SteelBarID) then
Writeln('Smelted a total of ' + ToStr(Options[CurrentPlayer].TotalBars) + ' bars')
else
Writeln('Smelted a total of ' + ToStr(Options[CurrentPlayer].TotalBars) + ' cannonballs');
end;
procedure ProgressReport;
begin
XPCalculator;
Writeln('+ + + + + + + + + + + + +');
Writeln('+ Edgeville Smelter +');
Writeln('+ by IPwnz +');
Writeln('+ Version '+ToStr(ScriptVersion)+' +');
Writeln('+ + + + + + + + + + + + +');
Writeln('');
Writeln('Ran for ' + TimeRunning);
if not (Options[CurrentPlayer].Ore = SteelBarID) then
Writeln('Smelted ' + IntToStr(Options[CurrentPlayer].TotalBars) + ' '
+ ToStr(Options[CurrentPlayer].BarType) +' bars')
else
Writeln('Smelted a total of ' + ToStr(Options[CurrentPlayer].TotalBars) + ' cannonballs');
Writeln('Completed ' + IntToStr(Options[CurrentPlayer].CompletedLoads) + ' loads');
Writeln('Gained a total of ' + IntToStr(Options[CurrentPlayer].TotalXP) + ' XP');
Writeln('');
Writeln('+++++++++++++++++++++++++');
end;
procedure DoChecks; //modified from Travs Ess Miner
var
run: Integer;
begin
if not (LoggedIn) or not (Players[CurrentPlayer].Active) then
Exit;
{$IFDEF REFLECTION}
R_FindRandoms;
{$ELSE}
FindNormalRandoms;
{$ENDIF}
if(Options[CurrentPlayer].Loads >= Options[CurrentPlayer].CompletedLoads) and (Options[CurrentPlayer].Loads <> 0) then
begin
writeln('Player has finished their loads, switching players');
ProgressReport;
NextPlayer(false);
Exit;
end;
if(TimeMark=0) then
MarkTime(TimeMark)
else
begin
Options[CurrentPlayer].TimeTotal := Options[CurrentPlayer].TimeTotal+TimeFromMark(TimeMark);
MarkTime(TimeMark);
end;
MakeCompass('n');
SetAngle(True);
{$IFDEF REFLECTION}
run := R_GetMMLevels('run');
if(run > 30+random(10)) and (not R_IsRunning) then
SetRun(true);
{$ELSE}
if (GetMMLevels('run', cs) > 30) then
SetRun(true);
{$ENDIF}
end;
function Walk(Color, Tolerance: Integer; SortFrom: tpoint): Boolean;
var //Camaro's walking function
i, x, y, rx, ry: Integer;
TPA: TPointArray;
begin
if not LoggedIn then Exit;
FindNormalRandoms;
FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color, MMX1, MMY1, MMX2, MMY2, Tolerance);
SortTPAFrom(TPA, SortFrom);
for i := 0 to High(TPA) do
begin
x := TPA[i].x;
y := TPA[i].y;
rx := RandomRange(-6, 6);
ry := RandomRange(-6, 6);
if (not rs_OnMinimap(x + rx, y + ry)) then
Continue;
Mouse(x + rx, y + ry, 0, 0, true);
FFlag(0);
Wait(200 + Random(500));
Result := True;
Break;
end;
end;
procedure BanktoFurnace;
var
Path: TTile;
begin
if not (LoggedIn) or not (Players[CurrentPlayer].Active) then
Exit;
Writeln('Walking to the furnace');
{$IFDEF REFLECTION}
Path := Tile(3109, 3502);
WalktoTile(Path, 1, 1);
{$ELSE}
if not (Walk(16777215, 23, Point(675, 84))) then
Walk(5922400, 23, Point(676, 63));
{$ENDIF}
FFlag(5);
Wait(1000+random(500));
end;
procedure FurnacetoBank;
var
Path: TTile;
begin
if not (LoggedIn) or not (Players[CurrentPlayer].Active) then
Exit;
Writeln('Walking to the bank');
{$IFDEF REFLECTION}
Path := Tile(3098, 3496);
WalktoTile(Path, 1, 1);
{$ELSE}
if not (Walk(16711422, 23, Point(675, 62))) then
Walk(7107698, 23, Point(623, 84));
{$ENDIF}
FFlag(5);
Wait(200+random(400));
end;
procedure OrePicker;
begin
if not (LoggedIn) or not (Players[CurrentPlayer].Active) then
Exit;
Options[CurrentPlayer].Ore := 0;
Options[CurrentPlayer].Ore2 := 0;
case Lowercase(Options[CurrentPlayer].BarType) of
'bronze', 'tin', 'copper':
begin
Options[CurrentPlayer].Ore := TinOreID;
Options[CurrentPlayer].Ore2 := CopperOreID;
Options[CurrentPlayer].Bar := BronzeBarID;
end;
'iron':
begin
Options[CurrentPlayer].Ore := IronOreID;
Options[CurrentPlayer].Bar := IronBarID;
end;
'steel', 'stel', 'steal':
begin
Options[CurrentPlayer].Ore := IronOreID2;
Options[CurrentPlayer].Ore2 := CoalOreID;
Options[CurrentPlayer].Bar := SteelBarID;
end;
'cannonballs', 'cannonball', 'cball', 'cballs':
begin
Options[CurrentPlayer].Ore := SteelBarID;
Options[CurrentPlayer].Bar := CBallID;
end;
'mith', 'mithril':
begin
Options[CurrentPlayer].Ore := MithrilOreID;
Options[CurrentPlayer].Ore2 := CoalOreID2;
Options[CurrentPlayer].Bar := MithrilBarID;
end;
'adament', 'adamant', 'adamantine', 'that green one':
begin
Options[CurrentPlayer].Ore := AdamantineOreID;
Options[CurrentPlayer].Ore2 := CoalOreID3;
Options[CurrentPlayer].Bar := AdamantineBarID;
end;
'rune', 'runite', 'runeite':
begin
Options[CurrentPlayer].Ore := RuniteOreID;
Options[CurrentPlayer].Ore2 := CoalOreID4;
Options[CurrentPlayer].Bar := RuniteBarID;
end;
'gold', 'golden':
begin
Options[CurrentPlayer].Ore := GoldOreID;
Options[CurrentPlayer].Bar := GoldBarID;
end;
'silver', 'sliver', 'shiny':
begin
Options[CurrentPlayer].Ore := SilverOreID;
Options[CurrentPlayer].Bar := SilverBarID;
end else
begin
Writeln('Please pick a bar type that actually exists');
ProgressReport;
NextPlayer(false);
Exit;
end;
end;
end;
function InSmelter: Boolean;
var
Area: TBox;
NPCCheck: TNPC;
SEPoint, NWPoint, MP: TPoint;
begin
if not (LoggedIn) or not (Players[CurrentPlayer].Active) then
Exit;
SEPoint := TileToMM(Point(3109+1, 3498-1));
NWPoint := TileToMM(Point(3109+1, 3503-1));
Area := PointToBox(SEPoint, NWPoint);
MP := TileToMM(GetMyPos);
Result := PointInBox(MP, Area);
if not Result then
if FindNPC(637, NPCCheck) then
Result := True;
end;
procedure LocateFurnace;
var
Furnace: TRSObject;
x, y: Integer;
begin
if not (LoggedIn) or not (Players[CurrentPlayer].Active) then
Exit;
Furnace := GetInteractableAt(Tile(3110, 3502));
if Furnace.ID = FurnaceID then
begin
Writeln('Found the furnace');
Exit;
end;
if not Furnace.ID = FurnaceID then
begin
if not FindObjEx(x, y, ['ace', 'urn'], [2702428, 2768223], 5, 50, 0, 0, 515, 337)
and not InSmelter then
begin
writeln('Not in the right room, attempting to walk to it');
DoChecks;
BanktoFurnace;
if not InSmelter then
begin
Writeln('Time to give up, cannot find the furnace');
ProgressReport;
NextPlayer(false);
Exit;
end;
end else
Writeln('All better now, found the furnace');
end;
end;
function SmeltingScreen: Boolean;
begin
Result := GetTextAtEx(14, 352, 5, SmallChars, True, False, 0, 0, 16777215, 3, True, tr_Letters) = 'How';
if not Result and (GetColor(211, 359) = 16777215) then
Result := True; //cannonball smelt check since the screen is different
end;
procedure Smelt;
var
TP : TPoint;
Item: TInvItem;
i, j, clickchoice, timeout, x, y: Integer;
begin
if not (LoggedIn) or not (Players[CurrentPlayer].Active) then
Exit;
i := 0;
j := 0;
timeout :=0;
clickchoice := Random(4);
repeat //color seems to beat reflection at this task
FindObjEx(x, y, ['ace', 'urn'], [2702428, 2768223], 5, 50, 0, 0, 515, 337);
if (Options[CurrentPlayer].Ore = SteelBarID) then
MouseItem(3, True);
if (clickchoice = 3) then
begin
Mouse (x, y, 3, 3, false);
Wait(400+random(125));
if (Options[CurrentPlayer].Ore = SteelBarID) then
R_ChooseOption ('Use Steel')
else
R_ChooseOption ('Smelt Furnace');
end else
Mouse (x, y, 3, 3, true);
Wait(1500+random(500));
Inc(i);
until SmeltingScreen or (i >= 4);
{$IFDEF REFLECTION}
if (i >= 4) then
TP := TileToMS (Tile(3110, 3502), 0);
repeat
Mouse (TP.x, TP.y, 3, 3, false);
Wait(300+random(150));
if (Options[CurrentPlayer].Ore = SteelBarID) then
R_ChooseOption ('Use Steel')
else
R_ChooseOption ('Smelt Furnace');
Wait(700+random(175));
Inc(j);
until SmeltingScreen or (j >= 3);
{$ENDIF}
if SmeltingScreen then
Writeln('Found smelting screen');
if (j >= 3) then
begin
Writeln('Could not find the smelting menu, switching players');
ProgressReport;
NextPlayer(false);
end;
repeat
clickchoice := Random(4);
if not (clickchoice = 3) then
if (Options[CurrentPlayer].Bar = SteelBarID) then
MouseBox(269, 400, 310, 450, 1)
else
MouseBox(238, 400, 280, 446, 1);
if (clickchoice = 3) then
begin
if (Options[CurrentPlayer].Bar = SteelBarID) then
MouseBox(269, 400, 310, 450, 3)
else
MouseBox(238, 400, 280, 446, 3);
ChooseOption ('Make All');
end;
Wait(500+Random(300));
until FindChatBoxText('You place', 8, clBlack) or
FindChatBoxText('The molten', 8, clBlack) or (GetAnimation = 899)
or (GetAnimation = 3243);
MarkTime(timeout);
repeat
Antiban;
DoChecks;
if LevelUp then
begin
stats_IncVariable('Total Levels Gained', 1);
Smelt;
end;
Wait(300+random(500));
until not R_ItemExists(Options[CurrentPlayer].Ore, Item)
or (timeout-GetSystemtime > 180000);
Wait(200+random(200));
LoadCalculator;
end;
procedure IsBreakTime; //modified from Travs Ess Miner
var
T:Integer;
begin
if not (LoggedIn) or not (Players[CurrentPlayer].Active) then
Exit;
if (Options[CurrentPlayer].Break = 0) then Exit;
if R_BankScreen then CloseBank;
if(GetSystemTime-BreakTime >= Options[CurrentPlayer].Break) then
begin
Writeln('Going to break');
T := GetSystemTime+RandomRange(1200000,2400000);
begin
ExitToLobby;
repeat
Writeln('Time Left in Break:' + MsToTime((T-GetSystemTime),Time_Short));
if(T - GetSystemTime>60000) then
begin
Wait(RandomRange(180000,300000));
end
else
begin
Wait(RandomRange(40000,60000));
end;
until(T<GetSystemTime);
Writeln('Going back to smelting.');
if (LobbyScreen) then
begin
MouseBox(72, 445, 570, 477, 1);
end
else
begin
LoginPlayer;
end;
end;
end;
repeat
BreakTime:=GetSystemTime;
Wait(1000+random(1000));
until(Loggedin);
end;
procedure TheBank;
var
i, j, Tab : integer;
ItemCheck: TBankItem;
Item:TInvItem;
begin
if not (LoggedIn) or not (Players[CurrentPlayer].Active) then
Exit;
Wait(200+Random(500));
if not R_OpenBankBooth(Bank_EV) or not OpenBank(Bank_EV, False, False) then
begin
Writeln('Could not find the bank, switching players');
ProgressReport;
NextPlayer(false);
Exit;
end;
if R_PinScreen or PinScreen then
if Players[CurrentPlayer].Pin = '' then
begin
Writeln('Please give the script a pin to use for this character');
ProgressReport;
NextPlayer(false);
Exit;
end else
begin
i := 0;
Writeln('Entering pin');
repeat
Wait(600+random(500));
InPin(Players[CurrentPlayer].Pin);
Inc(i);
until (i >= 3) or R_BankScreen or BankScreen;
if (i >= 3) then
begin
Writeln('Could not enter the pin correctly, switching players');
ProgressReport;
NextPlayer(false);
Exit;
end;
end;
if R_DepositAllBy(Options[CurrentPlayer].Bar) then
Wait(500+Random(300));
if (InvCount > 0) and not (Options[CurrentPlayer].Bar = CBallID) then
DepositAll;
if (Options[CurrentPlayer].Bar = CBallID) and (InvCount > 1) then
Deposit(2, 28, True);
IsBreakTime;
if not R_ItemExistsInBank(Options[CurrentPlayer].Ore, ItemCheck) then
begin
Writeln('Out of the primary ore, switching players');
CloseBank;
ProgressReport;
NextPlayer(false);
Exit;
end;
repeat
if (CurrentOre = 0) then
begin
if not R_ItemExists(CBallMouldID, Item)
and (Options[CurrentPlayer].Ore = SteelBarID) then
R_WithdrawItemEx(CBallMouldID, 1, Tab, true);
case Options[CurrentPlayer].Bar of
BronzeBarID: R_WithdrawItemEx(Options[CurrentPlayer].Ore, 14, Tab, true);
IronBarID: R_WithdrawItemEx(Options[CurrentPlayer].Ore, 28, Tab, true);
SteelBarID: R_WithdrawItemEx(Options[CurrentPlayer].Ore, 9, Tab, true);
CBallID: R_WithdrawItemEx(Options[CurrentPlayer].Ore, 27, Tab, true);
MithrilBarID: R_WithdrawItemEx(Options[CurrentPlayer].Ore, 5, Tab, true);
AdamantineBarID: R_WithdrawItemEx(Options[CurrentPlayer].Ore, 4, Tab, true);
RuniteBarID: R_WithdrawItemEx(Options[CurrentPlayer].Ore, 3, Tab, true);
SilverBarID: R_WithdrawItemEx(Options[CurrentPlayer].Ore, 28, Tab, true);
GoldBarID: R_WithdrawItemEx(Options[CurrentPlayer].Ore, 28, Tab, true);
end;
CurrentOre := 0;
if not (Options[CurrentPlayer].Ore2 = 0) and (InvCount < 15) then
CurrentOre := 1;
end;
if not (Options[CurrentPlayer].Ore2 = 0) and (CurrentOre = 1) then
begin
case Options[CurrentPlayer].Bar of
BronzeBarID: R_WithdrawItemEx(Options[CurrentPlayer].Ore2, 14, Tab, true);
SteelBarID: R_WithdrawItemEx(Options[CurrentPlayer].Ore2, 18, Tab, true);
MithrilBarID: R_WithdrawItemEx(Options[CurrentPlayer].Ore2, 20, Tab, true);
AdamantineBarID: R_WithdrawItemEx(Options[CurrentPlayer].Ore2, 24, Tab, true);
RuniteBarID: R_WithdrawItemEx(Options[CurrentPlayer].Ore2, 24, Tab, true);
end;
if (InvCount > 24) then
CurrentOre := 1
else
CurrentOre := 0;
end;
Wait(300+Random(200));
Inc(j);
until (j >= 3) or (InvCount > 24);
if (j >= 3) then
begin
if (InvCount < 14) then
begin
Writeln('Don''t have enough ore, switching players');
CloseBank;
ProgressReport;
NextPlayer(false);
Exit;
end;
Writeln('Couldn''t find any ore, switching players');
CloseBank;
ProgressReport;
NextPlayer(false);
Exit;
end;
Wait(750+random(500));
end;
procedure StatsCommit;
begin
if (StatsUser = '') then
Exit;
case Options[PlayerNumber].Bar of
BronzeBarID: stats_IncVariable('Bronze Bars Smithed', Options[PlayerNumber].TotalBars);
IronBarID: stats_IncVariable('Iron Bars Smithed', Options[PlayerNumber].TotalBars);
SteelBarID: stats_IncVariable('Steel Bars Smithed', Options[PlayerNumber].TotalBars);
MithrilBarID: stats_IncVariable('Mithril Bars Smithed', Options[PlayerNumber].TotalBars);
AdamantineBarID: stats_IncVariable('Adamant Bars Smithed', Options[PlayerNumber].TotalBars);
RuniteBarID: stats_IncVariable('Runite Bars Smithed', Options[PlayerNumber].TotalBars);
CBallID: stats_IncVariable('Cannonballs (Made)', Options[PlayerNumber].TotalBars);
end;
stats_IncVariable('Loads Done', Options[PlayerNumber].CompletedLoads);
stats_IncVariable('Total EXP Gained', Options[PlayerNumber].TotalXP);
if Stats_Commit then
Writeln('Stats successfully uploaded')
else
Writeln('Stats failed to upload');
end;
procedure Startup;
begin
Smart_Server := 29;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
ActivateClient;
TimeMark := 0;
PlayerNumber := 0;
CurrentOre := 0;
if not (StatsUser = '') then
SetupSRLStats(38, ToStr(StatsUser), ToStr(StatsPass));
ClearDebug;
SetupSRL;
SetupReflection;
DeclarePlayers;
LoginPlayer;
BreakTime := GetSystemTime;
end;
procedure Mainloop;
begin
repeat
Wait(1000+random(300));
Options[CurrentPlayer].Ore2 := 0;
OrePicker;
Options[CurrentPlayer].StartXP := GetXP(skill_Smithing)
XPCalculator;
repeat
if not (LoggedIn) or not (Players[CurrentPlayer].Active) then Exit;
DoChecks;
TheBank;
BanktoFurnace;
LocateFurnace;
Smelt;
FurnacetoBank;
until(Not LoggedIn);
if not (StatsUser = '') then
begin
Writeln('Attempting to upload progress report for last player');
StatsCommit;
end;
Wait(3000+random(1000));
Inc(PlayerNumber);
if not (PlayerNumber > HowManyPlayers - 1) then
NextPlayer(Players[PlayerNumber].Active);
until(AllPlayersInactive);
FreeSRL;
TerminateScript;
end;
begin
Startup;
Mainloop;
end.