Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;; Dungeon Defenders -- Tower Stacker
- ;; Made by Double Dark (ffhighwind)
- ;; REQUIREMENTS:
- ;; Host of the game and administrator access.
- ;; USAGE:
- ;; CTRL + {0-9} to stack and place a tower.
- ;; ALT + {0-9} to stack a tower without placing it. This allows you to orient it.
- #SingleInstance Force ;No point having multiple instances, slows down PC
- #IfWinActive, Dungeon Defenders ;Disables hotkeys when the game is minimized or isn't running. This doesn't terminate the script.
- #NoEnv
- #MaxHotkeysPerInterval 20
- #Persistent ;Allows use of global variables instead of just hotkeys
- SendMode Input ;Input|Play|Event|InputThenPlay, ;Faster and more reliable compared to SendEvent
- Menu, tray, Tip, DunDef - Tower Stacker
- CoordMode, Mouse, Screen
- CoordMode, ToolTip, Screen
- SetKeyDelay, 0, 10, Play ; Note that both 0 and -1 are the same in SendPlay mode.
- SetMouseDelay, 0, Play
- If (A_AhkVersion <= "1.1.23")
- {
- msgbox, You need AutoHotkey v1.1.23 or later to run this script. `n`nPlease go to https://autohotkey.com/ and download a recent version.
- exit
- }
- If !A_IsAdmin {
- Run *RunAs "%A_ScriptFullPath%"
- ExitApp
- }
- End::
- ExitApp
- return
- /* You can customize the hotkeys to your liking using the following
- ! ALT, ^ CTRL, + SHIFT, # WIN
- <! (< left key, > right key)
- & means combine keys
- * means any ALT/CTRL/SHIFT
- ~ means pass input through
- $ means can send itself without recursion
- & means combine keys
- Up means fired on release
- Example Hotkey:
- <!#n Up:: ; call when n is released and left alt is down
- return
- */
- StackTower1(Key)
- {
- SendInput, %Key%{Space}
- }
- StackTower2(Key)
- {
- SendInput, %Key%{Space}{Space}
- MouseClick, left,,, 2, 0
- }
- ;;;;;;;;;;; CTRL ;;;;;;;;;;;
- ^0::
- StackTower2(0)
- return
- ^1::
- StackTower2(1)
- return
- ^2::
- StackTower2(2)
- return
- ^3::
- StackTower2(3)
- return
- ^4::
- StackTower2(4)
- return
- ^5::
- StackTower2(5)
- return
- ^6::
- StackTower2(6)
- return
- ^7::
- StackTower2(7)
- return
- ^8::
- StackTower2(8)
- return
- ^9::
- StackTower2(9)
- return
- ;;;;;;;;;;; ALT ;;;;;;;;;;;
- !0::
- StackTower1(0)
- return
- !1::
- StackTower1(1)
- return
- !2::
- StackTower1(2)
- return
- !3::
- StackTower1(3)
- return
- !4::
- StackTower1(4)
- return
- !5::
- StackTower1(5)
- return
- !6::
- StackTower1(6)
- return
- !7::
- StackTower1(7)
- return
- !8::
- StackTower1(8)
- return
- !9::
- StackTower1(9)
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement