Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function SynCurse()
- --Essences can be converted (between 3 lesser and 1 greater instantly while in combat without initiating the global cooldown.
- --These will be used to track the current state. There are 4 states: CoR, CoS, CoE, and default.
- --Essence type 1 to be used for CoR state, using slots 61 and 62 on my action bars.
- --Essence type 2 to be used for CoS state, using slots 65 and 66 on my action bars.
- --Essence type 3 to be used for CoE state, using slots 69 and 70 on my action bars.
- if (IsUsableAction(61) == 1) then --Checking for CoR state
- SynCurse_Corbolt()
- elseif (IsUsableAction(65) == 1) then --Checking for CoS state
- SynCurse_Cosbolt()
- elseif (IsUsableAction(69) == 1) then --Checking for CoE state
- SynCurse_Coebolt()
- elseif (not buffed("Curse of Recklessness", "Target")) then --default state, start checking for missing curses. State change when a curse is found missing and cast.
- UseAction(62) --CoR state 'on'
- UseAction(65) --CoS state 'off'
- UseAction(69) --CoE state 'off'
- CastSpellByName("Curse of Recklessness")
- --print("Casting CoR")
- elseif (not buffed("Curse of Shadow", "Target")) then
- UseAction(61)
- UseAction(66)
- UseAction(69)
- CastSpellByName("Curse of Shadow")
- --print("Casting CoS")
- elseif (not buffed("Curse of the Elements", "Target")) then
- UseAction(61)
- UseAction(65)
- UseAction(70)
- CastSpellByName("Curse of the Elements")
- --print("Casting CoE")
- else
- CastSpellByName("Shadow Bolt") --cast shadow bolt if you are in default state after checking for all curses
- SynCurse_Reset() --reset to default state just in case
- end
- end
- function SynCurse_Corbolt()
- if (not buffed("Curse of Recklessness", "Target")) then
- SynCurse_Reset() --if the curse was resisted or failed to apply after casting then return to default state
- else
- CastSpellByName("Shadow Bolt")
- end
- end
- function SynCurse_Cosbolt()
- if (not buffed("Curse of Shadow", "Target")) then
- SynCurse_Reset()
- else
- CastSpellByName("Shadow Bolt")
- end
- end
- function SynCurse_Coebolt()
- if (not buffed("Curse of the Elements", "Target")) then
- SynCurse_Reset()
- else
- CastSpellByName("Shadow Bolt")
- end
- end
- function SynCurse_ResetCheck() --return to default state on dropping combat, dropping target, or changing target
- if ((not UnitAffectingCombat("player")) or (UnitName("target") == nil)) then
- SynCurse_Reset()
- end
- TargetLastTarget() --target previous target
- if (UnitIsUnit("Player", "Target") == 1) then --if current target is me then target previous target
- TargetLastTarget()
- else --otherwise set previous target as me and reset to default state
- TargetLastTarget()
- TargetByName("Synek", true)
- TargetLastTarget()
- SynCurse_Reset()
- end
- end
- function SynCurse_Reset() --resets essences to default state, setting all other states to 'off'
- UseAction(61)
- UseAction(65)
- UseAction(69)
- end
- --TO DO:
- --1) Resetting on target swap can still not working perfectly
- --2) Change cor state to coe state + cos state to reduce required number of action bar slots
- --3) Add intelligent use of lifetap, major mana pots, and dark/demonic runes
- --4) Add SynBuff functionality when out of combat
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement