9
3

obtaining_an_ancient_staff.lua 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. --[[
  2. Script Name : obtaining_an_ancient_staff.lua
  3. Script Purpose : Handles the quest, "Obtaining an Ancient Staff"
  4. Script Author : Scatman
  5. Script Date : 2009.07.12
  6. Zone : The Graveyard
  7. Quest Giver: Custodian Zaddar Sullissia
  8. Preceded by: Testing the Ward (testing_the_ward.lua)
  9. Followed by: The Book of the Dead (the_book_of_the_dead.lua)
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepChat(Quest, 1, "I must get the Staff of Ethernere from Varacus.", 1, "I've been instructed by Zaddar to obtain the ancient Staff of the Ethernere from Varacus. Zaddar feels that this relic will be a necessary component when attempting to reseal the ward.", 0, 1250070)
  13. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_SpokeToVaracus")
  14. end
  15. function Accepted(Quest, QuestGiver, Player)
  16. FaceTarget(QuestGiver, Player)
  17. conversation = CreateConversation()
  18. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/custodian_zaddar_sullissia/fprt_adv02_graveyard/custodian_zaddar064.mp3", "", "", 2541220824, 746144364, Player)
  19. AddConversationOption(conversation, "Why do we need this staff?", "dlg_5_8")
  20. AddConversationOption(conversation, "Enough of this story.")
  21. StartConversation(conversation, QuestGiver, Player, "This staff has runes carved along its length that ward off the undead. It is often used by the Keepers of Ethernere during purifying rituals.")
  22. end
  23. function Declined(Quest, QuestGiver, Player)
  24. end
  25. function Step1_Complete_SpokeToVaracus(Quest, QuestGiver, Player)
  26. UpdateQuestStepDescription(Quest, 1, "I've obtained the Staff of Ethernere.")
  27. UpdateQuestTaskGroupDescription(Quest, 1, "I've managed to talk that fool Varacus out of his staff, let's hope it was worth it.")
  28. AddQuestStepChat(Quest, 2, "I must take the Staff of Ethernere to Zaddar.", 1, "I must take this staff to Zaddar with haste, there is little time and much work to be done.", 0, 1250014)
  29. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  30. end
  31. function QuestComplete(Quest, QuestGiver, Player)
  32. -- The Staff of Ethernere
  33. while HasItem(Player, 12438) do
  34. RemoveItem(Player, 12438)
  35. end
  36. UpdateQuestStepDescription(Quest, 2, "I've given the staff to Zaddar.")
  37. UpdateQuestTaskGroupDescription(Quest, 2, "I must take the Staff of Ethernere to Zaddar in the graveyard so he can begin the arcane spell to reseal the ward.")
  38. GiveQuestReward(Quest, Player)
  39. UpdateQuestDescription(Quest, "I've obtained the ancient staff used by the Keepers of Ethernere and passed it along to Zaddar.")
  40. end
  41. function Reload(Quest, QuestGiver, Player, Step)
  42. if Step == 1 then
  43. Step1_Complete_SpokeToVaracus(Quest, QuestGiver, Player)
  44. end
  45. end