there's something wrong with my AUTOIT & DRAGONICA.. it works fine but after 3-5min the game crashes.
here's my script
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.6.1
Author: Stephen
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
; Script Start - Add your code below here
Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate");Sets a hotkey that closes the script
Func Terminate() ;when you press the ESC key
Exit 0
EndFunc
Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script is "Paused"',0,0)
WEnd
ToolTip("")
EndFunc
$DVersion = "Dragonica (Client Ver : 1.4.10)"
#include <GUIConstantsEx.au3>
GUICreate("Stephen's Bot", 335, 100)
GUISetState(@SW_SHOW)
GUICtrlCreateLabel("Press esc to STOP and EXIT", 8, 10)
$startbutton = GUICtrlCreateButton("Start", 18, 40, 300)
$attack = "{x}" ; auto attack
$delay = 150
$selfheal = "{q}" ; slow heal
$healdelay = 950
$healtimer = TimerInit()
$focus = "{4}" ; focus
$focusdelay = 500
$focustimer = TimerInit()
$diffusion = "{S}" ; diffusion canon
$diffusiondelay = 500
$diffusiontimer = TimerInit()
$walk = TimerInit()
$left = "{left down}"
$right = "{right down}"
$leftd = "{left up}"
$rightd = "{right up}"
$move = 0
While 1
$msg = GUIGetMsg()
$msg = $startbutton
ControlSend('Dragonica (Client Ver : 1.4.10)','','',$focus)
sleep($focusdelay)
ControlSend('Dragonica (Client Ver : 1.4.10)','','',$diffusion)
sleep($diffusiondelay)
ControlSend('Dragonica (Client Ver : 1.4.10)','','',$selfheal)
sleep(1500)
While 1
ControlSend('Dragonica (Client Ver : 1.4.10)','','',$attack)
Sleep($delay)
$walktimed = TimerDiff($walk)
If $walktimed < 7000 Then
$move = $left
ControlSend('Dragonica (Client Ver : 1.4.10)','','',$rightd)
EndIf
If $walktimed > 6950 Then
$move = $right
ControlSend('Dragonica (Client Ver : 1.4.10)','','',$leftd)
EndIf
If $walktimed > 13950 Then
$walk = TimerInit()
EndIf
ControlSend('Dragonica (Client Ver : 1.4.10)','','',$move)
Sleep(100)
$shtimed = TimerDiff($healtimer)
If $shtimed > 28000 Then
ControlSend('Dragonica (Client Ver : 1.4.10)','','',$selfheal)
Sleep($healdelay)
$healtimer = TimerInit()
$walk = $walk - 950
EndIf
$ftimed = TimerDiff($focustimer)
If $ftimed > 890000 Then
ControlSend('Dragonica (Client Ver : 1.4.10)','','',$focus)
Sleep($healdelay)
$focustimer = TimerInit()
EndIf
$dctimed = TimerDiff($diffusiontimer)
If $dctimed > 890000 Then
ControlSend('Dragonica (Client Ver : 1.4.10)','','',$diffusion)
Sleep($healdelay)
$diffusiontimer = TimerInit()
EndIf
WEnd
WEnd
thanks for the read... if you can help improve my script it will be greatly appreciated