Very good work Newbs_r_us , i had a look at the source and everything is clean . +rep
/attachment approved
here is the source :
Code:
; <AUT2EXE VERSION: 3.2.2.0>
; ----------------------------------------------------------------------------
; <AUT2EXE INCLUDE-START: C:\Documents and Settings\Andrew Neufeld.ANDREW\Desktop\AutoSkill.au3>
; ----------------------------------------------------------------------------
$WoWAppName = "World of Warcraft"
$NoAFK = "Basic Paladin AutoSkill v1.0"
$Paused = -1
$ClickSet = 0
$Loops = 0
Global $ToClick = MouseGetPos()
AutoItSetOption("SendKeyDownDelay", 150)
MsgBox(4096, $NoAFK, "Welcome to Newbs_r_ us's Paladin AutoSkill script!"& chr(13) &"This script will run from the tray."& chr(13) &"Character should cast Seal of the Crusader every 20-30 seconds, and heal you every minute or so."& chr(13) &"To get ready for the AutoSkill script please place Seal of the Crusader on the number 7 hotkey" & chr(13) & "and a rank 8 or 9 Holy Light on the - hotkey an you are set to go."& chr(13) &"Press Shift+F1 to un/pause."& chr(13) &"Press Shift+F2 to set cursor position.")
HotKeySet("+{F1}", "ToggleOnOff")
HotKeySet("+{F2}", "SetCurPos")
If (Not WinExists($WoWAppName)) Then
MsgBox(16, $NoAFK, "Please run WoW then run this program.")7
EndIf
While (1)
Sleep(Random(10, 30) * 1000)
If (WinExists($WoWAppName) AND $Paused = -1) Then
$Loops = Mod($Loops + 1, 2)
If ($ClickSet = 1 AND WinActive($WoWAppName)) Then
If ($Loops = 0) Then
ControlSend($WoWAppName, "", "", "-")
Sleep(1000)
EndIf
MouseClick("right", $ToClick[0], $ToClick[1])
Sleep(500)
EndIf
ControlSend($WoWAppName, "", "", "{7}")
Sleep(200)
If ($Loops = 0) Then
Sleep(700)
ControlSend($WoWAppName, "", "", "")
Sleep(700)
EndIf
ElseIf (Not WinExists($WoWAppName)) Then
MsgBox(16, $NoAFK, "Could not find window: " & chr(34) & $WoWAppName & chr(34) & "! Shutting down!")
Exit
EndIf
WEnd
Exit
Func ToggleOnOff()
HotKeySet("+{F1}")
If ($Paused = 1) Then
ToolTip("NoAFK active!", 0, 0)
Beep(1500, 200)
Else
ToolTip("NoAFK disabled!", 0, 0)
Beep(500, 200)
EndIf
$Paused = $Paused * (-1)
Sleep(1000)
ToolTip("")
HotKeySet("+{F1}", "ToggleOnOff")
EndFunc
Func SetCurPos()
HotKeySet("+{F2}")
$ClickSet = 1
Global $ToClick = MouseGetPos()
Beep(750, 200)
ToolTip("Click location set!", 0, 0)
Sleep(1000)
HotKeySet("+{F2}", "SetCurPos")
ToolTip("")
EndFunc
Func ForceWindow($Window)
WinSetState($Window, "", @SW_MAXIMIZE)
WinWaitActive($Window, "", 5000)
Sleep(2000)
EndFunc
; ----------------------------------------------------------------------------
; <AUT2EXE INCLUDE-END: C:\Documents and Settings\Andrew Neufeld.ANDREW\Desktop\AutoSkill.au3>
; ----------------------------------------------------------------------------