Guest User

Untitled

a guest
Jun 23rd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.90 KB | None | 0 0
  1. #IfWinActive, Darkfall Online
  2. #NoEnv
  3.  
  4. ;Set the number of rays you have here
  5. num_rays = 7
  6.  
  7. ;Set your binds here
  8. /*Regarding modifiers: Shift = +, Ctrl = ^, Alt = !,
  9. > < denotes right and left keys respectively.
  10. Consult the help file for further information
  11. */
  12. k_1 = {Numpad7} ;Impale
  13. k_2 = {Numpad8} ;Dragon Breath
  14. k_3 = {Numpad9} ;Unholy Caress
  15. k_4 = {Numpad4} ;Frost Bite
  16. k_5 = {Numpad5} ;Insect Swarm
  17. k_6 = {Numpad6} ;Lightning Bolt
  18. k_7 = {Numpad3} ;Pungent Mist
  19.  
  20. ;Tweak cooldowns here
  21. cd_1 = 6500 ;Impale
  22. cd_2 = 14000 ;Dragon Breath
  23. cd_3 = 14000 ;Unholy Caress
  24. cd_4 = 9500 ;Frost Bite
  25. cd_5 = 13000 ;Insect Swarm
  26. cd_6 = 9000 ;Lightning Bolt
  27. cd_7 = 15000 ;Pungent Mist
  28.  
  29. ;Set ray priority here, 1 being highest, 6 being lowest
  30. p_1 = 1 ;Impale
  31. p_2 = 2 ;Dragon Breath
  32. p_3 = 3 ;Unholy Caress
  33. p_4 = 4 ;Frost Bite
  34. p_5 = 5 ;Insect Swarm
  35. p_6 = 6 ;Lightning Bolt
  36. p_7 = 7 ;Pungent Mist
  37.  
  38. ;Initializes ray availability array to 1 (off cooldown)
  39. While A_Index <= num_rays
  40. {
  41. r_%A_Index% = 1
  42. }
  43.  
  44. ;Set your ray HotKey here (currently set to +FButton)
  45. ~+F::
  46. cur_ray := RayLogic(cur_ray, cur_key, cur_cool)
  47. Send , %cur_key%
  48. While (ErrorLevel = 1)
  49. {
  50. If (GetKeyState("+F", "P") = 1)
  51. Return
  52. KeyWait, Lbutton, T.2
  53. }
  54. r_%cur_ray% = 0
  55. neg_cur_cool := -cur_cool
  56. SetTimer , %cur_ray% , %neg_cur_cool%
  57. Return
  58.  
  59. ;Subroutine group to reset ray cds
  60. 1:
  61. 2:
  62. 3:
  63. 4:
  64. 5:
  65. 6:
  66. 7:
  67. r_%A_ThisLabel% = 1
  68. Return
  69.  
  70. RayLogic(cur_ray, ByRef cur_key, ByRef cur_cool)
  71. {
  72. global
  73.  
  74. /*Initiates cur_ray to your highest priority ray
  75. in the case of all rays being off cooldown
  76. */
  77. cur_ray := p_1
  78.  
  79. /*Assigns the value of cur_ray to the first available
  80. ray according to priority
  81. */
  82. While A_Index <= num_rays
  83. {
  84. ray_number := p_%A_Index%
  85. if (r_%ray_number% = 1)
  86. {
  87. cur_ray := ray_number
  88. Break
  89. }
  90. }
  91.  
  92. ;Sets the ray's corresponding key and cooldown
  93. cur_key := k_%cur_ray%
  94. cur_cool := cd_%cur_ray%
  95.  
  96. Return cur_ray
  97. }
Add Comment
Please, Sign In to add comment