Bad Boy JH
2010-05-31 09:25:51
I am trying to get a function which finds me a fishing spot in which I can cage fish, and then start cage fishing (lobsters, karamja), it uses reflection.
Unfortunatly, It can't Find any spots, and I don't know why, anyone else know why?
Unfortunatly, It can't Find any spots, and I don't know why, anyone else know why?
Function Fish:Boolean;
var
TPoint:TPoint;
i: integer;
TheSpots:TNPCArray;
begin
TheSpots := SortNPCs(GetNPCS);
For I := 0 to High(TheSpots) do
begin
if InStrArr('Cage', TheSpots[i].Actions, False) then
begin
TPoint := TileToMS(TheSpots[i].Tile, Random(10));
MMouse(TPoint.x, TPoint.x, 5, 5);
GetMousePos(TPoint.x, TPoint.y);
if WaitUpText('Cage', 350) then
begin
Mouse(TPoint.x, TPoint.y, 0, 0, True)
Result := True;
Break;
end else
begin
Mouse(TPoint.x, TPoint.y, 0, 0, False);
if WaitOption('Cage', 350) then
begin
Result := True;
Break;
end;
end;
end;
end;
end;