Pwnd
2006-04-15 15:36:25
IsInvItem will move the mouse to the slot, check to see if the item is there and then return true or false.
MouseInvItem will do what IsInvItem does and then decides to click it left or right.
MouseInvItem will do what IsInvItem does and then decides to click it left or right.
function IsInvItem(InvItem: string; Slot: integer): boolean;
begin
MMouseItem(Slot);
if(IsUpText('Use ' + InvItem))then
begin
Result:= True;
end else
Result:= False;
end;
function MouseInvItem(InvItem: string; Slot: integer; Click: boolean): boolean;
begin
if(IsInvItem(InvItem, Slot))then
begin
MouseItem(Slot, Click);
Result:= True;
end else
Result:= False;
end;
This is only appropriate for some items knowing that some items don't have "Use" as thier first option.