9
3

aCommonerPanicked_(1).lua 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. --[[
  2. Script Name : SpawnScripts/Darklight/aCommonerPanicked_(1).lua
  3. Script Purpose : Panicked commoners before completing quest, "Reclaiming the Sablevein Tear"
  4. Script Author : Cynnar
  5. Script Date : 10/14/2015
  6. Script Notes : a commoner (spawn_id 340142) (spawn_location_id 584360)
  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, SealingTheRift) then
  20. AddSpawnAccess(NPC, Player)
  21. MovementLoopAddLocation(NPC, -390.67, -62.87, 247.71, 4, 1)
  22. MovementLoopAddLocation(NPC, -391.05, -62.87, 254.13, 4, 1)
  23. MovementLoopAddLocation(NPC, -383.36, -62.87, 247.41, 4, 1)
  24. MovementLoopAddLocation(NPC, -388.98, -62.87, 256.71, 4, 1)
  25. MovementLoopAddLocation(NPC, -388.16, -62.87, 255.80, 4, 1)
  26. MovementLoopAddLocation(NPC, -383.64, -62.87, 254.19, 4, 1)
  27. MovementLoopAddLocation(NPC, -382.80, -62.87, 255.60, 4, 1)
  28. MovementLoopAddLocation(NPC, -386.14, -62.87, 248.28, 4, 1)
  29. MovementLoopAddLocation(NPC, -386.51, -62.87, 248.45, 4, 1)
  30. MovementLoopAddLocation(NPC, -385.33, -62.87, 252.82, 4, 1)
  31. else
  32. RemoveSpawnAccess(NPC, Player)
  33. end
  34. end