Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- isMouseShown()
- {
- StructSize := A_PtrSize + 16
- VarSetCapacity(InfoStruct, StructSize)
- NumPut(StructSize, InfoStruct)
- DllCall("GetCursorInfo", UInt, &InfoStruct)
- Result := NumGet(InfoStruct, 8)
- if Result
- return 1
- else
- return 0
- }
- #If !isMouseShown() and WinActive("Darkfall Online")
- ;Ray Script
- #if
- ;Set the number of rays you have here
- num_rays = 5
- ;Set your binds here
- /*Regarding modifiers: Shift = +, Ctrl = ^, Alt = !,
- > < denotes right and left keys respectively.
- Consult the help file for further information
- */
- k_1 = !5 ;Impale
- k_2 = !6 ;DragonBreath
- k_3 = !7 ;Insect
- k_4 = !8 ;Unholy
- k_5 = !9 ;Frost
- ;Tweak cooldowns here
- cd_1 = 6500 ;Impale
- cd_2 = 13500 ;unholy
- cd_3 = 13500 ;dragon
- cd_4 = 9500 ;Frost
- cd_5 = 12000 ;Insect
- ;Set ray priority here, 1 being highest, 6 being lowest
- p_1 = 1 ;Impale
- p_2 = 2 ;Dragons Breath
- p_3 = 3 ;Insect Swarm
- p_4 = 4 ;Unholy
- p_5 = 5 ;Frost
- ;Initializes ray availability array to 1 (off cooldown)
- While A_Index <= num_rays
- {
- r_%A_Index% = 1
- }
- ;Set your ray HotKey here (currently set to T)
- t::
- cur_ray := RayLogic(cur_ray, cur_key, cur_cool)
- Send , %cur_key%
- KeyWait, LButton, D T5
- If (ErrorLevel <> 1)
- {
- r_%cur_ray% = 0
- neg_cur_cool := -cur_cool
- SetTimer , %cur_ray% , %neg_cur_cool%
- }
- Return
- ;Subroutine group to reset ray cds
- 1:
- 2:
- 3:
- 4:
- 5:
- r_%A_ThisLabel% = 1
- Return
- RayLogic(cur_ray, ByRef cur_key, ByRef cur_cool)
- {
- global
- /*Initiates cur_ray to your highest priority ray
- in the case of all rays being off cooldown
- */
- cur_ray := p_1
- /*Assigns the value of cur_ray to the first available
- ray according to priority
- */
- While A_Index <= num_rays
- {
- ray_number := p_%A_Index%
- if (r_%ray_number% = 1)
- {
- cur_ray := ray_number
- Break
- }
- }
- ;Sets the ray's corresponding key and cooldown
- cur_key := k_%cur_ray%
- cur_cool := cd_%cur_ray%
- Return cur_ray
- }
- ;End Ray Script
- +f6::suspend
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement