Simba Code:
program WondersCatherbyFisher;
{$DEFINE SMART}
{$i srl\srl.scar}
{$i reflection\reflection.simba}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
Players[0].Pin := '';
Integers[0] := '';
end;
procedure BankFishes;
begin
if not LoggedIn then
Exit;
if not BankScreen then
R_OpenBankBooth('ctb');
if PinScreen then
InPin(Players[0].Pin);
if BankScreen then
begin
DepositAll;
Withdraw(1, 1, 27);
Closebank;
end;
end;
procedure SetupPlayer;
var
Me: TMe;
begin
Wait(1000+Random(1000));
Me:= GetMe;
Players[CurrentPlayer].Integers[2]:= Me.Levels[Skill_Fishing];
Players[CurrentPlayer].Integers[3]:= Me.Experience[Skill_Fishing];
SetAngle(True);
end;
Procedure WalkToBank;
begin
Walkpath([Tile(3614, 2791), Tile(3611, 2794), Tile(3609, 2798),
Tile(3606, 2798), Tile(3599, 2801), Tile(3593, 2802),
Tile(3586, 2803), Tile(3581, 2803), Tile(3575, 2802),
Tile(3570, 2801), Tile(3570, 2805)]);
end;
procedure WalkToFishingSpot;
begin
Walkpath([Tile(3570, 2801), Tile(3577, 2803), Tile(3592, 2803),
Tile(3597, 2800), Tile(3603, 2797), Tile(3609, 2795),
Tile(3613, 2791)]);
end;
function ClickTheSpot: Boolean;
var
NPCs: array of TNPC;
x, y, i, j: Integer;
SpotTile: TTile;
SpotPoint: TPoint;
begin
NPCs := SortNPCs(GetNPCs);
for i := 0 to High(NPCs) do
begin
if ((NPCs[i].Name = 'Fishing spot')) then
begin
for j := 0 to High(NPCs[i].Actions) do
begin
if (NPCs[i].Actions[j] = 'Cage') then
begin
SpotTile := NPCs[i].Tile
Break;
end;
end;
end;
end;
SpotPoint := TileToMS(SpotTile, 0);
MMouse(SpotPoint.x, SpotPoint.y, 4, 4);
if (r_WaitUpText('age', 800)) then
begin
ClickMouse2(False);
Result := r_WaitOption('age', 800);
end;
end;
procedure TypeOfFishing;
begin
case Players[CurrentPlayer].Integers[0] of
0: Players[CurrentPlayer].Strings[0] := 'Cage';
1: Players[CurrentPlayer].Strings[0] := 'Harpoon';
2: Players[CurrentPlayer].Strings[0] := 'Net';
3: Players[CurrentPlayer].Strings[0] := 'Lure';
4: Players[CurrentPlayer].Strings[0] := 'Bait';
end;
end;
begin
Smart_Server := 32;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
ClearDebug;
SetupSRL;
SetupReflection;
DeclarePlayers;
LoginPlayer;
SetupPlayer;
WalkToBank;
WalkToFishingSpot;
ClickTheSpot;
TypeOfFishing;
CheckHarpoonSpotType;
end.