9
3

frostbiteregg.lua 925 B

12345678910111213141516171819202122232425262728293031323334
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/frostbiteregg.lua
  3. Script Purpose : for the frostbiter eggs in frostfang (unnamed spawn)
  4. Script Author : theFoof
  5. Script Date : 2013.6.1
  6. Script Notes :
  7. --]]
  8. local DomesticationSurvivalism = 43
  9. function spawn(NPC)
  10. SetRequiredQuest(NPC, DomesticationSurvivalism, 1)
  11. AddSpawnAccess(NPC, NPC)
  12. SetPlayerProximityFunction(NPC, 50, "SpawnAccess", "SpawnAccess")
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function casted_on(NPC, Spawn, SpellName)
  18. if SpellName == 'Gathering' then
  19. if GetQuestStep(Spawn, DomesticationSurvivalism) == 1 then
  20. AddStepProgress(Spawn, DomesticationSurvivalism, 1, 1)
  21. Despawn(NPC)
  22. end
  23. end
  24. end
  25. function SpawnAccess(NPC, Spawn)
  26. if HasCompletedQuest(Spawn, DomesticationSurvivalism) or GetQuestStep(Spawn, DomesticationSurvivalism) == 1 then
  27. AddSpawnAccess(NPC, Spawn)
  28. end
  29. end