(10-07-2012 09:45 PM)Susannah Wrote: http://www.torhead.com/ability/cuiga4L/c...ve-grenade
http://www.torhead.com/ability/bBidy6u/weakening-blast
http://www.torhead.com/ability/fA4LY43/corrosive-dart
Those are our "dot" abilites that I would love to be able to keep track of more simply, there is another sniper in my raid group with the same specc as me and since we both put up our dots it's hard to see if it's mine or his 
Code:
;Authors: Korrig, tmotd
;
;Settings
;
;Keybinding
Local $quitKey = "\"; Kill script keybind
Local $corrGrenKey = "1"
Local $weakBlastKey = "2"
Local $corrDartKey = "3"
;Tooltip position and dot naming convention
Local $x = 500;
Local $y = 700;
;Soundsettings
Local $soundEnable = True; True enables sound, False disables it
Local $soundVolume = 70; Volume in procent (%)
Local $corrGrenSoundPath = @WindowsDir & "\Media\Characters\Windows Notify.wav"
Local $weakBlastSoundPath = @WindowsDir & "\Media\Characters\Windows Ding.wav"
Local $corrDartSoundPath = @WindowsDir & "\Media\Characters\Windows Error.wav"
;
;General script -> Do not modify if you don't understand it :)
;
;Method jumps
HotKeySet($quitKey, "_Quit")
HotKeySet($corrGrenKey, "_corrGren_Counter")
HotKeySet($weakBlastKey, "_weakBlast_Counter")
HotKeySet($corrDartKey, "_corrDart_Counter")
;Default tooltip
ToolTip("Script active. Hit " & $quitKey & " to stop.", $x, $y)
;Setting sound volume
SoundSetWaveVolume($soundVolume)
;Timer vars
Local $corrGrenTimer = 0
Local $weakBlastTimer = 0
Local $corrDartTimer = 0
;Booleans
Local $tooltipActive = False
Local $playcorrGrenSound = False
Local $playweakBlastSound = False
Local $playcorrDartSound = False
;Print vars
Local $corrGrenPrint;
Local $weakBlastPrint;
Local $corrDartPrint;
;Called when $quitKey is pressed
Func _Quit()
Exit
EndFunc
;Called when $corrGrenKey is pressed
Func _corrGren_Counter()
;Need to set keybinds back to default, then send the keypress
HotKeySet($corrGrenKey)
Send($corrGrenKey)
;Rebind hotkey to function call
HotKeySet($corrGrenKey, "_corrGren_Counter")
If $corrGrenTimer == 0 Then
;Set corrosive grenade timer
$corrGrenTimer = 21
ElseIf $corrGrenTimer > 9 Then
;Nothing, so you can smash the button to cast it.
EndIf
;Making sure that the tooltip only gets shown 1 time, all other times it does nothing because it's get shown already.
If Not $tooltipActive Then
$tooltipActive = True
_ShowTooltip()
EndIf
EndFunc
;Called when $weakBlastKey is pressed, works the same way as corrGren above
Func _weakBlast_Counter()
HotKeySet($weakBlastKey)
Send($weakBlastKey)
HotKeySet($weakBlastKey, "_weakBlast_Counter")
If $weakBlastTimer == 0 Then
$weakBlastTimer = 15
EndIf
If Not $tooltipActive Then
$tooltipActive = True
_ShowTooltip()
EndIf
EndFunc
;Called when $corrDartKey is pressed, works the same way as corrGren above
Func _corrDart_Counter()
HotKeySet($corrDartKey)
Send($corrDartKey)
HotKeySet($corrDartKey, "_corrDart_Counter")
If $corrDartTimer == 0 Then
$corrDartTimer = 15
EndIf
If Not $tooltipActive Then
$tooltipActive = True
_ShowTooltip()
EndIf
EndFunc
;Called when there is a tooltip active
Func _ShowTooltip()
While $corrGrenTimer Or $weakBlastTimer Or $corrDartTimer
;Tooltip updates
If $corrGrenTimer > 0 Then
$corrGrenPrint = "Corrosive Grenade Timer = " & $corrGrenTimer & @CRLF;
If $corrGrenTimer == 1 Then
$playcorrGrenSound = True
EndIf
;Lowering it by a second
$corrGrenTimer -= 1
Else
$corrGrenPrint = "";
EndIf
If $weakBlastTimer > 0 Then
$weakBlastPrint = "Weakening Blast Timer = " & $weakBlastTimer & @CRLF;
If $weakBlastTimer == 1 Then
$playweakBlastSound = True
EndIf
$weakBlastTimer -= 1;
Else
$weakBlastPrint = "";
EndIf
If $corrDartTimer > 0 Then
$corrDartPrint = "Corrosive Dart Timer = " & $corrDartTimer & @CRLF;
If $corrDartTimer == 1 Then
$playcorrDartSound = True
EndIf
$corrDartTimer -= 1;
Else
$corrDartPrint = "";
EndIf
;Showing the tooltip
ToolTip($quitKey & @CRLF & $corrGrenPrint & $weakBlastPrint & $corrDartPrint, $x, $y)
;Making a sound when one or more DoT's have 1 sec left
If $soundEnable Then
If $playcorrGrenSound Then
Soundplay($corrGrensoundPath)
$playcorrGrenSound = False
EndIf
If $playweakBlastSound Then
Soundplay($weakBlastsoundPath)
$playweakBlastSound = False
EndIf
If $playcorrDartSound Then
Soundplay($corrDartsoundPath)
$playcorrDartSound = False
EndIf
EndIf
Sleep(1000)
WEnd
;No more active DoT running
ToolTip($quitKey, $x, $y)
$tooltipActive = False
EndFunc
;This is to keep the script running, but not taking full CPU power
While 1
Sleep(36000000)
WEnd