Markus
2011-10-26 16:40:07
From: PatDuffy
Just submitting my script for the 6th SRL Scripting Competition, Junior Members Division(I assume I count as one eventhough I'm technically not). Wasn't really sure about a definite deadline so I'll just send it a day early.
Uhh I'm not sure if it's possible to send a script as an attachment in PM so I'll just submit it in Code tags. If it's possible to send as an attachment just send me a PM saying how to do it and I will to make your job easierprogram SuperChopperDelux;//by PatDuffy
{$DEFINE SMART}
{$i SRL\SRL.scar}
{$i Reflection\Reflection.simba}
{$i SRL\SRL\Misc\stats.simba}
{=============================================================]
[ Super Chopper Delux ]
[=============================================================]
[ Features: ~3 Tree types(oak,regular,willow) ]
[ ~Multiplayer, Player Switching ]
[ ~SRL Stats, Progress Reports ]
[ ~Anti-Ban, Failsafes ]
[=============================================================]
[ Set-Up Instruction: 1. Fill out SRL Stats and Players ]
[ 2. Choose a starting location ]
[ 3. Choose a tree type ]
[ 4. Hit Run and Post Proggy! ]
[=============================================================]
[ Valid Tree Types: ~'oak' for oaks ]
[ ~'regular' for regular trees ]
[ ~'willow' for willow trees ]
[=============================================================]
[ Valid Locations: For All Tree Types ]
[ ~'banked' at bank with empty inv ]
[ ~'InvFull' at any trees with full inv ]
[ ~'invfull bank' at bank with full inv ]
[ For Specific Tree Types ]
[ ~'at trees' at regular trees nw of dray b]
[ ~'at willows' at Port Sarim willows ]
[ ~'at oaks' at Port Sarim Oaks ]
[=============================================================]
[ Other: This is my first complete script, so ]
[ efficiency in the coding needs work, but it ]
[ runs smoothly enough. Please post suggestions ]
[ for improvement on the thread! Thanks! ]
[=============================================================}
const
World = 0;//0 for random world
Members = false;//p2p or f2p
Signed = true;//don't change unless you know what your doing
SRLStats_UserID = 'Anonymous';//your SRL stats name
SRLStats_Password = 'anon1337';//your SRL stats password
var
x,y,I,RegLoads,LogsCut,
AntiBanUsed,TimePlayer,
WillLoads, WLogs,
RLogs, OakLoads: Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := ;//how many players to use
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name :='';//username
Pass :='';//password
Nick :='';//3-4 non-capital letters from Display Name in-game
Loc :='';//check above for valid locations
Active := True;//use this character or not?
Integers[1] := 99999;
Integers[2] := 30;//minutes to work before switch
Integers[3] := 1;//minutes inbetween player switch
Strings[1] :='';//tree type to cut, list above
end;
{ //remove the '{' for more players
with Players[1] do
begin
Name :='';//username
Pass :='4';//password
Nick :='';//3-4 non-capital letters from Display Name in-game
Loc :='';//check above for valid locations
Active := True;//use this character or not?
Integers[1] := 9999;//loads before switching
Integers[2] := 30;//minutes to work before switch
Integers[3] := 2;//minutes inbetween player switch
Strings[1] :='';//tree type to cut, list above
end;
{//remove the '{' to have more players
with Players[2] do
begin
Name :='';//username
Pass :='';//password
Nick :='';//3-4 non-capital letters from Display Name in-game
Loc :='';//check above for valid locations
Active := True;//use this character or not?
Integers[1] := 9999;//loads before switching
Integers[2] := 5;//minutes to work before switch
Integers[3] := 1;//minutes inbetween player switch
Strings[1] :='';//tree type to cut, list above
end;
{ with Players[3] do
begin
Name :='';//username
Pass :='';//password
Nick :='';//3-4 non-capital letters from Display Name in-game
Loc :='';//check above for valid locations
Active := True;//use this character or not?
Integers[1] := 9999;//loads before switching
Integers[2] := 25;//minutes to work before switch
Integers[3] := 1;//minutes inbetween player switch
Strings[1] :='regular';//tree type to cut, list above
end;
with Players[4] do
begin
Name :='';//username
Pass :='';//password
Nick :='';//3-4 non-capital letters from Display Name in-game
Loc :='';//check above for valid locations
Active := True;//use this character or not?
Integers[1] := 9999;//loads before switching
Integers[2] := 25;//minutes to work before switch
Integers[3] := 1;//minutes inbetween player switch
Strings[1] :='regular';//tree type to cut, list above
end;}
for I := 0 to (HowManyPlayers - 1) do
With Players[I] do
begin
BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
end;
end;
procedure CheckAxe;//checks to see if theres an axe
//currently uses Reflection, as I learn I hope to change it
var
AxeDTM,x,y: Integer;
begin
if not LoggedIn then
Exit;
AxeDTM := DTMFromString('78DA634C626660C8646440054C601226CA980' +
'6549340404D1C504D1E01350940354544D81549404D21504D340135F' +
'9403589F8D50000298305C3');
GameTab(tab_Inv);
Wait(1000+Random(500));
if FindDTM(AxeDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
begin
Players[CurrentPlayer].Booleans[1] := True;//means axe is in inv
Writeln('Axe found in inventory');
FreeDTM(AxeDTM);
Exit;
end else
begin
GameTab(tab_Equip);
Wait(1000+Random(200));
if FindDTM(AxeDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
begin
Players[CurrentPlayer].Booleans[1] := False;
Writeln('Axe found Equipped');
FreeDTM(AxeDTM);
Exit;
end else
begin
Writeln('Could not find axe');
Players[CurrentPlayer].Loc :='exiting';
FreeDTM(AxeDTM);
Exit;
end;
end;
GameTab(tab_Inv);
end;
procedure SetUpPlayers;
begin
if(not(LoggedIn)) then
LoginPlayer;
Wait(2000+Random(1000));
SetAngle(True);
R_FindRandoms;
CheckAxe;
MarkTime(TimePlayer);
end;
function FinishedLoads:Boolean;
begin
if not LoggedIn then
Exit;
if (Players[CurrentPlayer].Integers[5] >= Players[CurrentPlayer].Integers[1]) then
Result := True;
end;
function Chopping:Boolean;//checks to see if chopping
begin
if not LoggedIn then
Exit;
if CharacterAnimating then
Wait(200+Random(200));
if CharacterAnimating then
Result := True;
end;
function SwitchPlayers:Boolean;//Basic outline used by Bobzilla's Ratinator
var
BreakTime, BreakFor: Integer;
begin
if (TimeFromMark(TimePlayer) >= (Players[CurrentPlayer].Integers[2]*60000)) then
begin
Writeln('Worked for desired time, breaking');
if (PlayersActive > 0) then
begin
BreakFor:=(Players[CurrentPlayer].Integers[3] + Random(2));
Writeln('Breaking for : ' + MsToTime((BreakFor*60000), Time_Formal));
Wait(6000+Random(5000));
Players[CurrentPlayer].Active := True;
Logout;
MarkTime(BreakTime);
repeat
Wait(30000);
Writeln('Break Ends In : '+MsToTime((BreakFor*60000)-TimeFromMark(BreakTime), Time_Formal));
until(TimeFromMark(BreakTime) > BreakFor*60000)
Writeln('Break Complete!');
NextPlayer(true);
SetUpPlayers;
Result := True;
Exit;
end;
Exit;
end;
Result := False;
Exit;
end;
procedure FindLocation;//finds location if lost
var
x,y: Integer;
begin
if not LoggedIn or SwitchPlayers then
Exit;
if (FindSymbol(x,y,'bank')) then
begin
Players[CurrentPlayer].Loc :='banked';
Writeln('Found player at Bank!');
Exit;
end else
if (FindSymbol(x,y,'bar')) then
begin
Players[CurrentPlayer].Loc :='at willows';
Writeln('Found Player at willows!');
Exit;
end else
if (FindSymbol(x,y,'dungeon')) then
begin
Players[CurrentPlayer].Loc :='at trees';
Writeln('Found player at regular trees');
Exit;
end else
if (DistanceFrom(Tile(3057,3265)) < 6) then
begin
Players[CurrentPlayer].Loc :='at oaks';
Writeln('Found player at oak trees!');
Exit;
end else
begin
Writeln('Player could not be found');
Players[CurrentPlayer].Loc :='lost';
Exit;
end;
end;
procedure AntiBan;//custom anti-ban, some from includes
begin
if not LoggedIn or SwitchPlayers then
Exit;
Writeln('Performing Anti-BanHammer procedures');
case Random(35) of
0..2: PickUpMouse;
3..5: ExamineInv;
6..8: begin
HoverSkill('woodcutting',false);
Wait(1500+Random(5000));
GameTab(Tab_Inv);
end;
9..11: BoredHuman;
12..14: begin
GameTab(RandomRange(tab_Combat, tab_Notes));
Wait(1800+Random(3000));
GameTab(Tab_Inv);
end;
15..17: RandomRClick;
18..20: RandomAngle(true);
21..23: RandomMovement;
24..26: MouseBox(MSX1,MMY1,MMX2,MMY2,2);
27..29: PickUpMouse;
30..33: begin
HoverSkill('strength',false);
Wait(1000+Random(4000));
GameTab(Tab_Inv);
end;
34: begin
case Random(6) of//I like a lot to increase variety
0: TypeSend('Woodcutting levels?');
1: TypeSend('wc lvs?');
2: TypeSend('Awfully botty here today');//I love this one
3: TypeSend('sooo booooreeeddd');
4: TypeSend('...zzz...');
5: begin
TypeSend('lol =p');
Wait(1000+Random(1000));
TypeSend('Oops, meant to be in cc');
end;
end;
end;
end;
Inc(AntiBanUsed);
end;
procedure ProgressReport;//nuff said
var
RegCut, WillCut, TExp, TLoads,
i,ii, Logs, OakCut: Integer;
begin
ClearDebug;
RegCut := (RegLoads*28);//logs for a load of reg
WillCut := (WillLoads*28);//same as above
OakCut := (OakLoads*28);
Tloads := (RegLoads + WillLoads + OakLoads);
// TExpBef := TExp
TExp := ((RegLoads*700)+(WillLoads*1876)+(OakLoads*1056));
// TExpInc := (TExp - TExpBef);
//stats_IncVariable('Total EXP Gained', TExpInc);//currently not working
Writeln('[==================================================================]');
Writeln('[ Super Chopper Delux by PatDuffy ]');
Writeln('[==================================================================]');
Writeln('[ Total Time Run: ' + Padr(TimeRunning,41) + ']');
Writeln('[==================================================================]');
if (RegCut > 0) then//only writes if regs cut
Writeln('[ Total Number of Regular Logs Cut: ' + Padr(IntToStr(RegCut), 31) +']');
if (WillCut > 0) then//only writes if wills are cut
Writeln('[ Total Number of Willow Logs Cut: ' + Padr(IntToStr(WillCut), 32) + ']');
if (OakCut > 0) then
Writeln('[ Total Number of Oak Logs Cut: ' + Padr(IntToStr(OakCut),35) + ']');
Writeln('[ Total Number of Loads: ' + Padr(IntToStr(TLoads),42)+ ']');
Writeln('[ Total Number of Experience Gained: ' + Padr(IntToStr(TExp),30) + ']');
Writeln('[ BanHammer Evaded : ' + Padr(IntToStr(AntiBanUsed),46) + ']');
Writeln('[==================================================================]');
for ii:= 0 to High(Players) do
begin
case Players[ii].Booleans[1] of
false: Logs:=(Players[ii].Integers[5]*28);
true: Logs:=(Players[ii].Integers[5]*27);
end;
Writeln('[ Player' + Padl(IntToStr(ii),2) + ':'+ Padl(Players[ii].Nick,5)+ Padl(']',52));
Writeln('[ Loads: ' + Padr(IntToStr(Players[ii].Integers[5]),58) + ']');
case Players[ii].Strings[1] of
'regular': Writeln('[ Regular Logs Cut: ' + Padr(IntToStr(Logs),47) + ']');
'willow': Writeln('[ Willow Logs Cut: ' + Padr(IntToStr(Logs),48) + ']');
'oak': Writeln('[ Oak Logs Cut: ' + Padr(IntToStr(Logs),49) + ']');
end;
Writeln('[ Player Active: ' + Padr(BoolToStr(Players[ii].Active),50) + ']');
Writeln('[==================================================================]');
end;
Stats_Commit;
end;
procedure WalkToBank;//walks to bank using reflection
var
WalkTime,x,y : Integer;
Tiles: TTileArray;
begin
if not LoggedIn or SwitchPlayers then
Exit;
R_FindRandoms;
MarkTime(WalkTime);
Writeln('Walking to Bank');
if RunEnergy(30) then
SetRun(true);
case Players[CurrentPlayer].Strings[1] of
'regular': begin
Tiles :=[Tile(3081,3269), Tile(3080,3264), Tile(3082,3249), Tile(3092,3244)];
WalkPath(Tiles);
end;
'willow': begin
Tiles :=[Tile(3061,3253), Tile(3075,3251), Tile(3086,3248), Tile(3093,3245)];
WalkPath(Tiles);
end;
'oak':begin
Tiles :=[Tile(3057,3265), Tile(3071,3268), Tile(3078,3255), Tile(3083,3249), Tile(3092,3244)];
WalkPath(Tiles);
end;
end;
Wait(500+Random(500));
Players[CurrentPlayer].Loc :='invfull bank';
if (TimeFromMark(WalkTime) > 60000 + Random(30000)) then
begin
Writeln('Failed to walk, checking location');
FindLocation;
Exit;
end;
Exit;
end;
procedure WalkToWillow;//walks to willows
var
WalkTime: Integer;
Tiles: TTileArray;
begin
if not LoggedIn or SwitchPlayers then
Exit;
R_FindRandoms;
MarkTime(WalkTime);
SetAngle(true);
Writeln('Walking to willows');
if RunEnergy(30) then
SetRun(true);
Tiles :=[Tile(3093,3245), Tile(3086,3248), Tile(3075,3251),Tile(3061,3253)];
WalkPath(Tiles);
Wait(1000+Random(500));
Players[CurrentPlayer].Loc :='at willows';
if (TimeFromMark(WalkTime) > 60000 + Random(30000)) then
begin
Writeln('Failed to walk, checking location');
FindLocation;
Exit;
end;
Exit;
end;
procedure WalkToRegular;//walks to regular trees from bank
var
WalkTime: Integer;
Tiles: TTileArray;
begin
if not LoggedIn or SwitchPlayers then
Exit;
R_FindRandoms;
MarkTime(WalkTime);
SetAngle(True);
if RunEnergy(30) then
SetRun(True);
Writeln('Walking to regular trees');
Tiles:=[Tile(3092,3244), Tile(3082,3249), Tile(3080,3264), Tile(3081,3269)];
WalkPath(Tiles);
Wait(1000+Random(500));
Players[CurrentPlayer].Loc :='at trees';
if (TimeFromMark(WalkTime) > 60000 + Random(30000)) then
begin
Writeln('Failed to walk, checking location');
FindLocation;
Exit;
end;
Exit;
end;
procedure WalkToOak;//walks to regular trees from bank
var
WalkTime: Integer;
Tiles: TTileArray;
begin
if not LoggedIn or SwitchPlayers then
Exit;
R_FindRandoms;
MarkTime(WalkTime);
SetAngle(True);
if RunEnergy(30) then
SetRun(True);
Writeln('Walking to Oak Trees');
Tiles:=[Tile(3092,3244),Tile(3083,3249), Tile(3078,3255), Tile(3071,3268), Tile(3057,3265)];
WalkPath(Tiles);
Wait(1000+Random(500));
Players[CurrentPlayer].Loc :='at oaks';
if (TimeFromMark(WalkTime) > 60000 + Random(30000)) then
begin
Writeln('Failed to walk, checking location');
FindLocation;
Exit;
end;
Exit;
end;
procedure Bank;//banks at draynor bank
var
Failures: Integer;
begin
if not LoggedIn then
Exit;
R_FindRandoms;
if OpenBankFast('db') then
begin
Deposit(2,28,true);
CloseBank;
case Players[CurrentPlayer].Strings[1] of
'regular': begin
Inc(RegLoads);
stats_IncVariable('Normal Logs Chopped', 28);
end;
'willow': begin
Inc(WillLoads);
stats_IncVariable('Willow Logs Chopped', 28);
end;
'oak': begin
Inc(OakLoads);
stats_IncVariable('Oak Logs Chopped', 28);
end;
end;
Failures := 0;
Inc(Players[CurrentPlayer].Integers[5]);
stats_IncVariable('Times Banked', 1);
Players[CurrentPlayer].Loc :='banked';
end else
if OpenBankQuiet('db') then
begin
Deposit(2,28,true);
CloseBank;
case Players[CurrentPlayer].Strings[1] of
'regular': begin
Inc(RegLoads);
stats_IncVariable('Normal Logs Chopped', 28);
end;
'willow': begin
Inc(WillLoads);
stats_IncVariable('Willow Logs Chopped', 28);
end;
'oak': begin
Inc(OakLoads);
stats_IncVariable('Oak Logs Chopped', 28);
end;
end;
Failures := 0;
Inc(Players[CurrentPlayer].Integers[5]);
stats_IncVariable('Times Banked', 1);
Players[CurrentPlayer].Loc :='banked';
end else
begin
Writeln('Both banking methods failed');
Inc(Failures);
Wait(200+Random(3000));
Exit;
end;
if (Failures >= 3) then
begin
Writeln('Checking Location, Too many failures');
FindLocation;
Exit;
end;
ProgressReport;
end;
procedure ChopWillow;//chops willow trees
var
x,y,i,ChopTime,Fails,
cx,cy: Integer;
WillColor:Array[0..1] of Integer;
begin
if (not(LoggedIn)) then
Exit;
R_FindRandoms;
FindNormalRandoms;
if SwitchPlayers then Exit;
if(InvFull) then
begin
Players[CurrentPlayer].Loc :='InvFull';
Exit;
end;
WillColor[0]:=5408369;
WillColor[1]:=4683618;
SetAngle(True);
MarkTime(ChopTime);
repeat
if Chopping then
begin
case (Random(100)) of
0..89:Break;
90..100: AntiBan;
end;
Wait(2000+Random(1000));
Fails:=0;
Break;
end;
if SwitchPlayers then
Exit;
for i:=0 to 1 do
if FindObjEx(cx,cy,['hop','dow','ill'],[WillColor[i]],30,40,MSX1,MSY1,MSX2,MSY2)then
begin
case(Random(100)) of
0..49: begin
Mouse(cx,cy,3,3,false);
ChooseOption('hop');
Writeln('Chopping Willow');
Wait(1000+Random(500));
Fails := 0;
Break;
end;
49..100: begin
Mouse(cx,cy,2,2,true);
Writeln('Chopping Willow');
Wait(1000+Random(500));
Fails := 0;
Break;
end;
end;
end else
begin
Writeln('Failed To Find Willows, trying again');
Inc(Fails);
end;
if (Fails >= 15) then
begin
FindLocation;
Exit;
end;
until(InvFull) or (TimeFromMark(ChopTime) > 600000+Random(60000));
end;
procedure ChopRegular;//chops regular trees
var
x,y,i,ChopTime,
cx,cy,Fails: Integer;
RegColor:Array[0..2] of Integer;
begin
if (not(LoggedIn)) then
Exit;
R_FindRandoms;
FindNormalRandoms;
if SwitchPlayers then Exit;
if (InvFull) then
begin
Players[CurrentPlayer].Loc :='InvFull';
Exit;
end;
RegColor[0]:=4355947;
RegColor[1]:=6002570;
RegColor[2]:=3564889;
SetAngle(True);
MarkTime(ChopTime);
repeat
if Chopping then
begin
case (Random(100)) of
0..89:Break;
90..100: AntiBan;
end;
Wait(1000+Random(2000));
Fails:=0
Break;
end;
if SwitchPlayers then
Exit;
if (DistanceFrom(Tile(3082,3279)) < 6) then
begin
WalkToTile(Tile(3081,3269),2,1);
Writeln('Saved player from wandering away');
end;
for i:=0 to 2 do
if FindObjEx(cx,cy,['hop','ree'],[RegColor[i]],23,40,MSX1,MSY1,MSX2,MSY2)then
begin
case(Random(100)) of
0..48: begin
Mouse(cx,cy,3,3,false);
ChooseOption('hop');
Writeln('Chopping Tree');
Wait(1000+Random(1000));
Fails := 0;
Break;
end;
49..100: begin
Mouse(cx,cy,2,2,true);
Writeln('Chopping Tree');
Wait(1000+Random(1000));
Fails := 0;
Break;
end;
end;
end else
begin
Writeln('Failed to find trees, trying again');
Inc(Fails);
end;
if (Fails >= 15) then
begin
FindLocation;
Exit;
end;
until(InvFull) or (TimeFromMark(ChopTime) > 300000+Random(60000));
end;
procedure ChopOak;//chops regular trees
var
x,y,i,ChopTime,
cx,cy,Fails: Integer;
OakColor:Array[0..2] of Integer;
begin
if (not(LoggedIn)) then
Exit;
R_FindRandoms;
FindNormalRandoms;
if SwitchPlayers then Exit;
if (InvFull) then
begin
Players[CurrentPlayer].Loc :='InvFull';
Exit;
end;
OakColor[0]:=4617835;
OakColor[1]:=2511688;
OakColor[2]:=2113593;
SetAngle(True);
MarkTime(ChopTime);
repeat
if Chopping then
begin
case (Random(100)) of
0..89:Break;
90..100: AntiBan;
end;
Wait(1000+Random(2000));
Fails:=0
Break;
end;
if SwitchPlayers then
Exit;
if (DistanceFrom(Tile(3057,3265)) > 5) then
begin
WalkToTile(Tile(3057,3265),2,1);
Writeln('Saved player from wandering away');
end;
for i:=0 to 2 do
if FindObjEx(cx,cy,['ak'],[OakColor[i]],23,40,MSX1,MSY1,MSX2,MSY2)then
begin
case(Random(100)) of
0..48: begin
Mouse(cx,cy,3,3,false);
ChooseOption('hop');
Writeln('Chopping Oak');
Wait(1000+Random(1000));
Fails := 0;
Break;
end;
49..100: begin
Mouse(cx,cy,2,2,true);
Writeln('Chopping Oak');
Wait(1000+Random(1000));
Fails := 0;
Break;
end;
end;
end else
begin
Writeln('Failed to find Oaks, trying again');
Inc(Fails);
end;
if (Fails >= 15) then
begin
FindLocation;
Exit;
end;
until(InvFull) or (TimeFromMark(ChopTime) > 300000+Random(60000));
end;
procedure MainLoopWillow;//the Main Loop for Willows=p
begin
if (not(LoggedIn)) then
Exit;
if not (Players[CurrentPlayer].Strings[1] = 'willow') then
Exit;
repeat
if SwitchPlayers then
Exit;
Case Players[CurrentPlayer].Loc of
'banked': WalkToWillow;
'at willows': ChopWillow;
'InvFull': WalkToBank;
'invfull bank': Bank;
'lost':begin
Writeln('Player is lost, logging out');
NextPlayer(False);
SetUpPlayers;
Exit;
end;
'exiting':begin
Writeln('Error with player, logging out');
NextPlayer(False);
SetUpPlayers;
Exit;
end;
end;
if FinishedLoads then
begin
Logout;
NextPlayer(False);
SetUpPlayers;
Exit;
end;
until(not(Players[CurrentPlayer].Strings[1] ='willow'));
end;
procedure MainLoopRegular;//the Main Loop for Regular Trees=p
begin
if (not(LoggedIn)) then
Exit;
if not (Players[CurrentPlayer].Strings[1] ='regular') then
Exit;
repeat
if SwitchPlayers then
Exit;
Case Players[CurrentPlayer].Loc of
'banked': WalkToRegular;
'at trees': ChopRegular;
'InvFull': WalkToBank;
'invfull bank': Bank;
'lost':begin
Writeln('Player is lost, logging out');
NextPlayer(False);
SetUpPlayers;
Exit;
end;
'exiting':begin
Writeln('Error with player, logging out');
NextPlayer(False);
SetUpPlayers;
Exit;
end;
end;
if FinishedLoads then
begin
Logout;
NextPlayer(False);
SetUpPlayers;
Exit;
end;
until(not(Players[CurrentPlayer].Strings[1] ='regular'));
end;
procedure MainLoopOak;//the Main Loop for Oaks=p
begin
if (not(LoggedIn)) then
Exit;
if not (Players[CurrentPlayer].Strings[1] ='oak') then
Exit;
repeat
if SwitchPlayers then
Exit;
Case Players[CurrentPlayer].Loc of
'banked': WalkToOak;
'at oaks': ChopOak;
'InvFull': WalkToBank;
'invfull bank': Bank;
'lost':begin
Writeln('Player is lost, logging out');
NextPlayer(False);
SetUpPlayers;
Exit;
end;
'exiting':begin
Writeln('Error with player, logging out');
NextPlayer(False);
SetUpPlayers;
Exit;
end;
end;
if FinishedLoads then
begin
Logout;
NextPlayer(False);
SetUpPlayers;
Exit;
end;
until(not(Players[CurrentPlayer].Strings[1] ='oak'));
end;
procedure MainLoop;
begin
if not LoggedIn then
SetUpPlayers;
case Players[CurrentPlayer].Strings[1] of
'willow': MainLoopWillow;
'regular': MainLoopRegular;
'oak': MainLoopOak;
end;
end;
begin
ClearDebug;
SetupSRLStats(52,SRLStats_UserID, SRLStats_Password);
Smart_Signed := Signed;
Smart_Server := World;
Smart_SuperDetail := False;
SetupSRL;
SetupReflection;
DeclarePlayers;
SetUpPlayers;
AddOnTerminate('ProgressReport');
MarkTime(TimePlayer);
repeat
MainLoop;
until(false) or AllPlayersInactive;
end.
qwe