Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function TOC.VAR.Jaraxxus_PathOfFireSpawn(pUnit, Event)
- local id = pUnit:GetInstanceID()
- if id == nil then id = 1 end
- --if TOC[id].VAR.chaos then
- for _,plrs in pairs(pUnit:GetInRangePlayers()) do
- local found = false
- for _,names in pairs(TOC[id].VAR.chaosplayers) do
- if plrs:GetName() == names then
- found = true
- break
- end
- end
- if not found then
- pUnit:SendChatMessage(12,0,"Not found, inserting into table and moving to player : "..plrs:GetName())
- table.insert(TOC[id].VAR.chaosplayers, plrs:GetName())
- pUnit:SetMovementFlags(1)
- pUnit:MoveTo(plrs:GetX(), plrs:GetY(), plrs:GetZ(), 0)
- pUnit:RegisterEvent("TOC.VAR.SpawnMoreStaticFiresJarax", 700, 14)
- end
- end
- --[[else
- local range = 0
- local target = nil
- for _,plrs in pairs(pUnit:GetInRangePlayers()) do
- if plrs:GetDistanceYards(pUnit) > range then
- range = plrs:GetDistanceYards(pUnit)
- target = plrs
- end
- end
- if target ~= nil then
- pUnit:SetMovementFlags(1)
- pUnit:MoveTo(target:GetX(), target:GetY(), target:GetZ(), 0)
- pUnit:RegisterEvent("TOC.VAR.SpawnMoreStaticFiresJarax", 700, 14)
- end
- end]]
- end
Advertisement
Add Comment
Please, Sign In to add comment