Allows custon time to hover the skill for, useful for things like fetching where it can be timed to stop just before you finish an invent:
Simba Code:
procedure HoverSkillEx(Skill : variant; Click : Boolean; Time : integer);
var
TP: TPoint;
Skills: TStringArray;
TheSkill: string;
begin
if(not(GameTab(tab_Stats))) then exit;
if ((VarType(Skill) = varInteger) or (VarType(Skill) = varByte)) then
begin
if Skill >= 0 then
TP := SkillToCoords(Skill)
else
repeat
Skill := RandomRange(skill_Attack, skill_Summoning);
TP := SkillToCoords(Skill);
until(GetSkillLevel(TheSkill) > 1)
end else begin
if(Lowercase(Skill) <> 'random')then
TP := SkillToCoords(Skill)
else
repeat
Skills := ['attack','defence','strength','hitpoints','mining','smithing','woodcutting','firemaking','magic',
'fletching','hunter', 'summoning','fishing','construction','herblore','agility','thieving','crafting',
'ranged','slayer','farming', 'prayer', 'runecrafting', 'cooking', 'dungeoneering'];
TheSkill := Skills[Random(Length(Skills))];
TP := SkillToCoords(TheSkill);
until (TP.x > 0) and (GetSkillLevel(TheSkill) > 1);
end;
if(Click)then
begin
Mouse(TP.X, TP.Y, 10, 10, mouse_left);
Wait(Time - (Time / 10) + Random(Time / 5));
CloseWindow;
end else begin
MMouse(TP.x, TP.y, 10, 10);
Wait(Time - (Time / 10) + Random(Time / 5));
end;
end;