Sin
2012-04-07 11:04:59
{*By: Sin.
Description: Uses item in selected slot with object in predefined variables
Last Modified: April 7th, 2012*}
function UseItemWith(x,y,rx,ry,Slot:Integer; Uptext:String):Boolean;
begin
if (x > 0) and (y > 0) and (Slot > 0) then
begin
MouseItem(Slot,0);
if OptionsExist(['Use','se'],False) then
begin
Result := True;
ChooseOption('Use');
Mouse(x,y,rx,ry,False);
WaitOption('-> ' + Uptext,1337);
end else exit;
end else exit;
if not Result then
begin
writeLn('Failed to find the Chooseoption');
exit;
end;
end;