aMiner_(1).lua 705 B

12345678910111213141516171819202122232425262728
  1. --[[
  2. Script Name : SpawnScripts/Darklight/aMiner_(1).lua
  3. Script Purpose : A Miner before completing quest, "Reclaiming the Sablevein Tear"
  4. Script Author : Cynnar
  5. Script Date : 10/14/2015
  6. Script Notes : a miner (spawn_id 340016) (spawn_location_id 584439)
  7. Script Notes : Location is in Hate's Envy
  8. --]]
  9. local ReclaimingTheSableveinTear = 124
  10. function spawn(NPC, Player)
  11. AddSpawnAccess(NPC, NPC)
  12. SetPlayerProximityFunction(NPC, 50, "QuestCheck", "QuestCheck")
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function QuestCheck(NPC, Player)
  18. if not HasCompletedQuest(Player, ReclaimingTheSableveinTear) then
  19. AddSpawnAccess(NPC, Player)
  20. else
  21. RemoveSpawnAccess(NPC, Player)
  22. end
  23. end