meeting_with_cayan.lua 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. --[[
  2. Script Name : Quests/StarcrestCommune/meeting_with_cayan.lua
  3. Script Purpose : Handles the quest, "Meeting with Cayan"
  4. Script Author : Scatman
  5. Script Date : 2008.09.21
  6. Zone : Starcrest Commune
  7. Quest Giver: Maareona Ludimintium
  8. Preceded by: None
  9. Followed by: Information Merchants (information_merchants.lua)
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepChat(Quest, 1, "I need to speak with Cayan Sable, he is in a hiding spot that can be reached by climbing the bench behind the northwestern corner of the armor shop.", 1, "I need to find Cayan Sable and get some needed information from him.", 0, 2340017)
  13. AddQuestStepCompleteAction(Quest, 1, "step1_complete_talkedToCayan")
  14. end
  15. function Accepted(Quest, QuestGiver, Player)
  16. if QuestGiver ~= nil then
  17. if GetDistance(Player, QuestGiver) < 30 then
  18. FaceTarget(QuestGiver, Player)
  19. conversation = CreateConversation()
  20. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/maareona_ludimintium/qey_village02/quests/maareona/maareona015.mp3", "", "nod", 1504116798, 1802645516, Player)
  21. AddConversationOption(conversation, "I will return once I get the information.")
  22. StartConversation(conversation, QuestGiver, Player, "He will ask a favor of you. He doesn't accept payment in a traditional sense, but he will ask something of you. The more friends he has, and the more people for whom he does favors, who who do favors for him, the more information he can provide. So, please, indulge him.")
  23. end
  24. end
  25. end
  26. function Declined(Quest, QuestGiver, Player)
  27. end
  28. function Deleted(Quest, QuestGiver, Player)
  29. end
  30. function step1_complete_talkedToCayan(Quest, QuestGiver, Player)
  31. UpdateQuestStepDescription(Quest, 1, "I have spoken with Cayan Sable.")
  32. UpdateQuestTaskGroupDescription(Quest, 1, "I have spoken with Cayan Sable.")
  33. -- Red Sun Berries
  34. AddQuestStepHarvest(Quest, 2, "In exchange for his help Cayan Sable requires I help him by collecting Red Sun Berries from the bushes that grow around Starcrest Commune.", 10, 100, "I need to find Cayan Sable and get some needed information from him.", 788, 11348)
  35. AddQuestStepCompleteAction(Quest, 2, "step2_complete_obtainedBerries")
  36. end
  37. function step2_complete_obtainedBerries(Quest, QuestGiver, Player)
  38. UpdateQuestStepDescription(Quest, 2, "I have collected the Red Sun Berries.")
  39. UpdateQuestTaskGroupDescription(Quest, 2, "I have collected the Red Sun Berries.")
  40. AddQuestStepChat(Quest, 3, "I must return to Cayan Sable, I can use the bench behind the northwest corner of the armor shop to get to him.", 1, "I need to find Cayan Sable and get some needed information from him.", 0, 2340017)
  41. AddQuestStepCompleteAction(Quest, 3, "step3_complete_talkedToCayan")
  42. end
  43. function step3_complete_talkedToCayan(Quest, QuestGiver, Player)
  44. UpdateQuestDescription(Quest, "I have done a task for Cayan in exchange for certain information. According to him I will get this information from a merchant in Starcrest Commune.")
  45. GiveQuestReward(Quest, Player)
  46. end
  47. function Reload(Quest, QuestGiver, Player, Step)
  48. if Step == 1 then
  49. step1_complete_talkedToCayan(Quest, QuestGiver, Player)
  50. elseif Step == 2 then
  51. step2_complete_obtainedBerries(Quest, QuestGiver, Player)
  52. elseif Step == 3 then
  53. step3_complete_talkedToCayan(Quest, QuestGiver, Player)
  54. end
  55. end