aCommonerPanicked_(7).lua 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. --[[
  2. Script Name : SpawnScripts/Darklight/aCommonerPanicked_(7).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 340142) (spawn_location_id 579576)
  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, -373.39, -62.87, 220.84, 4, 1)
  22. MovementLoopAddLocation(NPC, -376.93, -62.87, 208.55, 4, 1)
  23. MovementLoopAddLocation(NPC, -380.85, -62.87, 218.72, 4, 1)
  24. MovementLoopAddLocation(NPC, -372.85, -62.87, 213.51, 4, 1)
  25. MovementLoopAddLocation(NPC, -384.53, -62.87, 209.33, 4, 1)
  26. MovementLoopAddLocation(NPC, -377.88, -62.87, 219.22, 4, 1)
  27. MovementLoopAddLocation(NPC, -370.68, -62.87, 214.95, 4, 1)
  28. MovementLoopAddLocation(NPC, -384.15, -62.87, 206.85, 4, 1)
  29. MovementLoopAddLocation(NPC, -377.62, -62.87, 215.29, 4, 1)
  30. else
  31. RemoveSpawnAccess(NPC, Player)
  32. end
  33. end
  34. function animation(NPC, Player)
  35. AddSpawnAccess(NPC, Player)
  36. PlayFlavor(NPC, "", "", "frustrated", 0, 0)
  37. end