Advertisement
Guest User

Untitled

a guest
Apr 30th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.93 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 ;Insect
  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.  
  58.  
  59. cur_ray := RayLogic(cur_ray, cur_key, cur_cool)
  60. Send , %cur_key%
  61. KeyWait, LButton, D T5
  62.  
  63. If (ErrorLevel <> 1)
  64. {
  65. r_%cur_ray% = 0
  66. neg_cur_cool := -cur_cool
  67. SetTimer , %cur_ray% , %neg_cur_cool%
  68. }
  69. Return
  70.  
  71. ;Subroutine group to reset ray cds
  72. 1:
  73. 2:
  74. 3:
  75. 4:
  76. 5:
  77. r_%A_ThisLabel% = 1
  78. Return
  79.  
  80. RayLogic(cur_ray, ByRef cur_key, ByRef cur_cool)
  81. {
  82. global
  83. /*Initiates cur_ray to your highest priority ray
  84. in the case of all rays being off cooldown
  85. */
  86. cur_ray := p_1
  87.  
  88. /*Assigns the value of cur_ray to the first available
  89. ray according to priority
  90. */
  91. While A_Index <= num_rays
  92. {
  93. ray_number := p_%A_Index%
  94. if (r_%ray_number% = 1)
  95. {
  96. cur_ray := ray_number
  97. Break
  98. }
  99. }
  100.  
  101. ;Sets the ray's corresponding key and cooldown
  102. cur_key := k_%cur_ray%
  103. cur_cool := cd_%cur_ray%
  104.  
  105. Return cur_ray
  106. }
  107. ;End Ray Script
  108.  
  109. +f6::suspend
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement