Rich
2010-06-02 14:37:07
It's pretty much HoverSkill, but gives you more choice of what to do.
What to do is decided by Action.
What to do is decided by Action.
1 = Hover over Skill 2 = Left click on Skill, leave open window
3 = Left click on Skill, closes window 4 = Right click on Skill{*******************************************************************************
procedure MouseSkill(Skill : string; Action : Integer);
By: R1ch
Description: Performs actions with selected skill under the Skills tab.
1 = Hover over Skill 2 = Left click on Skill, leave open window
3 = Left click on Skill, closes window 4 = Right click on Skill
*******************************************************************************}
procedure MouseSkill(Skill : string; Action : Integer);
var
TP: TPoint;
Skills: TStringArray;
TheSkill: string;
begin
if(not(GameTab(tab_Stats))) then exit;
if(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'];
TheSkill := Skills[Random(Length(Skills))];
TP := SkillToCoords(TheSkill);
until (TP.x > 0) and (GetSkillLevel(TheSkill) > 1);
case Action of
1 : begin
MMouse(TP.x, TP.y, 10, 10);
Wait(1000 + Random(3000));
end;
2, 3 : begin
Mouse(Tp.y, TP.y, 10, 10, True);
if Action = 3 then
begin
Wait(5000 + Random(6500));
CloseWindow;
end;
end;
4: Mouse(TP.x, TP.y, 10, 10, False);
end;
end;Comments?