The following is a script that is written to work with AutoHotKey, software which allows you to target inputs from the user from the keyboard, mouse, or otherwise and cause other things to happen as a result. For instance, using AutoHotKey you could make it so that if you hit Ctrl+Shift+F that Firefox would open a new window. It is really open ended to whatever you want it to do.
This script is written for DDO with hotbar actions in mind.
Maybe you are a cleave machine that cycles through cleave, great cleave, momentum swing, lay waste, and other skills that grant extra +W damage when used.
Maybe you are a spell caster who has certain spells you like to cycle through.
Or maybe you have skills that can buff you, but have to be renewed after a certain amount of time.
In those cases, managing the cooldowns on the skills is important. This script is intended to give you an extra tool towards improving this management. You get to define what actions you want to execute, in what order they should execute, and tell it how long the action will be on cooldown before it can be used again. The script will look from top to bottom for the first action that is not on cooldown any longer and will execute it once again.
I've used a form of this for a while and only recently modified it to be in this more flexible state. I can say without a doubt not having to worry so much about cooldown management is something I greatly appreciated. I hope if you are one of those people who is a hotbar action using maniac, you will give it a try and see what you can make it do for you.
So anyways, how does it work and what do you need? Well, first you need AutoHotKeys.
https://www.autohotkey.com/
This script was written with the latest version(1.1.24.04) which you can download from their site. It's freeware.
Once you get that installed, all you have to do to create an AutoHotKey script is open up your favorite text editor and save a new file as "something.ahk" (personally I like to have one per character so I name them after my character so I know which is which). Once you do that, the file will be recognized as an AutoHotKey script and double clicking it will cause the script to start. Once it starts you will see a little green box with an `H` in it in your taskbar. Right clicking on that taskbar icon will give you some options, such as being able to Exit the script.
Now, once you got that down, you're ready to use the AutoHotKey HotBar Manager script.
Code:
; Text on a line after a semi-colon is a comment and ignored
; Only allow a single instance of the script to run
#SingleInstance Force
TheScriptIsEnabled := false
WhenTheLeftMouseButtonWasClicked := 0
HotbarActions := []
;PURPOSE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; * The purpose of this script is to help manage the use of common actions performed by a
; character during battle, by executing skills as they come off of cooldown as soon as
; they are available.
; * To toggle the script enabled/disabled simply hit the `Pause` button on your keyboard.
; * To terminate the script hit Shift+Esc.
; * When enabled the script will wait for the user to hold down the left mouse button for
; a specified amount of time before beginning to cycle through the defined actions.
;END;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;CHARACTER SETTINGS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; * Edit the following to customize the script for your character.
; * The order of hotbar actions is the order in which the script will try to execute
; them, so put them in whatever order you feel will maximize your experience.
; * You can include all or none of the optional variables when defining your hotbar
; actions. The variables between the `{}` can be in any order you wish.
;
; The following is the amount of time (in milliseconds) that the script will wait after
; you have begun to hold down your left mouse button before starting to cycle through the
; hotbar actions. This is to try to help distinguish between actual battle vs simple
; single clicks.
TheDelayBeforeStarting := 1000
; The following specifies your primary hotbar. This is the hotbar you typically keep in
; focus while you play. If you are not sure which one this is, when you hit a number it
; should try to execute one of your actions on one of your hotbars. The hotbar that
; contains the action executed by you hitting a number is your primary bar. The primary
; bar will be switched to each time the script starts evaluating the held left mouse
; button and, in the case that a defined hotbar action specifies that it is on another
; hotbar, the primary hotbar will be switched back to after that action has been executed.
PrimaryHotbar := 1
; Most actions have some sort of animation that happens before the next action can start.
; Outside of the script this is not an issue, but with the script trying to keep track of
; when an action was last executed, actions being delayed due to stacking of animations
; can potentially be an issue. To address this the script will wait the following amount
; of time (in milliseconds) before trying to find the next action to execute. Adjust this
; if the majority of your animations are longer/shorter.
AnimationDelay := 700
; The following details the options for defining a hotbar action.
; Action[required] - The number you would normally hit to activate the action on the
; hotbar.
; Cooldown[required] - The amount of time (in milliseconds) the action must wait before
; being executed again.
; Hotbar[optional] - The hotbar that the action is on.
; Delay[optional] - The amount of time (in milliseconds) to add to the AnimationDelay
; after executing an action to allow for the animation to finish. A negative value
; will reduce the delay.
; LastUsed[required] - A variable used to keep track of when the action was last executed.
; This should always be zero.
; Example - copy, paste, and edit the text after the `;` to define a hotbar action
;HotbarActions.Push({ "action": 2, "cooldown": 7000, "hotbar": 2, "delay": 200, "lastUsed": 0 })
; Example - you can also send non-hotbar commands, such as the left alt button for firing a rune arm
;HotbarActions.Push({"action": "LAlt", "cooldown": 3000, delay: -500, "lastUsed": 0})
HotbarActions.Push({"action": 0, "cooldown": 3000, "lastUsed": 0})
HotbarActions.Push({"action": 6, "cooldown": 3000, "lastUsed": 0})
HotbarActions.Push({"action": 7, "cooldown": 10000, "lastUsed": 0})
HotbarActions.Push({"action": 8, "cooldown": 15000, "lastUsed": 0})
HotbarActions.Push({"action": 7, "cooldown": 15000, "hotbar": 6, "lastUsed": 0})
;END;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Do not edit any of the following unless you know what you are doing, \,,/(^_^)\,,/
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Enable/Disable the script
~*Pause::
TheScriptIsEnabled := ( TheScriptIsEnabled == false )
return
; Terminate the script
+Escape::
ExitApp
return
#IfWinActive, Dungeons and Dragons Online
~*LButton::
if ( TheScriptIsEnabled ) {
WhenTheLeftMouseButtonWasClicked := A_TickCount
LoopActionsWhileLeftMouseButtonIsClicked()
}
return
#IfWinActive
LoopActionsWhileLeftMouseButtonIsClicked() {
global TheDelayBeforeStarting
global WhenTheLeftMouseButtonWasClicked
while GetKeyState( "LButton" ) {
if ( WhenTheLeftMouseButtonWasClicked + TheDelayBeforeStarting < A_TickCount ) {
SwitchToHotbar( PrimaryHotbar )
Sleep ExecuteFirstActionNotOnCooldownAndReturnDelay()
}
}
return 0
}
ExecuteFirstActionNotOnCooldownAndReturnDelay() {
global AnimationDelay
global HotbarActions
global PrimaryHotbar
DelayAfterLoopFinishes := AnimationDelay
ShouldSwitchBackToPrimaryBar := false
Loop % HotbarActions.MaxIndex() {
if ( HotbarActions[ A_Index ].lastUsed + HotbarActions[ A_Index ].cooldown < A_TickCount ) {
if ( HotbarActions[ A_Index ].HasKey( "delay" ) ) {
if ( AnimationDelay + HotbarActions[ A_Index ].delay >= 0 ) {
DelayAfterLoopFinishes := ( AnimationDelay + HotbarActions[ A_Index ].delay )
} else {
DelayAfterLoopFinishes := 0
}
}
if ( HotbarActions[ A_Index ].HasKey( "hotbar" ) ) {
SwitchToHotbar( HotbarActions[ A_Index ].hotbar )
ShouldSwitchBackToPrimaryBar := true
}
action := HotbarActions[ A_Index ].action
SendInput {%action%}
HotbarActions[ A_Index ].lastUsed := A_TickCount
if ( ShouldSwitchBackToPrimaryBar ) {
SwitchToHotbar( PrimaryHotbar )
}
break
}
}
return DelayAfterLoopFinishes
}
SwitchToHotbar( ByRef HotBarNumber ) {
SendInput {Blind}^{%HotBarNumber%}
}
I tried to include very detailed comments concerning the settings that you can change and how you can define your hotbar actions. If you have questions though feel free to ask.