Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;WyLd Ray Script
- ;Special thanks to nacitar sevaht for helping
- #IfWinActive, Darkfall Online
- ;Set the number of rays you have here
- num_rays = 4
- ;Binds are set here
- k_1 = {numpad6} ;Impale9
- k_2 = {numpad7} ;Unholy Caress
- k_3 = {numpad8} ;Dragon's Breath
- k_4 = {numpad9} ;Frost Bite
- ;Cooldowns are set here
- cd_1 = 10000 ;Impale
- cd_2 = 6000 ;Unholy Caress
- cd_3 = 6000 ;Dragon's Breath
- cd_4 = 6000 ;Frost Bite
- ;Ray priority is set here
- p_1 = 1 ;Impale
- p_2 = 2 ;Unholy Caress
- p_3 = 3 ;Dragon's Breath
- p_4 = 4 ;Frost Bite
- ;Initializes ray availability array to 1 (off cooldown)
- While A_Index <= num_rays
- {
- a_%A_Index% = 1
- }
- Lshift+e::
- send {numpad5}
- sleep, 250
- cur_ray := RayCheck(cur_ray)
- KeySend(cur_ray)
- Hotkey , ~*Lbutton , TimerStart , On
- Return
- TimerStart:
- Hotkey , ~*Lbutton , TimerStart , Off
- TimerCreate(cur_ray)
- Return
- ;Subroutine group to reset ray cds
- 1:
- 2:
- 3:
- 4:
- a_%A_ThisLabel% = 1
- Return
- /*Assigns the value of cur_ray to the first available
- ray according to priority
- */
- RayCheck(cur_ray)
- {
- global
- /*Initiates cur_ray to your highest priority ray
- in the case of all rays being off cooldown
- */
- cur_ray := p_1
- While A_Index <= num_rays
- {
- ray_number := p_%A_Index%
- if (a_%ray_number% = 1)
- {
- cur_ray := ray_number
- Break
- }
- }
- Return cur_ray
- }
- ;Sends the key of the current ray
- KeySend(cur_ray)
- {
- global
- SendInput , % k_%cur_ray%
- Return
- }
- ;Creates a timer to reset the ray cooldown
- TimerCreate(cur_ray)
- {
- global
- a_%cur_ray% = 0
- SetTimer , %cur_ray% , % -cd_%cur_ray%
- Return
- }
- Del::Suspend
Add Comment
Please, Sign In to add comment