Code:
function Alliance_squad_attacking_onspawn(pUnit, Event)
pUnit:RegisterEvent("delay_for_slackers_XD", 1000, 1)
end
function delay_for_slackers_XD(pUnit, Event)
pUnit:SetFaction(1)
pUnit:SetPhase(2)
pUnit:SetMovementFlags(1)
pUnit:EquipWeapons(1482,6320,0)
if math.random(1,2) == 1 then
pUnit:MoveTo(-7198, -1964, 313, 2.811485)
else
pUnit:MoveTo(-7205, -1968, 312, 2.850754)
end
pUnit:RegisterEvent("LetsMoveIntoTheActualBase_Squad", 4000, 1)
end
function LetsMoveIntoTheActualBase_Squad(pUnit, Event)
if math.random(1,6) == 3 then
pUnit:SendChatMessage(14, 0, "For the Alliance!")
else
if math.random(1,6) == 4 then
pUnit:SendChatMessage(14, 0, "The Horde shall fall!")
end
end
if pUnit:IsInCombat() == false then
pUnit:SetMovementFlags(1)
if math.random(1,2) == 1 then
pUnit:MoveTo(-7217, -1960, 314, 2.744725)
else
pUnit:MoveTo(-7218, -1963, 313, 2.811484)
end
end
end
RegisterUnitEvent(151081, 18, "Alliance_squad_attacking_onspawn")