Hey,
I'm working on a small event where you talk to a unit and then she walks to waypoint 1. Then the below script should cause a flame effect and a monster to spawn. But it won't do either. I've tried fixing this but it just keeps crashing the server.
Code:
function OnReachWaypoint(pUnit, Event, WaypointId)
if (WaypointId == 1) then
pUnit:SendChatMessage(14, 7, "Come demon's we will defeat you!")
pUnit:SpawnGameObject(3267442, 8712.102539, 941.799072, 14.266078, 2.966595, 8000, 1, 0, 0)
pUnit:SpawnCreature(500063,8712.102539, 941.799072, 14.266078,2.966595, 900000, 0, 0, 0, 0, 0)
end
end
RegisterUnitEvent(500047, 19, "OnReachWaypoint")