Sir R. M8gic1an
2008-05-06 17:27:41
{*******************************************************************************
function WithdrawAxe(AxeName:string): Boolean;
By: Rasta Magician
Description: Withdraws the desired axe. Bank Must be Open!
Options: Bronze -> Dragon, 'Best';
*******************************************************************************}
Function WithdrawAxe(AxeName:string): boolean;
var
i, h, bx, by:integer;
begin
if not LoggedIn then exit;
if not BankScreen then exit;
AxeName:=Lowercase(AxeName);
if AxeName <> 'best' then
begin
case AxeName of
'bronze': i:= 0;
'iron' : i:= 1;
'steel' : i:= 2;
'black' : i:= 3;
'mith' : i:= 4;
'addy' : i:= 5;
'rune' : i:= 6;
'dragon': i:= 7;
end;
if FindBitmapToleranceIn(srl_GetBitmap(47+i),bx, by, 60, 60, 454, 292, 10) then
begin
MMouse(bx, by, 2, 2);
wait(250);
if IsUpText('axe') then
begin
GetMousePos(bx, by);
Mouse(bx, by, 0, 0, True);
Result := True;
writeln('withdrawn '+AxeName+' axe succesfully.');
end;
end else begin
writeln('could not withdraw the desired axe.');
Result:= False;
end;
end else begin //if they choose best possible
if Players[CurrentPlayer].Level[20] > 0 then
begin
if Players[CurrentPlayer].Level[20] > 40 then i:= 6 else
if Players[CurrentPlayer].Level[20] > 30 then i:= 5 else
if Players[CurrentPlayer].Level[20] > 20 then i:= 4 else
if Players[CurrentPlayer].Level[20] > 5 then i:= 3
end else
i:= 6;
IncEx(i, 47);
for h:= i DownTo 47 do //not including dragon axe because a member might be in f2p
//begin
if not FindBitmapToleranceIn(srl_GetBitmap(h),bx, by, 60, 60, 454, 292, 10) then
Continue
else begin
MMouse(bx, by, 2, 2);
wait(250);
if IsUpText('axe') then
begin
GetMousePos(bx, by);
Mouse(bx, by, 0, 0, True);
Result := True;
writeln('withdrawn '+AxeName+' axe succesfully.');
exit;
end;
end;
//end;
end;
end;
just a nice addition, i just made this, intended to use it for my script. if this is added, adding one for pickaxes as well wouldn't be a bad idea :)
~RM