Lua GetRandomFriend

From ArcEmu-Wiki
Jump to: navigation, search


Selects a nearby unit that is friendly to the scripted unit's faction. Has been reported to not work in some cases.


This example uses commands not included in this page. Please see the corresponding page for usage and definition.

function Unit_Spell(Unit, Event)
local friend = Unit:GetRandomFriend()
  Unit:FullCastSpellOnTarget(25840, friend)
Personal tools