asnowpack.lua 995 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/asnowpack.lua
  3. Script Purpose : for the spawns "a snowpack" and "an iceflow"
  4. Script Author : theFoof
  5. Script Date : 2013.05.20
  6. Script Notes :
  7. --]]
  8. require"SpawnScripts/Generic/MovementCircleSmall"
  9. local EssentialIngredient = 22
  10. function spawn(NPC)
  11. SpawnChooseRandomMovement(NPC)
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function hailed(NPC, Spawn)
  17. FaceTarget(NPC, Spawn)
  18. end
  19. function casted_on(NPC, Caster, SpellName)
  20. if SpellName == "Bogchild's Iced Trap" then
  21. if GetName(NPC) == "a snowpack" then
  22. if QuestStepIsComplete(Caster, EssentialIngredient, 2) == false then
  23. AddStepProgress(Caster, EssentialIngredient, 2, 1)
  24. Despawn(NPC)
  25. end
  26. elseif GetName(NPC) == 'an iceflow' then
  27. if QuestStepIsComplete(Caster, EssentialIngredient, 1) == false then
  28. AddStepProgress(Caster, EssentialIngredient, 1, 1)
  29. Despawn(NPC)
  30. end
  31. end
  32. end
  33. end