9
3

aCommonerPanicked_(8).lua 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --[[
  2. Script Name : SpawnScripts/Darklight/aCommonerPanicked_(8).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 579575)
  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, -381.35, -62.87, 230.78, 4, 1)
  22. MovementLoopAddLocation(NPC, -372.50, -62.87, 238.39, 4, 1)
  23. MovementLoopAddLocation(NPC, -373.73, -62.87, 229.14, 4, 1)
  24. MovementLoopAddLocation(NPC, -382.43, -62.87, 239.71, 4, 1)
  25. MovementLoopAddLocation(NPC, -372.71, -62.87, 234.79, 4, 1)
  26. MovementLoopAddLocation(NPC, -378.37, -62.87, 227.58, 4, 1)
  27. MovementLoopAddLocation(NPC, -374.99, -62.87, 241.18, 4, 1)
  28. MovementLoopAddLocation(NPC, -374.23, -62.87, 233.35, 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