Brian 10 Posted April 2, 2016 Share Posted April 2, 2016 if (Corruption.IsSpellUsable && Corruption.IsDistanceGood && Corruption.KnownSpell) { if (CorrAura.SpellId == ) { Logging.Write("herea"); Corruption.Launch(); return; }else if(corr20 == false && corr60 == false && ObjectManager.Me.HaveBuff("Eradication") && !ObjectManager.Me.HaveBuff("Bloodlust") && !ObjectManager.Me.HaveBuff("Heroism")) { Logging.Write("hereb"); Corruption.Launch(); corr0 = false; corr20 = true; corr60 = false; return; }else if(corr60 == false && ObjectManager.Me.HaveBuff("Eradication")) { if(ObjectManager.Me.HaveBuff("Bloodlust") || ObjectManager.Me.HaveBuff("Heroism")) { Logging.Write("herec"); Corruption.Launch(); corr0 = false; corr20 = false; corr60 = true; return; } } } So, my issue is that it changes the variables (corr0/corr20/corr60) without actually Launching the spell. Because it loops through this while casting previous spell / on GCD. Is it possible to do something like Corruption.Launch(); //pseudo code if(launch is successful){ corr0 = false; corr20 = false; corr60 = true; } How would I check if the launch is successful? Its an instant spell, so I cant check current spell casting. Also, I don't want to do something like if(Not ON GCD || Not Casting) { } I do not want to do this because I will slow down the routine script way to much. How else to fix issue? Link to comment https://wrobot.eu/forums/topic/2880-checking-if-spell-is-launched/ Share on other sites More sharing options...
Droidz 2738 Posted April 3, 2016 Share Posted April 3, 2016 Hello, this code is not 100% reliable but you can try: Spell Corruption = new Spell("Corruption"); //... var errorCount = wManager.Wow.Helpers.EventsLua.UsedCountByLuaEventsId(wManager.Wow.Enums.LuaEventsId.UI_ERROR_MESSAGE); Corruption.Launch(); bool failled = wManager.Wow.Helpers.EventsLua.UsedCountByLuaEventsId(wManager.Wow.Enums.LuaEventsId.UI_ERROR_MESSAGE) > errorCount; Link to comment https://wrobot.eu/forums/topic/2880-checking-if-spell-is-launched/#findComment-13241 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now