Advertisement
Guest User

Untitled

a guest
Apr 30th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.95 KB | None | 0 0
  1. isMouseShown()
  2. {
  3. StructSize := A_PtrSize + 16
  4. VarSetCapacity(InfoStruct, StructSize)
  5. NumPut(StructSize, InfoStruct)
  6. DllCall("GetCursorInfo", UInt, &InfoStruct)
  7. Result := NumGet(InfoStruct, 8)
  8.  
  9. if Result
  10. return 1
  11. else
  12. return 0
  13. }
  14.  
  15.  
  16.  
  17. #If !isMouseShown() and WinActive("Darkfall Online")
  18.  
  19. ;Ray Script
  20. #if
  21. ;Set the number of rays you have here
  22. num_rays = 5
  23.  
  24. ;Set your binds here
  25. /*Regarding modifiers: Shift = +, Ctrl = ^, Alt = !,
  26. > < denotes right and left keys respectively.
  27. Consult the help file for further information
  28. */
  29. k_1 = !5 ;Impale
  30. k_2 = !6 ;DragonBreath
  31. k_3 = !7 ;Insectw
  32. k_4 = !8 ;Unholy
  33. k_5 = !9 ;Frost
  34.  
  35. ;Tweak cooldowns here
  36. cd_1 = 6500 ;Impale
  37. cd_2 = 13500 ;unholy
  38. cd_3 = 13500 ;dragon
  39. cd_4 = 9500 ;Frost
  40. cd_5 = 12000 ;Insect
  41.  
  42. ;Set ray priority here, 1 being highest, 6 being lowest
  43. p_1 = 1 ;Impale
  44. p_2 = 2 ;Dragons Breath
  45. p_3 = 3 ;Insect Swarm
  46. p_4 = 4 ;Unholy
  47. p_5 = 5 ;Frost
  48.  
  49. ;Initializes ray availability array to 1 (off cooldown)
  50. While A_Index <= num_rays
  51. {
  52. r_%A_Index% = 1
  53. }
  54.  
  55. ;Set your ray HotKey here (currently set to T)
  56. t::
  57. send {o}
  58. sleep 550
  59.  
  60. cur_ray := RayLogic(cur_ray, cur_key, cur_cool)
  61. Send , %cur_key%
  62. KeyWait, LButton, D T5
  63.  
  64. If (ErrorLevel <> 1)
  65. {
  66. r_%cur_ray% = 0
  67. neg_cur_cool := -cur_cool
  68. SetTimer , %cur_ray% , %neg_cur_cool%
  69. }
  70. Return
  71.  
  72. ;Subroutine group to reset ray cds
  73. 1:
  74. 2:
  75. 3:
  76. 4:
  77. 5:
  78. r_%A_ThisLabel% = 1
  79. Return
  80.  
  81. RayLogic(cur_ray, ByRef cur_key, ByRef cur_cool)
  82. {
  83. global
  84. /*Initiates cur_ray to your highest priority ray
  85. in the case of all rays being off cooldown
  86. */
  87. cur_ray := p_1
  88.  
  89. /*Assigns the value of cur_ray to the first available
  90. ray according to priority
  91. */
  92. While A_Index <= num_rays
  93. {
  94. ray_number := p_%A_Index%
  95. if (r_%ray_number% = 1)
  96. {
  97. cur_ray := ray_number
  98. Break
  99. }
  100. }
  101.  
  102. ;Sets the ray's corresponding key and cooldown
  103. cur_key := k_%cur_ray%
  104. cur_cool := cd_%cur_ray%
  105.  
  106. Return cur_ray
  107. }
  108. ;End Ray Script
  109.  
  110. +f6::suspend
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement