ThreeMeaningsOfLife.lua 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. --[[
  2. Script Name : Quests/EnchantedLands/ThreeMeaningsOfLife.lua
  3. Script Purpose : Handles the quest "The Curious Augur's Three Meanings of Life"
  4. Script Author : Cynnar
  5. Script Date : 2015.02.24
  6. Script Notes : <special-instructions>
  7. Zone : Enchanted Lands
  8. Quest Giver : The Curious Augur
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepChat(Quest, 1, "I need to answer the Curious Augur's riddle correctly", 1, "The Curius Augur is teaching me three meanings of life.", 0, 390082)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. FaceTarget(QuestGiver, Player)
  18. conversation = CreateConversation()
  19. AddConversationOption(conversation, "I have seven fear feeders and eighteen shoal serpents.", "QuestChat_0_4")
  20. AddConversationOption(conversation, "I have fifteen fear feeders and ten shoal serpents.", "QuestChat_0_2")
  21. AddConversationOption(conversation, "I have five fear feeders and twenty shoal serpents.", "QuestChat_0_2")
  22. AddConversationOption(conversation, "I have no idea.", "QuestChat_0_2")
  23. StartConversation(conversation, QuestGiver, Player, "There are many meanings to life and I can teach you only three. The first meaning is that of the nimble mind. Curiosity is a start, but you must be able to unravel this mystery to proceed. You have slain many fear feeders and shoal serpents. You have collected twenty five heads and fifty six legs. How many of each have you slain?")
  24. end
  25. function Step1Complete(Quest, QuestGiver, Player)
  26. UpdateQuestStepDescription(Quest, 1, "I've answered the riddle correctly.")
  27. AddQuestStepChat(Quest, 2, "I must speak with the Curious Augur to learn the second meaning of life.", 1, "The Curius Augur is teaching me three meanings of life.", 0, 390082)
  28. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  29. end
  30. function Step2Complete(Quest, QuestGiver, Player)
  31. UpdateQuestStepDescription(Quest, 2, "I've spoken with the Curious Augur.")
  32. AddQuestStepKill(Quest, 3, "I need to clear the shore of salt snappers.", 7, 100, "The Curius Augur is teaching me three meanings of life.", 171, 390064)
  33. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  34. end
  35. function Step3Complete(Quest, QuestGiver, Player)
  36. UpdateQuestStepDescription(Quest, 3, "I removed the salt snapper menace.")
  37. AddQuestStepChat(Quest, 4, "I must speak with the Curious Augur in the Enchanted Lands to learn the thrid meaning of life.", 1, "The Curius Augur is teaching me three meanings of life.", 0, 390082)
  38. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  39. end
  40. function Step4Complete(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 4, "I've spoken with the Curious Augur.")
  42. AddQuestStepChat(Quest, 5, "I should seek out Sarma Singebellows.", 1, "The Curius Augur is teaching me three meanings of life.", 0, 390181)
  43. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  44. end
  45. function Step5Complete(Quest, QuestGiver, Player)
  46. UpdateQuestStepDescription(Quest, 5, "I've encountered Sarma Singebellows.")
  47. AddQuestStepChat(Quest, 6, "I must return to the Curious Augur in the Enchanted Lands.", 1, "The Curius Augur is teaching me three meanings of life.", 0, 390082)
  48. AddQuestStepCompleteAction(Quest, 6, "QuestComplete")
  49. end
  50. function QuestComplete(Quest, QuestGiver, Player)
  51. GiveQuestReward(Quest, Player)
  52. end
  53. function Deleted(Quest, QuestGiver, Player)
  54. end
  55. function Declined(Quest, QuestGiver, Player)
  56. end
  57. function Reload(Quest, QuestGiver, Player, Step)
  58. if Step == 1 then
  59. Step1Complete(Quest, QuestGiver, Player)
  60. elseif Step == 2 then
  61. Step2Complete(Quest, QuestGiver, Player)
  62. elseif Step == 3 then
  63. Step3Complete(Quest, QuestGiver, Player)
  64. elseif Step == 4 then
  65. Step4Complete(Quest, QuestGiver, Player)
  66. elseif Step == 5 then
  67. Step5Complete(Quest, QuestGiver, Player)
  68. elseif Step == 6 then
  69. QuestComplete(Quest, QuestGiver, Player)
  70. end
  71. end