9
3

aCommonerPanicked_(6).lua 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --[[
  2. Script Name : SpawnScripts/Darklight/aCommonerPanicked_(6).lua
  3. Script Purpose : Panicked commoners before completing quest, "Reclaiming the Sablevein Tear"
  4. Script Author : Cynnar
  5. Script Date : 10/16/2015
  6. Script Notes : a commoner (spawn_id 340017) (spawn_location_id 317253)
  7. Script Notes : Location is in Hate's Envy
  8. --]]
  9. local SealingTheRift = 122
  10. local ReclaimingTheSableveinTear = 124
  11. function spawn(NPC, Player)
  12. AddSpawnAccess(NPC, NPC)
  13. SetPlayerProximityFunction(NPC, 50, "QuestCheck", "QuestCheck")
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function QuestCheck(NPC, Player)
  19. if not HasCompletedQuest(Player, ReclaimingTheSableveinTear) then
  20. AddSpawnAccess(NPC, Player)
  21. MovementLoopAddLocation(NPC, -388.34, -62.87, 208.30, 4, 1)
  22. MovementLoopAddLocation(NPC, -393.45, -62.87, 201.45, 4, 1)
  23. MovementLoopAddLocation(NPC, -396.49, -62.87, 208.28, 4, 1)
  24. MovementLoopAddLocation(NPC, -387.72, -62.87, 200.97, 4, 1)
  25. MovementLoopAddLocation(NPC, -396.54, -62.87, 204.25, 4, 1)
  26. MovementLoopAddLocation(NPC, -388.66, -62.87, 205.30, 4, 1)
  27. MovementLoopAddLocation(NPC, -400.58, -62.87, 210.81, 4, 1)
  28. MovementLoopAddLocation(NPC, -395.15, -62.87, 205.69, 4, 1)
  29. else
  30. RemoveSpawnAccess(NPC, Player)
  31. end
  32. end
  33. function animation(NPC, Player)
  34. AddSpawnAccess(NPC, Player)
  35. PlayFlavor(NPC, "", "", "frustrated", 0, 0)
  36. end