Guest User

Untitled

a guest
Jan 19th, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. #NoEnv
  2. #Warn
  3. #MaxHotkeysPerInterval 500000
  4. SendMode Input
  5. SetWorkingDir %A_ScriptDir%
  6. SetStoreCapslockMode, off
  7.  
  8. #If !isMouseShown() and WinActive("Darkfall Online")
  9.  
  10. ;Set the number of rays you have here
  11. num_rays = 6
  12. cur_ray = 1
  13.  
  14. ;Binds are set here
  15. k_1 = y ;Impale
  16. k_2 = u ;unholy
  17. k_3 = j ;frost
  18. k_4 = k ;dragon
  19. k_5 = n ;Insect Swarm
  20. k_6 = \ ;Lightning Bolt
  21.  
  22. ;Cooldowns are set here
  23. cd_1 = 6500 ;Impale
  24. cd_2 = 14000 ;unholy
  25. cd_3 = 9500 ;frost
  26. cd_4 = 14000 ;dragon
  27. cd_5 = 13000 ;Insect Swarm
  28. cd_6 = 9000 ;Lightning Bolt
  29.  
  30. ;Ray priority is set here
  31. p_1 = 1 ;Impale
  32. p_2 = 2 ;Frost Bite
  33. p_3 = 3 ;Dragon's Breath
  34. p_4 = 4 ;Unholy Caress
  35. p_5 = 5 ;Insect Swarm
  36. p_6 = 6 ;Lightning Bolt
  37.  
  38. RayOnGCD := 0
  39. RayQueued := 0
  40.  
  41. While A_Index <= num_rays
  42. {
  43. a_%A_Index% = 1
  44. }
  45.  
  46. return
  47.  
  48. ~*q::
  49. shootray:
  50. if(RayOnGCD == 0)
  51. {
  52. cur_ray := RayCheck(cur_ray)
  53. KeySend(cur_ray)
  54. TimerCreate(cur_ray)
  55. Sleep, 40
  56. MouseClick, Left
  57. RayOnGCD := 1
  58. SetTimer, RayOffGCD, -1250
  59. }
  60. else
  61. {
  62. RayQueued := 1
  63. }
  64. Return
  65.  
  66. TimerStart:
  67. Hotkey , ~LButton , TimerStart , Off
  68. TimerCreate(cur_ray)
  69. Return
  70.  
  71. RayOffGCD:
  72. RayOnGCD := 0
  73. if(RayQueued == 1)
  74. {
  75. RayQueued := 0
  76. goto, shootray
  77. }
  78. return
  79.  
  80. 1:
  81. 2:
  82. 3:
  83. 4:
  84. 5:
  85. 6:
  86. a_%A_ThisLabel% = 1
  87. Return
  88.  
  89. RayCheck(cur_ray)
  90. {
  91. global
  92.  
  93. cur_ray := p_1
  94.  
  95. While A_Index <= num_rays
  96. {
  97. ray_number := p_%A_Index%
  98. if (a_%ray_number% = 1)
  99. {
  100. cur_ray := ray_number
  101. Break
  102. }
  103. }
  104. Return cur_ray
  105. }
  106.  
  107. KeySend(cur_ray)
  108. {
  109. global
  110.  
  111. SendInput , % k_%cur_ray%
  112. Return
  113. }
  114.  
  115. TimerCreate(cur_ray)
  116. {
  117. global
  118.  
  119. a_%cur_ray% = 0
  120. SetTimer , %cur_ray% , % -cd_%cur_ray%
  121. Return
  122. }
  123.  
  124. ~w::
  125. Send, {F12 down}
  126. Return
  127.  
  128. ~w Up::
  129. Send, {F12 up}
  130. Return
  131.  
  132. ~e::
  133. Send, {PgUp}
  134. Send, {NumpadDiv}
  135. Send, {NumpadMult}
  136. Send, {Down}
  137. Send, {Right}
  138. Send, {End}
  139. return
  140.  
  141. ~x::
  142. Send, {F9}
  143. Send, {F10}
  144. return
  145.  
  146. ~Tab::
  147. Sleep, 600
  148. Send, o
  149. return
  150.  
  151. isMouseShown()
  152. {
  153. StructSize := A_PtrSize + 16
  154. VarSetCapacity(InfoStruct, StructSize)
  155. NumPut(StructSize, InfoStruct)
  156. DllCall("GetCursorInfo", UInt, &InfoStruct)
  157. Result := NumGet(InfoStruct, 8)
  158.  
  159. if Result
  160. return 1
  161. else
  162. return 0
  163. }
Add Comment
Please, Sign In to add comment