Sir R. M8gic1an
2009-01-06 08:39:30
{*******************************************************************************
function PickUpFishingEquip(name:string):boolean;
by: Rasta Magician
Description: Finds and Picks up the fishing equipment on the ground
*******************************************************************************}
function PickUpFishingEquip(name:string):boolean;
var
TVFishingArray: TVariantArray;
x, y:integer;
begin
Result := False;
writeln('Looking for equip on the floor');
case lowercase(name) of
'harpoon': TVFishingArray := ['arpoon', 6645357, 14];
'cage': TVFishingArray := ['obster pot', 6974323, 7];
'fly', 'fly fishing': TVFishingArray := ['ly fishing', 872554, 13];
'rod', 'rod fishing': TVFishingArray := ['shing rod', 602951, 15];
'net': TVFishingArray := ['ing net', 1844525, 11];
else begin srl_warn('PickUpFishingEquip', 'Wrong input', warn_AllVersions); exit; end;
end;
FFLag(0);
if (FindObj(x, y, TVFishingArray[0], TVFishingArray[1], TVFishingArray[2])) then
begin
writeln('Found Equip');
Inc(RodsFound);
Result := True;
Mouse(x, y, 0, 0, True)
FFlag(0);
FTWait(5);
end else
writeln('Could not find equip');
end;
ok, i know there is one, but it is bitmap based and the bitmaps are outdated atm :) This is color based, but it is not 100%, i had to increase the wait in my own FindObj because it wouldn't get the UpText on time, the harpoon sometimes misclicks (it searches for the head, and sometimes ends up on the very edge of it).
but it worked pretty good :)
edit: Thanks to Zytex for suggesting and quickly explaining srl_warn();
~RM