Sign in to follow this  
Followers 0
acidfear

How to add timer?

6 posts in this topic

This program i made allows you to glitch a merc for Diablo 2. It works fine, i just want to add a timer. So when you start the glitch 2 minutes later it will stop.

heres my code:

HotKeySet("{f11}", "stop") 
hotkeyset("{home}", "start")
hotkeyset("{end}", "close")



 
 while 1        ;sleeps until function is pressed     
     sleep(20)  
     WEnd

 
 func start()           ;starts click
     
while 1

Mouseclick("left",365,156,1,3)
sleep(200)
WEnd

EndFunc

func stop()   ; stops and idles the bot
while 1
    sleep(10)
    WEnd
EndFunc


func close()   ; closes the bot
    Exit
    EndFunc

Share this post


Link to post
Share on other sites



But you were correct, I had the TimerInit() in the loop, oops. :D

Make sure the TimerInit() is not in the loop or it will reset every time it loops and so it will never reach 120000 milliseconds and thus never exit the loop. :D


Share this post


Link to post
Share on other sites

SWEET! Thanks guys :D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0