9
3

DeepMarshes.lua 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. --[[
  2. Script Name : ItemScripts/DeepMarshes.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.05 02:06:06
  5. Script Purpose :
  6. :
  7. --]]
  8. local Deep = 5582
  9. function examined(Item, Player)
  10. conversation = CreateConversation()
  11. AddConversationOption(conversation, "Entry One","Page1")
  12. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  13. StartDialogConversation(conversation, 2, Item, Player, "\"Deep Marshes.\" After the sudden invasion of Gukta by the new Rallosian Army, a band of frogloks heads north to seek help.")
  14. end
  15. function Page1(Item, Player)
  16. conversation = CreateConversation()
  17. if not HasQuest(Spawn,Deep) and not HasCompletedQuest(Spawn,Deep)then
  18. QuestStart(Item,Player)
  19. end
  20. if GetQuestStep(Player,Deep) >=2 then
  21. AddConversationOption(conversation, "Entry Two","Page2")
  22. end
  23. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  24. StartDialogConversation(conversation, 2, Item, Player, "Without the aid of the Avatar of War, the ogres could never have planned such an attack. Gukta had been the site of many battles over the years, but the force arrayed by General Urduuk proved strongest of all. Now, though they were loathe to do so, the frogloks were on the run. The ogres had never before had such a force, despite their brute strength. No, it was not a newly intelligent ogre that bested the froglok, but the Avatar of War itself.")
  25. end
  26. function Page2(Item, Player)
  27. conversation = CreateConversation()
  28. if GetQuestStep(Player,Deep)==2 then
  29. QuestStepIsComplete(Player,Deep,2)
  30. end
  31. if GetQuestStep(Player,Deep) >=4 then
  32. AddConversationOption(conversation, "Entry Three","Page3")
  33. end
  34. AddConversationOption(conversation, "Turn back to previous entry.","Page1")
  35. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  36. StartDialogConversation(conversation, 2, Item, Player, "Down into the tunnels they ran, many clutching the eggs which would be a new generation of froglok. They had had time to clear the hatchery before flight. Though retreat is not the froglok way, the elders knew that living to fight another day and bearing away the eggs would be the better thing for them to do. A small garrison was left to distract the ogres and defend Gukta. The rest hurried into the dark.")
  37. end
  38. function Page3(Item, Player)
  39. conversation = CreateConversation()
  40. if GetQuestStep(Player,Deep)==4 then
  41. QuestStepIsComplete(Player,Deep,4)
  42. end
  43. if GetQuestStep(Player,Deep) >=6 then
  44. AddConversationOption(conversation, "Entry Four","Page4")
  45. end
  46. AddConversationOption(conversation, "Turn back to previous entry.","Page2")
  47. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  48. StartDialogConversation(conversation, 2, Item, Player, "\"The ogre army will not be content with taking a swamp,\" said Agakk, one of the elders. \"We must send word to the outsiders, to warn them of the danger these ogres cause.\" \"I will go,\" said Guruup, bowing deeply. \"My unit and I will make our way out to Freeport. The Overlord must hear of this villainous turn of events.\" Agakk nodded. \"Yes, I agree. Go at once, Guruup and may Mithaniel Marr protect you.\"")
  49. end
  50. function Page4(Item, Player)
  51. conversation = CreateConversation()
  52. if GetQuestStep(Player,Deep)==6 then
  53. QuestStepIsComplete(Player,Deep,6)
  54. end
  55. if GetQuestStep(Player,Deep) >=8 then
  56. AddConversationOption(conversation, "Entry Five","Page5")
  57. end
  58. AddConversationOption(conversation, "Turn back to previous entry.","Page3")
  59. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  60. StartDialogConversation(conversation, 2, Item, Player, "There are many ways through the woods and so it is with the swamps. Guruup's unit was small, for speed would be their best defense. At Innothule's northernmost point, the froglok unit conferred quickly. If they traveled up through the river valley, they would then need to cut east across the Commonlands to reach Freeport. Or, they could turn west to Qeynos instead. The direct route through the Desert of Ro was not favored, but it had the advantage of being the most direct route to Freeport.")
  61. end
  62. function Page5(Item, Player)
  63. conversation = CreateConversation()
  64. if GetQuestStep(Player,Deep)==8 then
  65. QuestStepIsComplete(Player,Deep,8)
  66. end
  67. if GetQuestStep(Player,Deep) >=10 then
  68. AddConversationOption(conversation, "Entry Six","Page6")
  69. end
  70. AddConversationOption(conversation, "Turn back to previous entry.","Page4")
  71. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  72. StartDialogConversation(conversation, 2, Item, Player, "\"We must make haste, Guruup,\" whispered Barab, one of his lieutenants. \"Though the Desert is dangerously dry, it would be the way anyone would least likely expect us to take.\" Guruup nodded and said, \"You speak the truth, Barab. Through the Desert of Ro!\" They caked their skin with mud to protect it from the hot desert air, then pushed onward. To increase their chances of survival, they subdivided into smaller units that one by one crossed into the unforgiving desert.")
  73. end
  74. function Page6(Item, Player)
  75. conversation = CreateConversation()
  76. if GetQuestStep(Player,Deep)==10 then
  77. QuestStepIsComplete(Player,Deep,10)
  78. end
  79. if GetQuestStep(Player,Deep) >=12 then
  80. AddConversationOption(conversation, "Entry Seven","Page7")
  81. end
  82. AddConversationOption(conversation, "Turn back to previous entry.","Page5")
  83. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  84. StartDialogConversation(conversation, 2, Item, Player, "Traveling by night to keep out of the sun, the frogloks struggled through the swirling sands. Their skin was soft and supple by nature. Even with a layer of dried mud upon it, the frogloks felt the oppressive dryness in the air that seemed to suck every last ounce of energy from them. Gusts of wind drove the sand into their faces, rubbing them raw. As their skin cracked from lack of moisture, some of the frogloks picked at the scabs that formed almost instantly in the heat, licking their wounds to moisten their tongues with their own blood.")
  85. end
  86. function Page7(Item, Player)
  87. conversation = CreateConversation()
  88. if GetQuestStep(Player,Deep)==12 then
  89. QuestStepIsComplete(Player,Deep,12)
  90. end
  91. if GetQuestStep(Player,Deep) >=14 then
  92. AddConversationOption(conversation, "Entry Eight","Page8")
  93. end
  94. AddConversationOption(conversation, "Turn back to previous entry.","Page6")
  95. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  96. StartDialogConversation(conversation, 2, Item, Player, "They were a tired, footsore and bedraggled group when they reached Freeport at last. Though many had not survived the harsh crossing, between the heat and the sand giants, more than three-quarters of Guruup's was still unit intact. The frogloks paused briefly to take rooms at a local inn and to cleanse themselves, then they hurried to gain an audience with the Overlord.")
  97. end
  98. function Page8(Item, Player)
  99. conversation = CreateConversation()
  100. if GetQuestStep(Player,Deep)==14 then
  101. QuestStepIsComplete(Player,Deep,14)
  102. end
  103. if GetQuestStep(Player,Deep) >=16 then
  104. AddConversationOption(conversation, "Entry Nine","Page9")
  105. end
  106. AddConversationOption(conversation, "Turn back to previous entry.","Page7")
  107. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  108. StartDialogConversation(conversation, 2, Item, Player, "An audience with the Overlord is not always granted, and certainly never at the first request. Guruup and his lieutenants waited three days before the Overlord would see them. Even then, it was clear that he was doing so for his own hidden purpose. He met with Guruup in the long hallway and Guruup had to complete his petition before the Overlord reached the opposite end of the hall.")
  109. end
  110. function Page9(Item, Player)
  111. conversation = CreateConversation()
  112. if GetQuestStep(Player,Deep)==16 then
  113. QuestStepIsComplete(Player,Deep,16)
  114. end
  115. if GetQuestStep(Player,Deep) >=18 then
  116. AddConversationOption(conversation, "Entry Ten","Page10")
  117. end
  118. AddConversationOption(conversation, "Turn back to previous entry.","Page8")
  119. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  120. StartDialogConversation(conversation, 2, Item, Player, "Guruup was unable to convince the Overlord of the seriousness of the ogre forces. \"Come now, little one,\" the Overlord said upon reaching the hall's end. \"You have been fighting everyone for control of Grobb -- that is, Gukta -- for many generations. This is another petty squabble; I'm afraid Freeport's military cannot be spared on something like this. You'll have better luck elsewhere.\" Guruup bowed, concealing his anger as the Overlord exited the hall.")
  121. end
  122. function Page10(Item, Player)
  123. conversation = CreateConversation()
  124. if GetQuestStep(Player,Deep)==18 then
  125. QuestStepIsComplete(Player,Deep,18)
  126. end
  127. AddConversationOption(conversation, "Turn back to previous entry.","Page9")
  128. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  129. StartDialogConversation(conversation, 2, Item, Player, "\"The Overlord will not get involved,\" Guruup told the frogloks. \"We have rested here long enough; let us proceed now to Qeynos. May the hand of Marr guide us.\" \"May the hand of Marr guide us,\" Guruup's unit repeated reverently. And so, the frogloks prepared for their next journey: across the Commonlands and through the plains of Karana to reach the city of Qeynos.")
  130. end
  131. function QuestStart(Item,Player)
  132. CloseItemConversation(Item,Player)
  133. OfferQuest(nil, Player, Deep)
  134. end