Guest User

Untitled

a guest
Apr 22nd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. ;WyLd Ray Script
  2. ;Special thanks to nacitar sevaht for helping
  3.  
  4. #IfWinActive, Darkfall Online
  5.  
  6. ;Set the number of rays you have here
  7. num_rays = 4
  8.  
  9. ;Binds are set here
  10. k_1 = {numpad6} ;Impale9
  11. k_2 = {numpad7} ;Unholy Caress
  12. k_3 = {numpad8} ;Dragon's Breath
  13. k_4 = {numpad9} ;Frost Bite
  14.  
  15. ;Cooldowns are set here
  16. cd_1 = 10000 ;Impale
  17. cd_2 = 6000 ;Unholy Caress
  18. cd_3 = 6000 ;Dragon's Breath
  19. cd_4 = 6000 ;Frost Bite
  20.  
  21. ;Ray priority is set here
  22. p_1 = 1 ;Impale
  23. p_2 = 2 ;Unholy Caress
  24. p_3 = 3 ;Dragon's Breath
  25. p_4 = 4 ;Frost Bite
  26.  
  27. ;Initializes ray availability array to 1 (off cooldown)
  28. While A_Index <= num_rays
  29. {
  30. a_%A_Index% = 1
  31. }
  32.  
  33. Lshift+e::
  34. send {numpad5}
  35. sleep, 250
  36. cur_ray := RayCheck(cur_ray)
  37. KeySend(cur_ray)
  38. Hotkey , ~*Lbutton , TimerStart , On
  39. Return
  40.  
  41. TimerStart:
  42. Hotkey , ~*Lbutton , TimerStart , Off
  43. TimerCreate(cur_ray)
  44. Return
  45.  
  46. ;Subroutine group to reset ray cds
  47. 1:
  48. 2:
  49. 3:
  50. 4:
  51. a_%A_ThisLabel% = 1
  52. Return
  53.  
  54. /*Assigns the value of cur_ray to the first available
  55. ray according to priority
  56. */
  57. RayCheck(cur_ray)
  58. {
  59. global
  60.  
  61. /*Initiates cur_ray to your highest priority ray
  62. in the case of all rays being off cooldown
  63. */
  64. cur_ray := p_1
  65.  
  66. While A_Index <= num_rays
  67. {
  68. ray_number := p_%A_Index%
  69. if (a_%ray_number% = 1)
  70. {
  71. cur_ray := ray_number
  72. Break
  73. }
  74. }
  75. Return cur_ray
  76. }
  77.  
  78. ;Sends the key of the current ray
  79. KeySend(cur_ray)
  80. {
  81. global
  82.  
  83. SendInput , % k_%cur_ray%
  84. Return
  85. }
  86.  
  87. ;Creates a timer to reset the ray cooldown
  88. TimerCreate(cur_ray)
  89. {
  90. global
  91.  
  92. a_%cur_ray% = 0
  93. SetTimer , %cur_ray% , % -cd_%cur_ray%
  94. Return
  95. }
  96.  
  97. Del::Suspend
Add Comment
Please, Sign In to add comment