9
3

anEthernereguard.lua 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. --[[
  2. Script Name : SpawnScripts/Graveyard/anEthernereguard.lua
  3. Script Purpose : an Ethernere guard <Academy of Arcane Science>
  4. Script Author : scatman
  5. Script Date : 2009.07.25
  6. Script Notes :
  7. --]]
  8. -- This quest is repeatable I think.
  9. local QUEST_1 = 252
  10. function spawn(NPC)
  11. ProvidesQuest(NPC, QUEST_1)
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function hailed(NPC, Spawn)
  17. FaceTarget(NPC, Spawn)
  18. conversation = CreateConversation()
  19. if HasCompletedQuest(Spawn, QUEST_1) then
  20. Say(NPC, "May you complete your task without leaving this realm.", Spawn)
  21. elseif HasQuest(Spawn, QUEST_1) then
  22. OnQuest1(NPC, Spawn, conversation)
  23. else
  24. HailCitizen(NPC, Spawn, conversation)
  25. end
  26. end
  27. function HailCitizen(NPC, Spawn, conversation)
  28. PlayFlavor(NPC, "an_ethernere_guard/fprt_adv02_graveyard/ethernere_keeper001.mp3", "", "", 1684681522, 203789175, Spawn)
  29. AddConversationOption(conversation, "Yes?", "dlg_3_1")
  30. AddConversationOption(conversation, "I am busy.")
  31. StartConversation(conversation, NPC, Spawn, "Hail Citizen!")
  32. end
  33. function dlg_3_1(NPC, Spawn)
  34. FaceTarget(NPC, Spawn)
  35. conversation = CreateConversation()
  36. PlayFlavor(NPC, "an_ethernere_guard/fprt_adv02_graveyard/ethernere_keeper002.mp3", "", "", 3556340892, 124958826, Spawn)
  37. AddConversationOption(conversation, "Of course!", "dlg_3_2")
  38. AddConversationOption(conversation, "I am busy.")
  39. StartConversation(conversation, NPC, Spawn, "Freeport has need of your services, will you fulfill your duty?")
  40. end
  41. function dlg_3_2(NPC, Spawn)
  42. FaceTarget(NPC, Spawn)
  43. conversation = CreateConversation()
  44. PlayFlavor(NPC, "an_ethernere_guard/fprt_adv02_graveyard/ethernere_keeper003.mp3", "", "", 2377701112, 1112213409, Spawn)
  45. AddConversationOption(conversation, "What do you need me to do?", "OfferQuest1")
  46. AddConversationOption(conversation, "I am busy.")
  47. StartConversation(conversation, NPC, Spawn, "Ancient spirits have recently awoken, their graves disturbed by the graverobbers in this area. The graverobbers have taken ancient holy relics from them and they wander in search of that which was taken.")
  48. end
  49. function OfferQuest1(NPC, Spawn)
  50. FaceTarget(NPC, Spawn)
  51. OfferQuest(NPC, Spawn, QUEST_1)
  52. end
  53. function OnQuest1(NPC, Spawn, conversation)
  54. if GetQuestStep(Spawn, QUEST_1) == 3 then
  55. AddConversationOption(conversation, "Yes, I returned the relics to the tombs.", "Successful")
  56. AddConversationOption(conversation, "No, not yet.")
  57. StartConversation(conversation, NPC, Spawn, "Were you successful in your mission?")
  58. else
  59. PlayFlavor(NPC, "", "If you see any graverobbers come tell me immediately.", "", 1689589577, 4560189, Spawn)
  60. end
  61. end
  62. function Successful(NPC, Spawn)
  63. SetStepComplete(Spawn, QUEST_1, 3)
  64. FaceTarget(NPC, Spawn)
  65. conversation = CreateConversation()
  66. AddConversationOption(conversation, "Thank you.")
  67. StartConversation(conversation, NPC, Spawn, "Excellent. Thank you for your service to Freeport and the Keepers of Ethernere. Please, take this for your trouble.")
  68. end