I have a very easy fishing script in first script section. Maybe that will help?
PHP Code:
procedure FindFish;
var
i:Integer;
AllNPCs:array of TNPC;
ClickingPoint:TPoint;
begin
AllNPCs := GetNPCs;
for i := 0 to (length(AllNPCs)-1) do
begin
if(AllNPCs[i].Name = 'Fishing spot') then
begin
ClickingPoint := TileToMs(AllNPCs[i].Tile,0);
Mouse(ClickingPoint.x,ClickingPoint.y,10,10,True);
Exit;
end;
end;
end;
Or this one, this will find the closest one:
PHP Code:
procedure FindFish;
var
i,j,k:Integer;
AllNPCs:array of TNPC;
ClickingPoint:TPoint;
begin
AllNPCs := GetNPCs;
k := 9999;
for i := 0 to (length(AllNPCs)-1) do
begin
if(AllNPCs[i].Name = 'Fishing spot') then
begin
if(DistanceFrom(AllNPCs[i].tile) < k) then
begin
k := DistanceFrom(AllNPCs[i].tile);
j := i;
end;
end;
end;
if( j = 0) then
exit;
ClickingPoint := TileToMs(AllNPCs[j].Tile,0);
Mouse(ClickingPoint.x,ClickingPoint.y,10,10,True);
wait(1500+random(1000));
Writeln(' Found fish! ' + IntToStr(AllNPCs[j].Tile.x) + ' ' + IntToStr(AllNPCs[j].Tile.y));
end;
Also add a "if(tileOnMS(AllNPCs[j].Tile)) then" failsafe.