information_merchants.lua 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. --[[
  2. Script Name : Quests/StarcrestCommune/information_merchants.lua
  3. Script Purpose : Handles the quest, "Information Merchants"
  4. Script Author : Scatman
  5. Script Date : 2008.09.21
  6. Zone : Starcrest Commune
  7. Quest Giver: Maareona Ludimintium
  8. Preceded by: Meeting with Cayan (meeting_with_cayan.lua)
  9. Followed by: Hidden Treasures (hidden_treasures.lua)
  10. --]]
  11. function Init(Quest)
  12. -- worthless bronze statuette
  13. AddQuestStepObtainItem(Quest, 1, "I need to purchase a bronze statuette from Merchant Zinun Loospankina just northwest of the entrance to the Peat Bog.", 1, 100, "I need to get Maareona's information from Zinun Loospakina in Starcrest Commune.", 1059, 15571)
  14. AddQuestStepCompleteAction(Quest, 1, "step1_complete_obtainedStatue")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. if QuestGiver ~= nil then
  18. if GetDistance(Player, QuestGiver) < 30 then
  19. FaceTarget(QuestGiver, Player)
  20. conversation = CreateConversation()
  21. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/cayan_sable/qey_village02/quests/cayan_sable/cayan_sable013a.mp3", "", "bow", 2406319678, 1434130925, Player)
  22. AddConversationOption(conversation, "Thank you.")
  23. StartConversation(conversation, QuestGiver, Player, "You don't need to return once you've acquired it. It was a pleasure.")
  24. end
  25. end
  26. end
  27. function Declined(Quest, QuestGiver, Player)
  28. end
  29. function step1_complete_obtainedStatue(Quest, QuestGiver, Player)
  30. UpdateQuestStepDescription(Quest, 1, "I have purchased the bronze statuette.")
  31. UpdateQuestTaskGroupDescription(Quest, 1, "I have purchased the bronze statuette.")
  32. AddQuestStep(Quest, 2, "I need to inspect the bronze statuette and discover where the information is hidden.", 1, 100, "I need to get Maareona's information from Zinun Loospakina in Starcrest Commune.")
  33. AddQuestStepCompleteAction(Quest, 2, "step2_complete_inspectedStatuette")
  34. end
  35. function step2_complete_inspectedStatuette(Quest, QuestGiver, Player)
  36. UpdateQuestStepDescription(Quest, 2, "I have found the hidden message.")
  37. UpdateQuestTaskGroupDescription(Quest, 2, "I have found the hidden message.")
  38. AddQuestStepChat(Quest, 3, "I need to deliver the message to Maareona in the south eastern area of Starcrest Commune.", 1, "I need to get Maareona's information from Zinun Loospakina in Starcrest Commune.", 0, 2340006)
  39. AddQuestStepCompleteAction(Quest, 3, "quest_complete")
  40. end
  41. function quest_complete(Quest, QuestGiver, Player)
  42. UpdateQuestDescription(Quest, "I have given Maareona the information she needed.")
  43. GiveQuestReward(Quest, Player)
  44. end
  45. function Reload(Quest, QuestGiver, Player, Step)
  46. if Step == 1 then
  47. step1_complete_talkedToCayan(Quest, QuestGiver, Player)
  48. elseif Step == 2 then
  49. step2_complete_inspectedStatuette(Quest, QuestGiver, Player)
  50. end
  51. end