Diabetech

Dead By Daylight Keybind

Aug 25th, 2016
2,775
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.43 KB | None | 0 0
  1. /*
  2. Dead by Daylight script written by Diabetech, helped by people in the community <3
  3.  
  4. READ ME:
  5. Scroll Wheel up or down to do space for struggling, hold the "forward" button on the side of mouse + scroll wheel in order to do A D A D A D alternating for struggling. If that button doesn't work or if you don't have that button, replace "XButton2" with "CapsLock" and use CapsLock instead to toggle it.
  6.  
  7. How to install and use the script:
  8. Visit https://autohotkey.com/ and download Autohotkey. Run Autohotkey as administrator. After installation, in your system tray (right next to the clock), if you don't see Autohotkey, hit the arrow to view all system tray icons. Hit customize, and make sure Autohotkey has "Show icon and notifications" next to it and hit "OK".
  9.  
  10. Next, right click desktop and hit New > Autohotkey Script. Rename it to anything you want. Paste everything after "*/" below into this file. Save file. Double click file. Autohotkey should display in system tray now as well. If you want to test this script without having Dead by Daylight open, remove the #IfWinActive at the beginning and end of the script by adding a ";" without the quotes before the two lines of code.
  11.  
  12. If you DO NOT have your resolution set to 1920 by 1080, then get your resolution and replace the "960, 540" with your x and y variables divided by 2. So if you are running 1600 x 900, you would change it to "800, 450" for example.
  13.  
  14. Mute Active Window Code:
  15. I added another piece of code that I run before the Dead by Daylight Script, going from ^m:: to DetectHiddenWindows Off return". This piece of code will mute an active window for you. I use it while in game to play my own music while running the game. I just hit control + m while inside Dead by Daylight, and it mutes it. And then I just hit play on my music. You can hit control + m in order to enable sound again for the active window. If you don't want this, just delete that piece down below. You might need to run Autohotkey as an administrator for this to work.
  16. */
  17.  
  18. ^m::
  19. DetectHiddenWindows On
  20. WinGetActiveTitle, Active
  21. Run, %A_WinDir%\System32\SndVol.exe, %A_WinDir%\System32\, Hide
  22. WinWaitActive, ahk_class #32770,, 3
  23. WinActivate, ahk_class #32770
  24. Sleep 500
  25. ControlClick, Mute for %Active%
  26. WinKill, ahk_class #32770
  27. DetectHiddenWindows Off
  28. return
  29.  
  30. NumpadSub:: ;Pressing "-" on Numpad suspends Autohotkey. Press again to enable.
  31. MButton:: ;Pressing the Scroll Wheel BUTTON will also enable / disable the script too
  32. Suspend
  33. ToolTip % (A_IsSuspended) ? "Suspended" : "Resumed", 960, 540 ;Will display a tooltip to let you know if script is running
  34. Sleep 500
  35. ToolTip ;Gets rid of ToolTip after .5 seconds
  36. return
  37.  
  38. #NoEnv
  39. #IfWinActive DeadByDaylight ;Add a ";" before this line to test the code without running Dead by Daylight
  40. WheelUp::
  41. WheelDown::
  42. SetKeyDelay, -1, -1
  43. If GetKeyState("XButton2","p") { ;Replace "XButton2" with "CapsLock" if you don't have a forward button on your mouse
  44. toggle:=! toggle
  45. If toggle {
  46. Critical
  47. Send {a down}
  48. Sleep 60
  49. Send {a up}
  50. Critical Off
  51. Sleep -1
  52. } Else {
  53. Send {d down}
  54. Critical
  55. Sleep 60
  56. Send {d up}
  57. Critical Off
  58. Sleep -1
  59. }
  60. } Else {
  61. Critical
  62. Send {Space}
  63. Sleep 60
  64. Critical Off
  65. Sleep -1
  66. }
  67. return
  68. #IfWinActive ;Add a ";" before this line to test the code without running Dead by Daylight
Advertisement
Add Comment
Please, Sign In to add comment