Advertisement
ffhighwind

DD Tower Stacker

Jan 17th, 2018
11,034
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;; Dungeon Defenders -- Tower Stacker
  2. ;; Made by Double Dark (ffhighwind)
  3.  
  4. ;; REQUIREMENTS:
  5. ;; Windowed mode and the host of the game.
  6.  
  7. ;; USAGE:
  8. ;; CTRL + {0-9} to stack and place a tower.
  9. ;; ALT  + {0-9} to stack a tower without placing it. This allows you to orient it.
  10.  
  11. #SingleInstance Force ;No point having multiple instances, slows down PC
  12. #IfWinActive, Dungeon Defenders ;Disables hotkeys when the game is minimized or isn't running. This doesn't terminate the script.
  13. #NoEnv
  14. #MaxHotkeysPerInterval 20
  15. #Persistent ;Allows use of global variables instead of just hotkeys
  16. SendMode Input  ;Input|Play|Event|InputThenPlay, ;Faster and more reliable compared to SendEvent
  17. Menu, tray, Tip, DunDef - Tower Stacker
  18.  
  19. CoordMode, Mouse, Screen
  20. CoordMode, ToolTip, Screen
  21.  
  22. SetKeyDelay, 0, 10, Play  ; Note that both 0 and -1 are the same in SendPlay mode.
  23. SetMouseDelay, 0, Play
  24. If (A_AhkVersion <= "1.1.23")
  25. {
  26.     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.
  27.     exit
  28. }
  29.  
  30.  
  31. End::
  32. ExitApp
  33. return
  34.  
  35.  
  36. /* You can customize the hotkeys to your liking using the following
  37.     ! ALT, ^ CTRL, + SHIFT, # WIN
  38.     <! (< left key, > right key)
  39.     & means combine keys
  40.     * means any ALT/CTRL/SHIFT
  41.     ~ means pass input through
  42.     $ means can send itself without recursion
  43.     & means combine keys
  44.     Up means fired on release
  45.    
  46.     Example Hotkey:
  47.     <!#n Up:: ; call when n is released and left alt is down
  48.     return
  49. */
  50.  
  51. StackTower1(Key)
  52. {
  53.     SendInput, %Key%{Space}
  54. }
  55.  
  56. StackTower2(Key)
  57. {
  58.     SendInput, %Key%{Space}{Space}
  59.     MouseClick, left,,, 2, 0
  60. }
  61.  
  62. ;;;;;;;;;;;  CTRL  ;;;;;;;;;;;
  63.  
  64. ^0::
  65. StackTower2(0)
  66. return
  67.  
  68. ^1::
  69. StackTower2(1)
  70. return
  71.  
  72. ^2::
  73. StackTower2(2)
  74. return
  75.  
  76. ^3::
  77. StackTower2(3)
  78. return
  79.  
  80. ^4::
  81. StackTower2(4)
  82. return
  83.  
  84. ^5::
  85. StackTower2(5)
  86. return
  87.  
  88. ^6::
  89. StackTower2(6)
  90. return
  91.  
  92. ^7::
  93. StackTower2(7)
  94. return
  95.  
  96. ^8::
  97. StackTower2(8)
  98. return
  99.  
  100. ^9::
  101. StackTower2(9)
  102. return
  103.  
  104. ;;;;;;;;;;;  ALT  ;;;;;;;;;;;
  105.  
  106. !0::
  107. StackTower1(0)
  108. return
  109.  
  110. !1::
  111. StackTower1(1)
  112. return
  113.  
  114. !2::
  115. StackTower1(2)
  116. return
  117.  
  118. !3::
  119. StackTower1(3)
  120. return
  121.  
  122. !4::
  123. StackTower1(4)
  124. return
  125.  
  126. !5::
  127. StackTower1(5)
  128. return
  129.  
  130. !6::
  131. StackTower1(6)
  132. return
  133.  
  134. !7::
  135. StackTower1(7)
  136. return
  137.  
  138. !8::
  139. StackTower1(8)
  140. return
  141.  
  142. !9::
  143. StackTower1(9)
  144. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement