9
3

fallenblackguardmineral01.lua 807 B

1234567891011121314151617181920212223242526272829303132
  1. --[[
  2. Script Name : SpawnScripts/Commonlands/fallenblackguardmineral01.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.06.02 07:06:45
  5. Script Purpose :
  6. :
  7. --]]
  8. local AnErodedKey = 5251
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 10, "InRange")
  11. end
  12. function InRange(NPC, Spawn)
  13. if GetQuestStep(Spawn, AnErodedKey) == 3 then
  14. AddPrimaryEntityCommand(Spawn, NPC, "collect magical ore", 2, "")
  15. elseif QuestStepIsComplete(Spawn, AnErodedKey) == 3 then
  16. RemovePrimaryEntityCommand(Spawn, NPC, "collect magical ore", 2)
  17. end
  18. end
  19. function casted_on(NPC, Spawn, SpellName)
  20. if SpellName == 'collect magical ore' then
  21. SetStepComplete(Spawn, AnErodedKey, 3)
  22. end
  23. end
  24. function respawn(NPC)
  25. spawn(NPC)
  26. end