wasfer
11-15-2011, 11:55 AM
How do i make this part of code only do CheckRunes; procedure if, it had failed to click on spell, currently the code is doing CheckRunes; every single time. Thanks.
Procedure Spell;
var
x, y, I, Timer1, Timer2: Integer;
begin
if(GetCurrentTab = 28) then
MMouse(601, 341, 2, 2)
else
begin
Writeln('Magic tab not open, opening it!');
Gametab(28);
MMouse(601, 341, 2, 2)
Wait(200 + Random(100));
end;
if WaitUptext('lch', 100) then
Begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, true);
Writeln('Clicked on the spell!');
end else
Writeln('Failed to cast spell,Checking if we got runes!');
MMouse(602, 342, 2, 2)
GetMousePos(x, y);
Mouse(x, y, 0, 0, true);
CheckRunes;
end;
Also if i leave out the -
MMouse(602, 342, 2, 2)
GetMousePos(x, y);
Mouse(x, y, 0, 0, true); - it will not click on the spell and will just check for runes :/(Not always, at start it does not use this part of code to click on spell.)(like 2-3 runs)
Procedure Spell;
var
x, y, I, Timer1, Timer2: Integer;
begin
if(GetCurrentTab = 28) then
MMouse(601, 341, 2, 2)
else
begin
Writeln('Magic tab not open, opening it!');
Gametab(28);
MMouse(601, 341, 2, 2)
Wait(200 + Random(100));
end;
if WaitUptext('lch', 100) then
Begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, true);
Writeln('Clicked on the spell!');
end else
Writeln('Failed to cast spell,Checking if we got runes!');
MMouse(602, 342, 2, 2)
GetMousePos(x, y);
Mouse(x, y, 0, 0, true);
CheckRunes;
end;
Also if i leave out the -
MMouse(602, 342, 2, 2)
GetMousePos(x, y);
Mouse(x, y, 0, 0, true); - it will not click on the spell and will just check for runes :/(Not always, at start it does not use this part of code to click on spell.)(like 2-3 runs)