
Originally Posted by
Floor66
sorry for my sloppy editing

read up plx, added code with comments
Thanks for the update. Last thing I believe I need is a command for the procedure Spell
Code:
program New;
//these procedures are just things that you make so the MAIN loop can use them, if they aren't put in the main loop they will never do anything
procedure Spell;
begin
MoveMouse(640, 622);
ClickMouse(666, 624, True);
Wait(8000 + Random(500));
MoveMouse(526, 622);
ClickMouse(523, 621, True);
Wait(6000 + Random(500));
end.
procedure SpellWait;
begin
HoldMouse(50, 50, True); //holds the left mouse btn at coordinates 50, 50
Wait(5 * 1000); //waits 5 seconds (5 times 1000 milliseconds, 1000ms = 1sec), change to whatever you want
ReleaseMouse(150, 150, True); //releases the left mouse btn at coordinates 150, 150
end.
//... this is the main loop, the code that will actually be executed
begin
repeat
Spell;
SpellWait;
Wait(5 * 60 * 1000);
until(False);
end.
The way I see this is it will do Spell, then SpellWait. Though what I need is SpellWait to go in effect after 5 or so minutes which putting in a loop for x amount of time would fix that problem for the Spell procedure. Any tips on how to fix that one problem? Thanks in advance.
As in
Code:
procedure Spell
begin
repeat
MoveMouse(640, 622);
ClickMouse(666, 624, True);
Wait(8000 + Random(500));
MoveMouse(526, 622);
ClickMouse(523, 621, True);
Wait(6000 + Random(500));
until(false)
end.
Instead of the false integer, what would be the command for it to loop for x amount of time? This is so it can do the Spell procedure for an x amount of time then move on to the SpellWait procedure then loop the script once again.