Lua GetInRangePlayers

From ArcEmu-Wiki
Jump to: navigation, search
+/-
Main Page        LuaArcEmu Website     ArcEmu Forum     Bug Tracker



Syntax

array = pUnit:GetInRangePlayers()

Description

Returns a table of player objects, close to pUnit.

Example 1

function ListNearestPlayer(pUnit)
  for i,pPlayer in pairs(pUnit:GetInRangePlayers()) do
    print(pPlayer:GetName())
  end
end

Example 2

function Boss(pUnit, Event)
local targets = pUnit:GetInRangePlayers()
 pUnit:FullCastSpellOnTarget(###, targets)
end
Personal tools