-
Member
Need help with script
if UnitBuffID("target", 23920) and UnitCastingInfo("player") == GetSpellInfo(33786)
then
SpellStopCasting()
CastSpellByID(770, "target")
end
Im getting error "Spell is not ready yet" after stopping cast. Can someone help me?
-
Member
no one? when script is without this part ( UnitCastingInfo("player") == GetSpellInfo(33786) ) - casting spell after this SpellStopCasting() working well
-
Member
Code:
if UnitBuffID("target", 23920) and UnitCastingInfo("player") == GetSpellInfo(33786)
then
SpellStopCasting()
end
if UnitBuffID("target", 23920)
then
CastSpellByID(770, "target")
end
You need to make 2 separate statements for your script.
Last edited by G0tha; 12-21-2015 at 07:24 AM.
-
Member
added ((endCast/100) - GetTime()) < InteruptDelay and works almost perfecly,but the problem is ping and global cooldown, when im casting Cyclone(1.25s) and script stopping after 1.10, sometimes it doesnt work properly - spell isnt ready. but atm its good enough
Later i will try with some loop, maybe it will help
local spellName, _, _, _, startCast, endCast, _, _, canInterrupt = UnitCastingInfo("player")
local kast= {
33786, -- cyclone
48461 -- wraith
}
for _, kast in ipairs(kast) do
local warek = "target"
local ainRange = IsSpellInRange(GetSpellInfo(770), warek)
if UnitExists(warek) and ainRange == 1 then
if PQR_IsCastingSpell(kast)
then
if UnitBuffID(warek, 23920)
then if
((endCast/1000) - GetTime()) < 0.15
then
SpellStopCasting()
CastSpellByID(770, "target")
end
end
end
end
end
Last edited by masohysta; 12-21-2015 at 10:38 AM.
-
Member
Dude just make separate check for Fearie Fire lol.
-
Post Thanks / Like - 1 Thanks
masohysta (1 members gave Thanks to G0tha for this useful post)
-
Member