Program EdgeFisher;
{.Include SRL/SRL.Scar}
Var
WhirlPoolAcc: Extended; //Used for whirlpool finding.
NoRodBank, NoRod, NoFeathers: Boolean; //Used for lost equipment.
Fished, Trout, Salmon, Gained: Integer; //Used in the progress report
Cx, Cy: Integer; //Main Co-ordinates. Used for fishing.
FishingRodColor, FeatherColor: Integer; //Colors.
FishRodColors: TIntegerArray; //Used for lost rods.
FishSymbolColor: Integer; //Fishing symbol color.
FishTimer: Integer; //Normal Timer.
Const
Loads = 50; //Loads until switch
YourSRLID = '30'; //Must be a string!
YourSRLPASS = 'pokemon'; //Must be a string!
Debug = True; //Debug script?
Procedure DeclarePlayers;
Begin
CurrentPlayer := 3;
HowManyPlayers := 4;
NumberOfPlayers( HowManyPlayers );
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=False;
Players[0].Loc := 'Bank'; //Bank
Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Active:=False;
Players[1].Loc := 'Bank';
Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';
Players[2].Active:=False;
Players[2].Loc := 'Bank';
Players[3].Name :='';
Players[3].Pass :='';
Players[3].Nick :='';
Players[3].Active:=True;
Players[3].Loc := 'Bank';
Writeln( IntToStr ( HowManyPlayers ) + ' Player[s]' );
End;
{
<----------------------------------------------------------------->
Function Load(Item: String): Integer;
Description:
Loads the BMP you name.
rod
feather
Made By: JuKKa
<----------------------------------------------------------------->
}
Function Load(Item: String): Integer;
Begin
Case LowerCase(Item) Of
'rod': Result := BitmapFromString(5, 6, 'beNpjYCyP4o9z57HT52BgYASidD/' +
'eEAduCLspSRAoBedmB/L523BB2EBdEHEDBQUgmeTFC1QJkSoO5wcp' +
'AwArUwvg');
'feather': Result := BitmapFromString(7, 5, 'beNpjYGBRZ9u+Zs3W1auAaMv' +
'KFUDEwMAIF4EjiCAaAgoia9y8fDkQQQTRRBgAzi45NQ==');
Else Begin Writeln('No Such Item to load...'); TerminateScript; End;
End;
End;
{
<----------------------------------------------------------------->
Procedure DeBugIt(Info: String);
Description:
Debug it. simple writeln or status
Made By: JuKKa
<----------------------------------------------------------------->
}
Procedure DeBugIt(Info: String);
Begin
If(Debug)Then
Writeln(Info)
Else Status(Info);
End;
{
<----------------------------------------------------------------->
Function FindRandoms: Boolean;
Description:
Returns true if a RuneScape Random is found.
Made By: JuKKa
<----------------------------------------------------------------->
}
Function FindRandoms: Boolean;
Begin
If(FindFight)Then
Begin
RunTo('w', True);
Result := True;
End Else
Result := FindNormalRandoms;
End;
{
<----------------------------------------------------------------->
Function IsFishRod: Boolean;
Description:
Returns true if the fishing rod color is found, if not found
then tries to find the rod and get new colors.
Made By: Wizzup? Small edit by JuKKa
<----------------------------------------------------------------->
}
Function IsFishRod: Boolean;
Var
FishingRod, x, y, z: Integer;
Ar: TPointArray;
Begin
If Not LoggedIn Then Exit;
GameTab(4);
Result := FindColor(x, y, FishingRodColor, MIX1, MIY1, MIX2, MIY2);
If Result Then Exit;
FishingRod := Load('Rod');
If FindBitmapToleranceIn(FishingRod, x, y, MIX1, MIY1, MIX2, MIY2, 50) Then
Begin
z := GetColorToleranceSpeed;
Result := True;
FishingRodColor := GetColor(x, y);
ColorToleranceSpeed(2);
FindColorsTolerance(Ar, FishingRodColor, x - 20, y - 20, x + 20, y + 20, 25);
SetArrayLength(FishRodColors, GetArrayLength(Ar));
ColorToleranceSpeed(z);
For z := 0 To High(Ar) Do
FishRodColors[z] := GetColor(Ar[z].X, Ar[z].Y);
ClearSameIntegers(FishRodColors);
WriteLn('FishingRodColor: ' +IntToStr(FishingRodColor));
End;
FreeBitmap(FishingRod);
End;
{
<----------------------------------------------------------------->
Function IsFeather: Boolean;
Description:
Returns true if the feather color is found, if not found
then tries to find the rod and get new feather colors.
Made By: Wizzup? Small edit by JuKKa
<----------------------------------------------------------------->
}
Function IsFeather: Boolean;
Var
Feather, x, y: Integer;
Begin
If Not LoggedIn Then Exit;
GameTab(4);
Result := FindColor(x, y, FeatherColor, MIX1, MIY1, MIX2, MIY2);
If Result Then Exit;
Feather := Load('Feather');
Result := FindBitmapToleranceIn(Feather, x, y, MIX1, MIY1, MIX2, MIY2, 50);
If Result Then
Begin
FeatherColor := GetColor(x, y);
WriteLn('FeatherColor: ' +IntToStr(FeatherColor));
End
Else
WriteLn('Could not find feathers in inv.');
FreeBitmap( Feather );
End;
{
<----------------------------------------------------------------->
Function FindRod: Boolean;
Description:
Finds lost rods.
Made By: JuKKa
<----------------------------------------------------------------->
}
Function FindRod: Boolean;
Var
I, D, W, X, Y: Integer;
TPA: TPointArray;
T2D: T2DPointArray;
DoubleBreak: Boolean;
Begin
Repeat
Inc(W);
For I:= 0 To High(FishRodColors) Do
Begin
FindColorsSpiralTolerance(MSCX, MSCY, TPA, FishRodColors[i], MSX1, MSY1, MSX2, MSY2, 5);
T2D := TPAtoATPAEx(TPA, 15, 15);
For d:= 0 To High(T2D) Do
Begin
MiddleTPAEx(T2D[d], X, Y);
MMouse(X, Y, 0, 0);
Wait(25);
If(IsUpText('ake Fly'))Then
Begin
Mouse(X, Y, 0, 0, True);
Flag;
Wait(500+Random(400));
DoubleBreak := True;
Break;
End;
End;
If(DoubleBreak)Then
Break;
End;
DoubleBreak := False;
FTWait(1);
NoRod := Not IsFishRod;
Until(W > 4)Or(Not Loggedin)Or(Not NoRod);
Result := Not NoRod;
End;
{
<----------------------------------------------------------------->
Function WaterColorNEW: Integer;
Description:
Checks if u have a watercolor if not it finds it.
Then checks with a findcolor if not found will find water colora again.
Made By: JuKKa
<----------------------------------------------------------------->
}
Function WaterColorNEW: Integer;
Var
X, Y: Integer;
Begin
If(WaterColor = 0)Then
WaterColor := FindWaterColor;
If(FindColor(X, Y, WaterColor, MMx1, MMy1, MMX2, MMY2))Then
Result := WaterColor
Else
Begin
WaterColor := FindWaterColor;
Result := WaterColor;
End;
End;
{
<----------------------------------------------------------------->
Procedure SetupScript;
Description:
Setups the script to work.
Made By: JuKKa
<----------------------------------------------------------------->
}
Procedure SetupScript;
Var
C, I: Integer;
Begin
ClearDeBug;
SetupSRL;
DeclarePlayers;
For C:= 0 To HowManyPlayers-1 Do
For I := 0 To 99 Do
Players[C].Integers[I] := 0;
WhirlPoolAcc := 1.0;
ScriptId := '754';
SRLID := YourSRLID;
SRLPassword := YourSRLPASS;
LoginPlayer;
FindRandoms;
MakeCompass('N');
SetAngle(True);
NoRod := Not IsFishRod;
NoFeathers := Not IsFeather;
End;
{
<----------------------------------------------------------------->
Function FindWhirlPool(x, y: integer): Boolean;
Description:
Returns true if a RuneScape Whirlpool is found at x, y.
Made By: Wizzup?
<----------------------------------------------------------------->
}
Function FindWhirlPool(x, y: integer): Boolean;
Var
FishPoints: TPointArray;
cts: Integer;
Begin
If Not LoggedIn Then Exit;
cts := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsTolerance(FishPoints, 13947343, x - 20, y - 20, x + 20, y + 20, 40)
If Length(FishPoints) > Round(230 * WhirlPoolAcc) Then
Begin
WhirlPools := Whirlpools + 1;
WriteLn('Found Whrilpool! ' + FloatToStr((Length(FishPoints) / 1600.0) * 100)+ '% Change');
Result := True;
End;
ColorToleranceSpeed(cts);
End;
{
<----------------------------------------------------------------->
Procedure AvoidPool;
Description:
Avoids the whirlpool. Should be used after Whirlpool,
In a If()Then statement.
Made By: JuKKa
<----------------------------------------------------------------->
}
Procedure AvoidPool;
Begin
MFNF(MMCX, MMCY, -1, -1);
TypeSend('Poolie!');
Flag;
End;
{
<----------------------------------------------------------------->
Procedure FindColorsTPA(Var AnsTPA: TPointArray; Color, X1, Y1, X2, Y2: Integer);
Description:
Finds the color given on the variable "Color" inside x1, y1, x2, y2.
and stores it to ANSTPA, in a TPOINTARRAY.
Very good for finding symbols with color.
Made By: JuKKa
<----------------------------------------------------------------->
}
Procedure FindColorsTPA(Var AnsTPA: TPointArray; Color, X1, Y1, X2, Y2: Integer);
var
tmpAOTPA: T2DPointArray;
pAOTPA, tmpAL: Integer;
Begin
FindColorsTolerance(AnsTPA, Color, X1, Y1, X2, Y2, 0);
tmpAOTPA := SplitTPAEx(AnsTPA, 10, 5);
tmpAL := getarraylength(tmpAOTPA);
setarraylength(AnsTPA, tmpAL);
for pAOTPA := 0 to tmpAL - 1 do
AnsTPA[pAOTPA] := MiddleTPA(tmpAOTPA[pAOTPA]);
End;
{
<----------------------------------------------------------------->
function WaterWalkEx(StartRadial, EndRadial: Integer; Radius, FFlagBreakOut: Integer): Boolean;
Description:
Walks alongside Water.
StartRadial/EndRadial := Any number between 0-720. 0=N,90=E,180=S,270=W.
Radius: Distance from the centre of minimap, i.e. how far away the mouse clicks. Use numbers 20-72
FFlagBreakOut: Distance to flag where it will break out. 15 - 10 is good.
Xoff, Yoff: Added to found point.
XMod, YMod: deviation from MouseFindFlag. -2 to 2.
Made By: Nielsie95 nice edit by me JuKKa
<----------------------------------------------------------------->
}
function WaterWalkEx(StartRadial, EndRadial, Radius, FFlagBreakOut: Integer): Boolean;
var
tpa: TPointArray;
i: Integer;
begin
Result := False;
if RadialWalkEx(tpa, MMCX, MMCY, WaterColor, 0, StartRadial, EndRadial, Radius) then
for i := 0 to High(tpa) do
Begin
tpa[i].x := tpa[i].x - 2;
While( GetColor(tpa[i].x, tpa[i].y) = WaterColor )Do
tpa[i].x := tpa[i].x - 3;
if MFNF(tpa[i].x - 8, tpa[i].y, 0, -1) then
begin
FFLag(FFlagBreakOut);
Result := True;
Break;
end;
End;
end;
{
<----------------------------------------------------------------->
Function WalkToFish: Boolean;
Description:
Returns True if it successfully walks to fishes.
Made By: JuKKa
<----------------------------------------------------------------->
}
Function WalkToFish: Boolean;
Var
X, Y, W: Integer;
TPA: TPointArray;
Begin
Result := False;
X := MMX2;
Y := MMY2;
WaterColor := WaterColorNEW;
If(FindColorSpiral(X, Y, WaterColor, MMX1, MMY1, MMX2, MMY2))Then
Begin
X := X - 2;
While( GetColor(X, Y) = WaterColor )Do
X := X - 3;
MFNF(X - 5, Y, -1, 1);
FFlag(10);
End Else
Begin
DeBugIt('No Water On Screen...');
Exit;
End;
Repeat
WaterColor := WaterColorNEW;
If(Not WaterWalkEx(220, 100, 70, 10))Then
Break
Else FTWait(1);
Inc(W);
If( FishSymbolColor = 0 )Then
If(FindSymbol(X, Y, 'fish'))Then
Begin
FishSymbolColor := GetSymbolColor(X, Y, 'fish');
DeBugIt('Fish Symbol Color = ' +IntToStr(FishSymbolColor));
End;
If(FishSymbolColor <> 0)Then
Begin
FindColorsTPA(TPA, FishSymbolColor, MMX1, MMY1, MMX2, MMY2);
If(GetArrayLength(TPA) >= 1)Then
Begin
SortTPAFrom(TPA, Point(MMCx, MMCy));
If(Distance( MMCX, MMCY, TPA[0].X, TPA[0].Y) > 45 )Then Continue;
Begin
Result := MFNF(TPA[0].X, TPA[0].Y, -1, -1);
Flag;
If(Result)Then
Break;
End;
End;
End;
If(W > 7)Then
Break;
Until(Not Loggedin);
End;
{
<----------------------------------------------------------------->
Function Fishing(x, y: integer): Boolean;
Description:
Returns True is the RuneScape character is fishing.
Checks for the existance of a certain amount of colors
in a small box around x and y.
Made By: Wizzup?
<----------------------------------------------------------------->
}
Function Fishing(Var fx, fy: Integer): Boolean;
Var
TPA: TPointArray;
Begin
//fY := Y - 20;
FindColorsTolerance(TPA, 334889, fx - 50, fY - 50, fX + 50, fY + 5, 10);
//If it hasnt fished for 45 seconds. It will click aagin.
If(TimeFromMark( FishTimer ) / 1000 > 45)Then
SetArrayLength(TPA, 0);
If(High(TPA) > 10)Then
Begin
Status('Fishing...');
Result := True;
FTWait(2);
End Else Status('Not Fishing...');
//Writeln(InttoStr(High(TPA)));
End;
{
<----------------------------------------------------------------->
Function FishFish(Var X, Y: Integer): Boolean;
Description:
Returns True if pit successfully finds fish.
Avoids whirlpools ;)
Made By: JuKKa
<----------------------------------------------------------------->
}
Function FishFish(Var X, Y: Integer): Boolean;
Var
TPA: TPointArray;
T2D: T2DPointArray;
CTS, I, xx, yy: Integer;
Begin
Result := False;
Flag;
Wait(1000+Random(500));
cts := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 15257001, MSX1, MSY1, MSX2, MSY2, 40);
T2D := TPAtoATPAEx(TPA, 15, 15);
For I:= 0 To High(T2D) Do
Begin
If(High(T2D[I]) < 4)And(High(T2D[I]) > 20)Then Continue;
//Writeln(IntToStr(High(T2D[i])));
MiddleTPAEx(T2D[I], xx, yy);
If( FindWhirlPool(xx, yy) )Then Continue;
MMouse(xx, yy, 0, 0);
Wait(25+Random(25));
If(IsUpText('Lure'))Then
Begin
Mouse(xx, yy, 0, 0, True);
X := XX;
Y := YY;
Flag;
Wait(1000+Random(1000));
Result := True;
MarkTime ( FishTimer );
Break;
End;
End;
ColorToleranceSpeed(cts);
End;
{
<----------------------------------------------------------------->
Function ChangeSpot: Boolean;
Description:
Returns True if it successfully changes fishing spots.
Made By: JuKKa
<----------------------------------------------------------------->
}
Function ChangeSpot: Boolean;
Var
X, Y: Integer;
TPA: TPointArray;
Begin
Result := False;
If( FishSymbolColor = 0 )Then
If(FindSymbol(X, Y, 'fish'))Then
Begin
FishSymbolColor := GetSymbolColor(X, Y, 'fish');
DeBugIt('Fish Symbol Color = ' +IntToStr(FishSymbolColor));
End;
If(FishSymbolColor <> 0)Then
Begin
FindColorsTPA(TPA, FishSymbolColor, MMX1, MMY1, MMX2, MMY2);
If(GetArrayLength(TPA) >= 1)Then
Begin
SortTPAFrom(TPA, Point(MMCx, MMCy));
Result := MFNF(TPA[High(TPA)].X, TPA[High(TPA)].Y, -1, -1);
Flag;
Wait(1000+Random(1000));
End;
End Else Result := True;
End;
{
<----------------------------------------------------------------->
Function FindEdgevilleBank(Var x, y: Integer): Boolean;
Description:
Searches on the RuneScape minimap for a deformed template model.
Uses FindDTMRotated.
Made By: Wizzup? Edit by JuKKa
<----------------------------------------------------------------->
}
Function FindEdgevilleBank(Var x, y: Integer): Boolean;
Var
BankA: Extended;
BankDTM: Integer;
Begin
BankDTM := DTMFromString('78DA636C606260086640012981DC0CFF81342' +
'310FF0702C62EA01A6754357FFE30318840D58000631B508D076E' +
'358C303501B8D53081E8762019815B0D331003004E3D1231');
{
DTMFromString('78DA632C636260B0654001FFFEFD63F80FA41' +
'981F83F1030D603D5D841E498A06ADEBE65601081AA0101C606A0' +
'8C19116AF408A86905CA68E15703005601134D');
}
Result := FindDTMRotated(BankDTM, x, y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, 0.01, BankA);
FreeDTM( BankDTM );
End;
{
<----------------------------------------------------------------->
Function WalkToBank: Boolean;
Description:
Returns True if u successfully walk to bank.
Made By: JuKKa
<----------------------------------------------------------------->
}
Function WalkToBank: Boolean;
Var
X, Y, W: Integer;
FoundBankers: Boolean;
Begin
Result := False;
Repeat
WaterColor := WaterColorNEW;
If(Not WaterWalkEx( 360 - 40, 360 + 80, 70, 10))Then
Break
Else FTWait(1);
Inc(W);
If(W > 3)Then
If(FindEdgevilleBank(X, Y))Then
Begin
Result := MFNF(x, y, -1, 1);
Flag;
FoundBankers := True;
End;
If(FoundBankers)Then
If(FindEdgevilleBank(X, Y))Then
If(Distance(X, Y, MMCX, MMCY) <= 10)Then
Break;
If(W > 7)Then
Break;
Until(Not Loggedin);
End;
{
<----------------------------------------------------------------->
Function CountItemColorTol(Color, Tol: Integer): Integer;
Description:
Counts how many of the given color there is in ur inventory.
Made By: JuKKa
<----------------------------------------------------------------->
}
Function CountItemColorTol(Color, Tol: Integer): Integer;
Var
Dx, Dy, I: Integer;
ItemTp: TPoint;
Begin
GameTab(4);
For I:= 3 To 28 Do
Begin
ItemTP:= ItemCoords(I);
If(FindColorTolerance(Dx,Dy,Color,ItemTP.X-10,ItemTP.Y-10,ItemTP.X+10,ItemTP.Y+10, Tol))Then
Result:= Result + 1;
End;
End;
{
<----------------------------------------------------------------->
Procedure FishInfo;
Description:
Basic.. This procedure is a must have if u have a progresreport.
Basically it just gives all the info for the progressreport.
Without this all the numbers would be 0 :((( LIKE YOU! Lolz
Made By: JuKKa
<----------------------------------------------------------------->
}
Procedure FishInfo;
Var
TSalmon, TTrout: Integer;
Begin
TSalmon := CountItemColorTol(7240638, 5);
TTrout := CountItemColorTol(12171714, 5);
Debugit('Trouts = ' + IntToStr(TTrout)+' Salmons = ' + IntToStr(TSalmon));
Fished := Fished + TSalmon + TTrout;
Salmon := Salmon + TSalmon;
Trout := Trout + TTrout;
Gained := Gained + (TSalmon * 80) + (TTrout * 50);
Banks := Banks + 1;
Players[CurrentPlayer].Integers[0] := Players[CurrentPlayer].Integers[0] + TSalmon + TTrout;
Players[CurrentPlayer].Integers[1] := Players[CurrentPlayer].Integers[1] + TTrout;
Players[CurrentPlayer].Integers[2] := Players[CurrentPlayer].Integers[2] + TSalmon;
Players[CurrentPlayer].Integers[3] := Players[CurrentPlayer].Integers[3] + (TSalmon * 80) + (TTrout * 50);
Players[CurrentPlayer].Banked := Players[CurrentPlayer].Banked + 1;
ReportVars[0] := ReportVars[0] + TSalmon + TTrout;
ReportVars[1] := ReportVars[1] + TSalmon;
ReportVars[2] := ReportVars[2] + TTrout;
ReportVars[3] := ReportVars[3] + (TSalmon * 80) + (TTrout * 50);
End;
{
<----------------------------------------------------------------->
Function Bank: Boolean;
Description:
Returns True if u successfully bank ur fish.
Made By: JuKKa
<----------------------------------------------------------------->
}
Function Bank: Boolean;
Var
Rod, Feather, W, X, Y: Integer;
Begin
Result := False;
If(Not BankScreen)Then
Repeat
OpenBankFast('eb');
Wait(100);
Inc( W );
Until(BankScreen) Or ( W >= 10 );
If( W >= 10) And ( Not BankScreen)Then
Begin
DeBugIt('Couldnt Find Bank...');
Exit;
End;
If(BankScreen)Then
Begin
FishInfo;
Deposit(3, 28, True);
NoRod := Not IsFishRod;
If( NoRod )Then
Begin
FixBank;
Rod := Load('Rod');
If(FindBitmapToleranceIn(Rod, x, y, MSX1, MSY1, MSX2, MSY2, 25))Then
Begin
Mouse(X, Y, 5, 5, True);
Wait(500+Random(300));
End;
NoRod := Not IsFishRod;
NoRodBank := NoRod;
FreeBitmap(Rod);
End;
NoFeathers := Not IsFeather;
If( NoFeathers )Then
Begin
FixBank;
Feather := Load('Feather');
If(FindBitmapToleranceIn(Feather, x, y, MSX1, MSY1, MSX2, MSY2, 25))Then
Begin
Mouse(X, Y, 5, 5, False);
ChooseOption('X');
Wait(1200+random(1200));
TypeSend(Inttostr((28 - InvCount) - 1));
Wait(1500+random(1500));
End;
NoFeathers := Not IsFeather;
FreeBitmap(Feather);
End;
Result := CloseBank;
End;
End;
{
<----------------------------------------------------------------->
Procedure ProgressReport;
Description:
Prints useful info to the debug box. (below all this code)
WorkingTime
TimeLeft
Fished
Trouts
Salmons
Exp
Banks
Players report!
Made By: JuKKa
<----------------------------------------------------------------->
}
Procedure ProgressReport;
Var
I: Integer;
Begin
Writeln('<------------------------------------------------------------------->');
Writeln(' JuKKa Edgeville Fisher & Banker');
Writeln('<------------------------------------------------------------------->');
Writeln(' Worked ' + TimeRunning);
Writeln(' Fished ' + IntToStr( Fished )+' Fishes');
Writeln(' Trouts ' + IntToStr( Trout )+'');
Writeln(' Salmons ' + IntTostr( Salmon )+'');
Writeln(' Gained ' + IntToStr( Gained )+' Exp.');
Writeln(' Banked ' + IntToStr( Banks )+' Loads');
Writeln('<------------------------------------------------------------------->');
Writeln(' # - Status - Fished - Trouts - Salmons - Gained - Banked - Location');
For I:= 0 To HowManyPlayers-1 Do
Begin
{ Developers test ;)
For P:= 0 To 4 Do
Players[I].Integers[P] := Random(1000);
If(Random(5) > 2)Then
Players[I].Active := True;
}
Writeln(' ' + Padr(IntToStr(I), Length(' - S'))
+ Padr(BoolToStr(Players[I].Active), Length(' - Fished'))
+ Padr(IntToStr(Players[I].Integers[0]), Length(' - Trouts'))
+ Padr(IntToStr(Players[I].Integers[1]), Length('- Salmons'))
+ Padr(IntToStr(Players[I].Integers[2]), Length(' - Gained'))
+ Padr(IntToStr(Players[I].Integers[3]), Length(' - Banked'))
+ Padr(IntToStr(Players[i].Banked), Length(' Location'))
+ Padr(Players[I].Loc, Length('')));
End;
Writeln('<------------------------------------------------------------------->');
SRLRandomsReport;
End;
{
<----------------------------------------------------------------->
MainLoop
Description:
This is the mainloop. This script is experimental.
Made By: JuKKa
<----------------------------------------------------------------->
}
Begin
SetupScript;
Repeat
If( Loggedin ) And (Players[CurrentPlayer].Loc = 'Banked')Then
Begin
DeBugIt(' > Walking to fish!');
If(WalkToFish)Then
Players[CurrentPlayer].Loc := 'Fish'
Else Players[CurrentPlayer].Loc := 'Lost';
End;
If( Loggedin ) And (Players[CurrentPlayer].Loc = 'Fish')Then
Begin
NoRod := Not IsFishRod;
NoFeathers := Not IsFeather;
If( Not NoRod )And( Not NoFeathers )Then
If(Not Fishing(Cx, Cy))Then
If(Not FishFish(Cx, Cy))Then
If(Not ChangeSpot)Then
Players[CurrentPlayer].Loc := 'Fished';
If( NoFeathers )Then
Players[CurrentPlayer].Loc := 'Fished';
If( NoRod )Then
If(Not FindRod)Then
Begin
Writeln('Couldnt find rod...');
Players[CurrentPlayer].Loc := 'Fished'
End Else
Begin
Writeln('Rod Found!');
Inc( RodsFound );
End;
If( FindRandoms )Then
Players[CurrentPlayer].Loc := 'Fished';
If( FindWhirlPool(Cx, Cy) )Then
Begin
AvoidPool;
Players[CurrentPlayer].Loc := 'Fished';
End;
If(InvFull)Then
Players[CurrentPlayer].Loc := 'Fished';
End;
If( Loggedin ) And (Players[CurrentPlayer].Loc = 'Fished')Then
Begin
DeBugIt(' > Walking to bank!');
If(WalkToBank)Then
Players[CurrentPlayer].Loc := 'Bank'
Else Players[CurrentPlayer].Loc := 'Lost';
End;
If( Loggedin ) And (Players[CurrentPlayer].Loc = 'Bank')Then
Begin
DeBugIt(' > Banking!');
If(Bank)Then
Players[CurrentPlayer].Loc := 'Banked'
Else Players[CurrentPlayer].Loc := 'Lost';
End;
If(LoggedIn)And(Not NoFeathers)And(Not NoRodBank)And
(Players[CurrentPlayer].Banked Mod Loads = 0 )And
(Players[CurrentPlayer].Loc <> 'Lost')Then
Begin
Players[CurrentPlayer].Active := True;
ProgressReport;
Repeat
FTWait(1);
Until(Not LoggedIn);
NextPlayer(True);
FindRandoms;
MakeCompass('N');
SetAngle(True);
NoRod := Not IsFishRod;
NoFeathers := Not IsFeather;
End Else
If( Not LoggedIn ) Or ( NoRodBank ) Or ( NoFeathers ) Or (Players[CurrentPlayer].Loc = 'Lost')Then
Begin
Players[CurrentPlayer].Active := False;
ProgressReport;
Repeat
FTWait(1);
Until(Not LoggedIn);
NextPlayer(False);
FindRandoms;
MakeCompass('N');
SetAngle(True);
NoRod := Not IsFishRod;
NoFeathers := Not IsFeather;
End;
Until(False);
End.