9
3

aloosepieceofpaper.lua 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. --[[
  2. Script Name : SpawnScripts/WillowWood/aloosepieceofpaper.lua
  3. Script Purpose : a loose piece of paper
  4. Script Author : Scatman
  5. Script Date : 2009.09.26
  6. Script Notes :
  7. --]]
  8. local HALFELF_MENTOR_QUEST_3 = 220
  9. function spawn(NPC)
  10. local spawn_location_id = GetSpawnLocationID(NPC)
  11. -- page 7, step 3
  12. if spawn_location_id == 558487 then
  13. SetRequiredQuest(NPC, HALFELF_MENTOR_QUEST_3, 3)
  14. -- page 11, step 4
  15. elseif spawn_location_id == 1585293 then
  16. SetRequiredQuest(NPC, HALFELF_MENTOR_QUEST_3, 4)
  17. -- page 12, step 5
  18. elseif spawn_location_id == 558489 then
  19. SetRequiredQuest(NPC, HALFELF_MENTOR_QUEST_3, 5)
  20. -- page 3, step 1
  21. elseif spawn_location_id == 1585294 then
  22. SetRequiredQuest(NPC, HALFELF_MENTOR_QUEST_3, 1)
  23. -- page 4, step 2
  24. elseif spawn_location_id == 558491 then
  25. SetRequiredQuest(NPC, HALFELF_MENTOR_QUEST_3, 2)
  26. end
  27. end
  28. function hailed(NPC, Spawn)
  29. end
  30. function respawn(NPC)
  31. spawn(NPC)
  32. end
  33. function casted_on(NPC, Spawn, SpellName)
  34. if HasQuest(Spawn, HALFELF_MENTOR_QUEST_3) and GetQuestStep(Spawn, HALFELF_MENTOR_QUEST_3) <= 5 and SpellName == "Examine" then
  35. local spawn_location_id = GetSpawnLocationID(NPC)
  36. -- page 7, step 3
  37. if spawn_location_id == 558487 then
  38. SetStepComplete(Spawn, HALFELF_MENTOR_QUEST_3, 3)
  39. Despawn(NPC)
  40. -- page 11, step 4
  41. elseif spawn_location_id == 1585293 then
  42. SetStepComplete(Spawn, HALFELF_MENTOR_QUEST_3, 4)
  43. Despawn(NPC)
  44. -- page 12, step 5
  45. elseif spawn_location_id == 558489 then
  46. SetStepComplete(Spawn, HALFELF_MENTOR_QUEST_3, 5)
  47. Despawn(NPC)
  48. -- page 3, step 1
  49. elseif spawn_location_id == 1585294 then
  50. SetStepComplete(Spawn, HALFELF_MENTOR_QUEST_3, 1)
  51. Despawn(NPC)
  52. -- page 4, step 2
  53. elseif spawn_location_id == 558491 then
  54. SetStepComplete(Spawn, HALFELF_MENTOR_QUEST_3, 2)
  55. Despawn(NPC)
  56. end
  57. end
  58. end