From: Sawyer
I think that'd be easier than looking in the inventory.. i'll try that.
Would this code work?
Function IsFishing: Boolean;
var
Isfishingxp, Startxp, i:Integer;
begin
Startxp := (GetXPBar(1)+1);
wait(randomrange(10000, 20000));
IsFishingxp := GetXPBar(1);
if (Isfishingxp > Startxp) then
result := True;
if not (Isfishingxp > Startxp) then
result := False;
end;
Using that code, here's how I'd go about this:
Function IsFishing: Boolean;
var
XPA,T: Integer;
begin
Result := False;
if not LoggedIn then
Exit;
XPA := GetXPBar(1);
MarkTime(T);
Repeat
if not LoggedIn then
Exit;
FindNormalRandoms;
if (GetXPBar(1) <> XPA) then
break;
Until(TimeFromMark(T) > 7000) //7 seconds without gaining XP
Result := (GetXPBar(1) <> XPA);
end;
Also, if this function is constantly begin called then you'll want to put more inside of this function's loop, like InvFull checks or anti-bans, ect…