Lua CastSpellOnTarget

From ArcEmu-Wiki
Jump to: navigation, search

EXAMPLE

 function (Unit, event)
  if Unit:GetHealthPct() < 50 then
  Unit:CastSpellOnTarget(14561,Unit:GetRandomPlayer(0)) -- example
  end
 end

NORMAL LINE

 Unit:CastSpellOnTarget(the id of the spell,the target)

Remember that the spell should be instant.

Personal tools