hamster
02-29-2008, 12:08 PM
I was kinda shocked this function isnt in SRL, so I just made my own then...
It checks if there's an equiped item in the given slot -AND- it checks for its name. Handy when using jewelry with charges :-)
function WearingItemCust(i : integer; name : String) : Boolean;
var
x,y : integer;
T: TPoint;
begin
if(WearingItem(i)) then
begin
T := EquipmentCoords(i);
MMouse(T.x, T.y, 5, 5);
Wait(100+random(50));
if(IsUpText(name)) then
Result := True;
end else
writeln('You dont have an item equiped in that slot');
end;
it's kinda untested, so tell me if it works hehe (also, its my first decent function I made)
It checks if there's an equiped item in the given slot -AND- it checks for its name. Handy when using jewelry with charges :-)
function WearingItemCust(i : integer; name : String) : Boolean;
var
x,y : integer;
T: TPoint;
begin
if(WearingItem(i)) then
begin
T := EquipmentCoords(i);
MMouse(T.x, T.y, 5, 5);
Wait(100+random(50));
if(IsUpText(name)) then
Result := True;
end else
writeln('You dont have an item equiped in that slot');
end;
it's kinda untested, so tell me if it works hehe (also, its my first decent function I made)