Paul23
2007-11-03 17:49:46
<!– BEGIN TEMPLATE: formanswers –>
Paul23 - SRL Member Application Form
Paul23
What is the meaning to life?
don't know - i'm a programmer - don't do philosphy.
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
in no particular order - c, c#, vb, java, python, flash actionscript, mvs asm, COBOL, PLI, ASM SCI, REXX, JCL, Easytrieve, SQL
Other Communitys
none really
How Long have You Played Runescape
about a year
Are you affilated in anyway with Jagex LTD?
no
—————————————————–
Please write down a paragraph about Yourself.
i have been a professional programmer for over ten years.
As part of my role is support sometimes my day can be a bit quiet and sometimes we would mess around on runescape. As a programmer I can a bit interested in the subject of autoers and such and looked around the place and eventually found here.
I know quite a lot of languages and environments as you can see from the list above but none of them are really quite like this, which is why I find it interesting (this is more fun than professional work anyway)
I've been real busy doing professional qualifications in programming recently and so haven't had time to learn SRL scripting but just recently I've had a go. My script was well liked in the first script area and has been running well when I have been running. Largely ignored in the WoodCutting area (think I'll put a few of my proggies on there as an advertisement).
Hope you accept me to members but even if you guys don't I'll still give you some hard won advice - keep it simple, always simple, simple is the way. never, ever, ever, ever do something complex if there is a simple way. Never optimise code unless there is proof that it needs it. There are far more problems created by people trying to speed up code and introducing errors when the code was fast enough anyway.
Enough of all this, script below, hope to hear from you soon.
I have copied my code into the box below (I'm a little confused as the box doesn't seem wide enough and I can't attach stuff) Oh Well if I've mucked this up could somebody pm me?
Paul
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
——————————————————
<!– END TEMPLATE: formanswers –>
Paul23 - SRL Member Application Form
Paul23
What is the meaning to life?
don't know - i'm a programmer - don't do philosphy.
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
in no particular order - c, c#, vb, java, python, flash actionscript, mvs asm, COBOL, PLI, ASM SCI, REXX, JCL, Easytrieve, SQL
Other Communitys
none really
How Long have You Played Runescape
about a year
Are you affilated in anyway with Jagex LTD?
no
—————————————————–
Please write down a paragraph about Yourself.
i have been a professional programmer for over ten years.
As part of my role is support sometimes my day can be a bit quiet and sometimes we would mess around on runescape. As a programmer I can a bit interested in the subject of autoers and such and looked around the place and eventually found here.
I know quite a lot of languages and environments as you can see from the list above but none of them are really quite like this, which is why I find it interesting (this is more fun than professional work anyway)
I've been real busy doing professional qualifications in programming recently and so haven't had time to learn SRL scripting but just recently I've had a go. My script was well liked in the first script area and has been running well when I have been running. Largely ignored in the WoodCutting area (think I'll put a few of my proggies on there as an advertisement).
Hope you accept me to members but even if you guys don't I'll still give you some hard won advice - keep it simple, always simple, simple is the way. never, ever, ever, ever do something complex if there is a simple way. Never optimise code unless there is proof that it needs it. There are far more problems created by people trying to speed up code and introducing errors when the code was fast enough anyway.
Enough of all this, script below, hope to hear from you soon.
I have copied my code into the box below (I'm a little confused as the box doesn't seem wide enough and I can't attach stuff) Oh Well if I've mucked this up could somebody pm me?
Paul
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
{=========================================================================]
[ ~Paul23's Draynor Willow Banker~ ]
[ ~Version: 0.03 ]
[=========================================================================]
|~Description: |
| A macro that chops a full load of willows in Draynor, |
| then banks it. |
|~Instructions: |
| 1. Set the Runescape brightness to V-bright, and your computer's |
| resolution to 32bit resolution. |
| 2. Developed and tested using SCAR Divi 3.12 |
| 3. Developed and tested using SRL 4 #5 |
| 5. Setup Lines 33-37, and 52-99 |
| 6. Start script in Draynor Bank. |
| 7. Start with a axe in your first inventory slot or wielded. |
| 8. Recomended to have extra axes near top of bank. |
|~Features: |
| AntiBan |
| Randoms (UpToDate With SRL) |
| AutoColor |
| Multiple Players |
| Ented Axe Finding |
[=========================================================================]
program DraynorWillowTrees;
{.include SRL/SRL.scar}
{.Include SRL/SRL/Skill/Woodcutting.Scar}
Const
DebugMode = True; // Will determine whether or not to write Debug Messages to Debug window
StartPlayer = 2; // Player number to start chopping
Loads = 3; // Number of loads.
NumOfPlayers = 7; // Number of users.
YourSRLID = ''; // Must be a string!
YourSRLPASS = ''; // Must be a string!
RemoteControlMasterNickName = ''; // Part of the Remote Control Masters' Name.
Var
BankDTM, WillowDTM, LogMask, AxeMask, BrokenAxeHeadMask: Integer;
NormalRandomsTime, FastRandomsTime, FindTalkTime, CallBTime: LongInt;
NoAxe :Boolean;
MyMark, tx, ty, iWillowLogs, iAxesBroke: Integer;
Procedure DeclarePlayers;
Begin
HowManyPlayers := NumOfPlayers;
NumberOfPlayers( HowManyPlayers );
CurrentPlayer := StartPlayer;
Players[0].Name :='Nelsonthered';
Players[0].Pass :='kievs';
Players[0].Nick :='elso';
Players[0].Active:=True;
Players[0].Loc := 'Bank';
Players[1].Name :='trevorlives';
Players[1].Pass :='igloo';
Players[1].Nick :='revo';
Players[1].Active:=True;
Players[1].Loc := 'Bank';
Players[2].Name :='Kennymatches';
Players[2].Pass :='kippers';
Players[2].Nick :='enny';
Players[2].Active:=True;
Players[2].Loc := 'Bank';
Players[3].Name :='Terrycoat';
Players[3].Pass :='berries';
Players[3].Nick :='erry';
Players[3].Active:=True;
Players[3].Loc := 'Bank';
Players[4].Name :='Kevinjumper';
Players[4].Pass :='orange';
Players[4].Nick :='evin';
Players[4].Active:=True;
Players[4].Loc := 'Bank';
Players[5].Name :='Colinscarf';
Players[5].Pass :='pears';
Players[5].Nick :='olin';
Players[5].Active:=True;
Players[5].Loc := 'Bank';
Players[6].Name :='Petetrainers';
Players[6].Pass :='mango';
Players[6].Nick :='ete';
Players[6].Active:=True;
Players[6].Loc := 'Bank';
Writeln( IntToStr ( HowManyPlayers ) + ' Player[s]' );
End;
Procedure Paul23Debug(TheText: String);
Begin
if (DebugMode) then
Begin
Writeln(TheText);
End;
End;
{--------------------------------------------------------
Function FindFastRandoms: Boolean; // By WT-Fakawi.
FindFastRandoms is a quicker version of FindNormalRandoms.
It does not include ALL the Anti-Randoms though.
--------------------------------------------------------}
Function FindFastRandoms: Boolean; // By WT-Fakawi.
var
i: Integer;
begin
for i:=1 to 10 do
begin
case I of
1: If FindDead then
Result := True;
2: If FindMod then
Result := True;
3: If FindMime then
Result := True;
4: If FindMaze then
Result := True;
5: If FindQuiz then
Result := True;
6: If FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].rand := 'No GameTab';
Logout;
Exit;
end;
end;
8: begin
If InBlack then
begin
Result := True;
Players[CurrentPlayer].rand := 'InBlack';
Logout;
Exit;
end;
end;
9 : If RC Then Result := True;
10: If FindTalk Then Result := True;
End;
Wait(1);
end;
end;
Function FindNormalRandomsTimeEx: Boolean;
Var
TempTime, Time1, Time2: LongInt;
Begin
TempTime := GetSystemTime;
If TempTime - NormalRandomsTime > 6000 Then
Begin
NormalRandomsTime := GetSystemTime;
Time1 := GetSystemTime;
Result := FindNormalRandoms;
Time2 := GetSystemTime;
Status('Calling FNRandoms; Took '+IntToStr(Time2-Time1)+'.');
Exit;
End;
If TempTime - FastRandomsTime > 2000 Then
Begin
FastRandomsTime := GetSystemTime;
Time1 := GetSystemTime;
Result := FindFastRandoms;
Time2 := GetSystemTime;
Status('Calling FFRandoms; Took '+IntToStr(Time2-Time1)+'.');
Exit;
End;
If TempTime - FindTalkTime > 500 Then
Begin
FindTalkTime := GetSystemTime;
Time1 := GetSystemTime;
Result := FindTalk;
Time2 := GetSystemTime;
Status('Calling FT; Took '+IntToStr(Time2-Time1)+'.');
Exit;
End;
End;
Function FindDraynorBank(Var x, y: Integer): Boolean;
Var
BankA: Extended;
Begin
Paul23Debug('Start of FindDraynorBank');
Result:= FindDTMRotated(BankDTM, x, y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, 0.05, BankA);
Paul23Debug('End of FindDraynorBank');
End;
Function FishSymbolCallibrate: Boolean;
Var
x, y: Integer;
Begin
Paul23Debug('FishSymbolCallibrate - Start Of');
If Not LoggedIn Then Exit;
If GetSystemTime - CallBTime < 25000 Then Exit;
CallBTime := GetSystemTime;
Result := FindSymbol(x, y, 'fishing spot');
If Result Then
Begin
Mouse(x, y, 8, 8, True);
Wait(100);
FFlag(0);
Wait(1000);
End;
Paul23Debug('FishSymbolCallibrate - End Of');
End;
Function GetAxeFromBank: Boolean;
Var
x, y: Integer;
Begin
Paul23Debug('GetAxeFromBank - Start of');
If Not LoggedIn Then Exit;
FixBank;
Wait(Random(250)+300);
If(FindBitmapMaskTolerance(AxeMask, x, y, MSX1, MSY1, MSX2, MSY2, 20, 10))then
Begin
Mouse(x, y, 1, 1, True);
Paul23Debug('GetAxeFromBank - Spare Axe retrieved from bank');
NoAxe := False;
EquipAxe := False;
Result := True;
End
else
Begin
Paul23Debug('GetAxeFromBank - Spare Axe Not Found');
Players[CurrentPlayer].Loc:= 'No Axes';
Result := False;
End
Paul23Debug('GetAxeFromBank - End of');
End;
Function DepositLoad: Boolean;
Var
x, y, Tries: Integer;
begin
Paul23Debug('Deposit Load - Start');
If Not LoggedIn Then Exit;
Result := False;
// Get better position on bank
If FindDraynorBank(x, y) Then
Begin
Mouse(x, y, 0, 0, True);
Wait(100);
FFlag(0);
Wait(500);
End;
// Update current players location.
Players[CurrentPlayer].Loc := 'Bank';
// Open the bank screen
Repeat
OpenBankFast('db');
Tries := Tries + 1;
Until ((BankScreen) Or (Tries > 4));
// Deposit load - if we don't have an axe try and get one from bank
If BankScreen Then
Begin
if EquipAxe = true Then
Begin
DepositAll;
End
Else
Deposit(2, 28, 2);
Begin
End
Result := True;
End;
// Close bank
CloseBank;
Paul23Debug('End of Deposit Load');
End;
procedure WalkToBankWillows;
begin
Paul23Debug('WalkToBankNorm - Start');
If Not LoggedIn Then Exit;
FindNormalRandomsTimeEx;
Mouse(650, 30, 5, 5, True);
Wait(4000);
FFlag(0);
Wait(500);
FindNormalRandomsTimeEx;
MakeCompass('N');
Wait(500);
Paul23Debug('WalkToBankNorm - End');
end;
Function WalkToWillows: Boolean;
Begin
Paul23Debug('WalkToWillows - Start');
If Not LoggedIn Then Exit;
FindNormalRandomsTimeEx;
Result := False;
// Calibrate on Fish Symbol then move to bank
FishSymbolCallibrate;
Mouse(623, 134, 5, 5, True);
Wait(6000);
FFlag(0);
Wait(1500);
FindNormalRandomsTimeEx;
Result :=True;
Players[CurrentPlayer].Loc := 'Chopping';
Paul23Debug('WalkToWillows - End of');
end;
Procedure HandleFight;
Begin
Paul23Debug('HandleFight - Start of');
MakeCompass('N');
WalkToBankWillows;
Wait(4000);
WalkToWillows;
MakeCompass('N');
Paul23Debug('HandleFight - End of');
End;
Procedure RandomChopClick;
Begin
Paul23Debug('RandomChopClick - Start of');
If Not LoggedIn Then Exit;
Case Random(5) of
0: Begin
Mouse(tx, ty, 0, 0, False);
ChooseOption('hop');
If Not(IsUpText('hop')) Then
begin
wait(200+Random(1000));
MMouse(tx, ty, 10, 10);
end
else
exit;
end;
1,2,3,4: Begin
Mouse(tx, ty, 0, 0, True);
wait(200+Random(1000));
end;
end;
Paul23Debug('RandomChopClick - End of');
end;
function RandomWillowColor: integer;
Begin
Paul23Debug('Random Willow Color - Start Of');
If Not LoggedIn Then Exit;
Case Random(5) of
0: Result := 3693410;
1: Result := 2655089;
2: Result := 2315338;
3: Result := 2579794;
4: Result := 2967888;
end;
Paul23Debug('Random Willow Color - End Of');
end;
Function CheckEnt(ex, ey: Integer): Boolean;
Var
Xe, Ye: Integer;
Begin
Paul23Debug('CheckEnt - Start Of');
If Not LoggedIn Then Exit;
Result := False;
If(FindColorSpiralTolerance(Xe, Ye, 5535856, ex - 20, ey - 20, ex + 20, ey + 20, 12))then
Begin
Paul23Debug('CheckEnt - Branch 1');
MMouse(Xe, Ye, 5, 5);
Wait(100+Random(50));
End
If(IsUpTextMulti('hop down Will', 'down Willow', 'own Wil')) or (IsUpTextMulti('illow', 'low', 'Will'))then
Begin
If(FindColorSpiralTolerance(Xe, Ye, 383705, 1, 1, 180, 39, 20))or
(FindColorSpiralTolerance(Xe, Ye, 65535, 1, 1, 200, 40, 20))or
(FindColorTolerance(Xe, Ye, 55769, 85, 15, 115, 15, 20))then
Begin
Paul23Debug('Check Ent - Found Ent 2');
Mouse(MMCX, MMCY, 5, 5, True);
FindTalk;
Wait(10000+Random(5000));
FindNormalRandomsTimeEx;
EntsAvoided:= EntsAvoided + 1;
Result := True;
End;
End;
Paul23Debug('CheckEnt - End Of');
End;
Function DetectNoAxe: Boolean;
Var
XH, YH, x, y: Integer;
bAxeNeeded: Boolean;
Begin
Paul23Debug('DetectNoAxe - Start Of');
If Not LoggedIn Then Exit;
Result := False;
// If we are not holding the axe look for it in the inventory
// If not found set bAxeNeeded flag
If(EquipAxe= False)then
Begin
Paul23Debug('DetectNoAxe - Looking for axe in inventory');
GameTab(4);
Wait(50+Random(50));
If(not(FindBitmapMaskTolerance(AxeMask, x, y, MIX1, MIY1, MIX2, MIY2, 20, 10)))then bAxeNeeded:= True;
End
// If we are holding the axe look for it in the equipped page
// If not found set bAxeNeeded flag
If(EquipAxe= True)then
Begin
Paul23Debug('DetectNoAxe - Looking for axe in equipped');
GameTab(5);
Wait(50+Random(50));
If(not(FindBitmapMaskTolerance(AxeMask, x, y, MIX1, MIY1, MIX2, MIY2, 20, 10)))then bAxeNeeded:= True;
End
// If we don't have an axe
If(bAxeNeeded = True)then
Begin
Result := True;
NoAxe := True;
Paul23Debug('DetectNoAxe - We don''t have an Axe, Investigating..');
// If we detect a broken axe - put in inventory
If(FindBitmapMaskTolerance(BrokenAxeHeadMask, XH, YH, MIX1, MIY1, MIX2, MIY2, 20, 25))then
Begin
Mouse(x, y, 1, 1, True);
iAxesBroke:= iAxesBroke + 1;
Paul23Debug('DetectNoAxe - Broken Axe Found!');
Players[CurrentPlayer].Loc:= 'Broken Axe';
Result:= True;
NoAxe := True;
Exit;
End
End
Paul23Debug('DetectNoAxe - End Of');
End;
procedure ChopWillows;
Var iBefore_x, iBefore_y, iCurrent_x, iCurrent_y, iTTimes : Integer;
begin
Paul23Debug('Chop Willows - Start of');
If Not LoggedIn Then Exit;
SetRun(True);
iTTimes := 0;
Repeat
// Check for fight
If FindFight Then HandleFight;
// Check for randoms
FindNormalRandomsTimeEx;
// Save current mouse position
GetMousePos(iBefore_x, iBefore_y);
Paul23Debug('ChopWillows - Before mouse position x:' + IntToStr(iBefore_x) + 'y: ' + IntToStr(iBefore_y));
// Look for Willows
If(FindColorSpiralTolerance(tx, ty, RandomWillowColor, 1, 1, 514, 336, 4)) Then
Begin
// Have found something that matches the color. Check more closely.
wait(150+Random(500));
MMouse(tx, ty, 10, 10);
iTTimes := iTTimes + 1;
// Check for randoms
FindNormalRandomsTimeEx;
Paul23Debug('ChopWillows - Trying to Find Willow Try #: ' + IntToStr(iTTimes));
// If we are struggling a little to find Willows a little we could attempt to
// resync on the fish symbol.
If(iTTimes mod 10 = 0) Then
Begin
FishSymbolCallibrate;
end;
// Check that we are not looping round endlessly
// If it seems like we are then code will exit this routine and head
// back to bank to try and resync.
If(iTTimes > 50) Then
Begin
Paul23Debug('ChopWillows - Didn''t Find Tree after 50 tries.');
iTTimes := 0;
Exit;
end;
// Check that we have a willow
If(IsUpText('illow')) Then
Begin
Paul23Debug('ChopWillows - Have found a willow');
// Check for randoms
FindNormalRandomsTimeEx;
// Check for Ent, then chop the willow.
if not CheckEnt(tx, ty) then
Begin
Paul23Debug('ChopWillows - There is no Ent');
if (DetectNoAxe) then exit;
RandomChopClick;
wait(100);
// Check for randoms
FindNormalRandomsTimeEx;
End;
// Reset mouse parameters onto tree we are chopping
iCurrent_x := iBefore_x + (tx - iBefore_x);
iCurrent_y := iBefore_y + (ty - iBefore_y);
// Check for Randoms and Reset Counter
FindNormalRandomsTimeEx;
iTTimes := 0;
// Loop - we have starting chopping a willow.
// Keep checking the willow and chopping it if it is still there.
// or Inventory is full.
Repeat
Paul23Debug('ChopWillows - Waiting for tree to be gone');
// Check for fight and let the character chop for a little while
If FindFight Then HandleFight;
wait(1000+Random(2000));
// Check for randoms
FindNormalRandomsTimeEx;
wait(1000+Random(2000));
// Reset mouse to the position of the original click
MMouse(iCurrent_x, iCurrent_y, 10, 10);
// If the Willow is still there - chop it again
If (IsUpText('illow')) then
Begin
tx := iCurrent_x;
ty := iCurrent_y;
if not CheckEnt(tx, ty) then
Begin
if (DetectNoAxe) then exit;
RandomChopClick;
End;
End;
// Check for randoms
FindNormalRandomsTimeEx;
// Reset mouse to the position of the original click
MMouse(iCurrent_x, iCurrent_y, 10, 10);
Until(not(IsUpText('illow')) or InvFull)
end;
end;
iTTimes := iTTimes + 1;
If(iTTimes > 50) Then
Begin
Paul23Debug('ChopWillows - Didn''t Find Approxiamate Color of Tree after 50 tries.');
iTTimes := 0;
Exit;
end;
Until(InvFull or Not LoggedIn)
SetRun(False);
Paul23Debug('ChopWillows - At end of routine');
end;
Function CheckAxe: Boolean;
Var
AX, AY, Tries: Integer;
Begin
Paul23Debug('CheckAxe - Start of');
If Not LoggedIn Then Exit;
GameTab(4);
// Look for axe in inventory
If(FindBitmapMaskTolerance(AxeMask, AX, AY, MIX1, MIY1, MIX2, MIY2, 10, 5))then
Begin
Paul23Debug('CheckAxe - Axe Found in Inventory');
EquipAxe:= False;
Result:= True;
End
else
Begin
GameTab(5);
Wait(100+Random(75));
// Look for axe equipped
If(FindBitmapMaskTolerance(AxeMask, AX, AY, MIX1, MIY1, MIX2, MIY2, 10, 5))then
Begin
Paul23Debug('CheckAxe - Axe Found in Equipped Page!');
EquipAxe:= True;
Result:= True;
End
GameTab(4);
End
// Try to get Axe From Bank
if (Result = False) then
Begin
// Open the bankscreen
Repeat
OpenBankFast('db');
Tries := Tries + 1;
Until ((BankScreen) Or (Tries > 4));
// Retrieve an axe
If BankScreen Then
Begin
Result := GetAxeFromBank;
Closebank;
End
End
// If axe has been found
If(Result= True)then
Begin
// Set flags accordingly
NoAxe:= False;
Paul23Debug('CheckAxe - Axe has been found');
End
else
Begin
// No axe logout
Paul23Debug('CheckAxe - Could NOT Find Axe Colors!, Logging Out!');
Players[CurrentPlayer].Loc:= 'No Axe';
Logout;
End
Paul23Debug('CheckAxe - End of');
End;
Procedure Bitmaps;
Begin
BankDTM := DTMFromString('78DA63EC60626008614001FFFFFF676060042' +
'310FB3F6303508D37448E09AAE6ED5B08CD08E583D50413A1269C' +
'809A0AC26A00E665129F');
WillowDTM := DTMFromString('78DA63CC62626078CA80026CCD4419FE03694' +
'620FE0F048C20357718D000231209A413816A1E1350930A54F381' +
'809A12A09AB704D49401D53CC2AF0600C8560D88');
LogMask := BitmapFromString(13, 10, 'z78DA33301805E40037BC8' +
'0BAB6D0C2E5F451494998D02E5471010034299979');
AxeMask := BitmapFromString(10, 10, 'z78DA7373230D18500028316' +
'130E825353470A921DE3DE499409EDB480D25FCE10000B72C7CE1' +
'');
BrokenAxeHeadMask := BitmapFromString(9, 10, 'z78DA7373230D1890' +
'05C8D34BAA2EE2D5E3F21131FEC56FCBE091A53C34007F307225');
End;
Procedure SetupScript;
Begin
ScriptID := '';
SRLID := YourSRLID;
SRLPassword := YourSRLPASS;
RCLoc := 'Bank';
RCMaster := RemoteControlMasterNickName;
DeclarePlayers;
Bitmaps;
LoginPlayer;
wait(2000+Random(4000));
CheckAxe;
NormalRandomsTime := GetSystemTime;
FastRandomsTime := GetSystemTime;
FindTalkTime := GetSystemTime;
CallBTime := GetSystemTime;
End;
Procedure PlayerReport;
Var
Active: string;
I: Integer;
Begin
For I := 0 To HowManyPlayers - 1 Do
Begin
If Players[i].Active = True Then
Begin
Active := 'T';
End
Else
Begin
Active := 'F';
End;
WriteLn((IntToStr(I)) + ' : ' + Players[I].nick + ' = ' +
Active + '; Loc: ' + Players[I].Loc+ '; B: '+
IntToStr(Players[i].Banked)+ ' F lvl: ' +
IntToStr(Players[I].Level[20])+ '; T: ' +
IntToStr(Players[i].Worked));
End;
End;
Procedure ProgressReport;
Begin
WriteLn('----------------------------');
WriteLn('');
WriteLn('Paul23 - Draynor Willow Trees.');
WriteLn('');
Writeln('Worked for '+ TimeRunning);
If Banks > 0 Then WriteLn('Banked '+IntToStr(Banks)+' times.');
If iAxesBroke > 0 Then WriteLn('Axes Broken '+IntToStr(iAxesBroke)+' times.');
WriteLn('');
WriteLn('----------------------------');
PlayerReport;
WriteLn('');
WriteLn('----------------------------');
SendSRLReport;
End;
begin
ClearDebug;
Paul23Debug('After ClearDebug');
SetupSRL;
SetupScript;
Wait(1000);
Repeat
Paul23Debug('MainLoop - Top of main loop');
// This code is for when the player is at the bank
If Players[CurrentPlayer].Loc = 'Bank' Then
Begin
Paul23Debug('MainLoop - In bank state');
MakeCompass('N');
If LoggedIn Then
Begin
// Try to find Normal Trees - if unsuccesfull use next player.
If Not WalkToWillows then
Begin
Paul23Debug('MainLoop - Lost');
Players[CurrentPlayer].Loc := 'Lost';
NextPlayer(False);
CheckAxe;
continue;
End;
End;
End;
//This code is for when the player has made it to the trees
If Players[CurrentPlayer].Loc = 'Chopping' Then
Begin
Paul23Debug('MainLoop - In chopping state');
ChopWillows;
WalkToBankWillows;
// Try to bank - if not able then get NextPlayer
if Not DepositLoad Then
Begin
Paul23Debug('MainLoop - Bank Failed');
Players[CurrentPlayer].Loc := 'Bank Failed';
NextPlayer(False);
GetAllLevels;
CheckAxe;
continue;
End
Else
Begin
Players[CurrentPlayer].Banked := Players[CurrentPlayer].Banked + 1;
Banks := Banks + 1;
CheckAxe;
End;
End;
Paul23Debug('MainLoop - Player Banked ' +
IntToStr(Players[CurrentPlayer].Banked) + ' times');
//This code is when chopping is finished and we return to the bank
If LoggedIn And (Players[CurrentPlayer].Banked Mod Loads = 0) Then
Begin
Paul23Debug('MainLoop - Loads Banked Mod 0');
MarkTime(MyMark);
SetChat('off',1);
Repeat
FindNormalRandomsTimeEx;
Wait(10);
If TimeFromMark(MyMark) > 240000 Then Begin Logout; Break; End;
Until Not LoggedIn;
NextPlayer(True);
CheckAxe;
GetAllLevels;
End;
// This code is for when a player gets logged out. The script will log
// them back in.
If Not LoggedIn Then
Begin
Paul23Debug('MainLoop - Not LoggedIn Calling NextPlayer');
NextPlayer(False);
CheckAxe;
GetAllLevels;
End;
ProgressReport;
Until False;
Paul23Debug('At very end of script');
end.
——————————————————
<!– END TEMPLATE: formanswers –>