fallenblackguardmineral02.lua 809 B

123456789101112131415161718192021222324252627282930313233
  1. --[[
  2. Script Name : SpawnScripts/Commonlands/fallenblackguardmineral02.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.06.02 07:06:38
  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) == 4 then
  14. AddPrimaryEntityCommand(Spawn, NPC, "collect magical ore", 2, "")
  15. elseif QuestStepIsComplete(Spawn, AnErodedKey) == 4 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, 4)
  22. end
  23. end
  24. function respawn(NPC)
  25. spawn(NPC)
  26. end