Code:
function Rend_Atk(pUnit)
pUnit:CastSpellOnTarget(37662, pUnit:GetMainTank())
end
function SRGuard_OnCombat(pUnit, Event)
pUnit:RegisterEvent("Rend_Atk",10000, 0)
end
function SRGuard_OnLeave(pUnit, Event)
pUnit:RemoveEvents();
end
RegisterUnitEvent(76000, 1, "SRGuard_OnCombat")
RegisterUnitEvent(76000, 2, "SRGuard_OnLeave")
thats the lua code im using for the mob
-----------------------------------
Oh also, an occurance the CastSpellOnTarget works on my server, but the spells are only working on players...mainly my character when around enemy npcs ive scripted their spells instead of targeting the other npcs hit me instead
i have the .invisible command up too so they arnt attacking me just casting spells on me.
Wierd:confused: