9
3

TheRatQueenofVerminsSnye.lua 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. --[[
  2. Script Name : ItemScripts/TheRatQueenofVerminsSnye.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.09.18 03:09:18
  5. Script Purpose :
  6. :
  7. --]]
  8. local Quest = 5886
  9. function examined(Item, Player)
  10. Intro(Item,Player)
  11. end
  12. function Intro(Item,Player)
  13. conversation = CreateConversation()
  14. AddConversationOption(conversation, "Entry Two","Page2")
  15. if HasQuest(Player,Quest) then
  16. AddConversationOption(conversation, "Turn to last page","PageCheck")
  17. end
  18. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  19. StartDialogConversation(conversation, 2, Item, Player, "\"My Life,\" by Ayamia the Unfortunate, together with \"An Examination of the Rat Queen,\" by the Scholars' Institute for Change, a non-profit organization. Quotations are liberally taken from Ayamia's own volume, interspersed with logical explanations where necessary.")
  20. end
  21. function PageCheck(Item,Player)
  22. if GetQuestStep(Player,Quest) ==1 or GetQuestStep(Player,Quest) ==2 then
  23. Page1(Item, Player)
  24. elseif GetQuestStep(Player,Quest) ==3 or GetQuestStep(Player,Quest) == 4 then
  25. Page2(Item, Player)
  26. elseif GetQuestStep(Player,Quest) == 5 or GetQuestStep(Player,Quest) ==6 then
  27. Page3(Item, Player)
  28. elseif GetQuestStep(Player,Quest) ==7 or GetQuestStep(Player,Quest) ==8 then
  29. Page4(Item, Player)
  30. elseif GetQuestStep(Player,Quest) ==9 or GetQuestStep(Player,Quest) ==10 then
  31. Page5(Item, Player)
  32. elseif GetQuestStep(Player,Quest) ==11 or GetQuestStep(Player,Quest) ==12 then
  33. Page6(Item, Player)
  34. elseif GetQuestStep(Player,Quest) ==13 or GetQuestStep(Player,Quest) ==14 then
  35. Page7(Item, Player)
  36. elseif GetQuestStep(Player,Quest) ==15 or GetQuestStep(Player,Quest) ==16 then
  37. Page8(Item, Player)
  38. elseif GetQuestStep(Player,Quest) ==17 or GetQuestStep(Player,Quest) ==18 then
  39. Page9(Item, Player)
  40. end
  41. end
  42. function Page1(Item, Player)
  43. conversation = CreateConversation()
  44. if CanReceiveQuest(Player,Quest) then
  45. AddConversationOption(conversation, "Start looking for the missing pages","QuestStart")
  46. elseif GetQuestStep(Player,Quest) >=2 then
  47. AddConversationOption(conversation, "Entry Two","Page2")
  48. end
  49. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  50. StartDialogConversation(conversation, 2, Item, Player, "\"Chapter One -- How I Came to Live in the Vermin's Snye.\" I've heard what some people say about me, and let me tell you straight away that it is not true. My husband abandoned me and I had no choice to but to find a place to live with my children. Our landlord, wretched human scum, turned us onto the streets! I am not as young as I once was, but I am resourceful. By living below, my children and I would be out of the elements. We could find a cozy place to call our own.")
  51. end
  52. function Page2(Item, Player)
  53. conversation = CreateConversation()
  54. if GetQuestStep(Player,Quest)==2 then
  55. SetStepComplete(Player,Quest,2)
  56. end
  57. if GetQuestStep(Player,Quest) >=4 then
  58. AddConversationOption(conversation, "Entry Three","Page3")
  59. end
  60. AddConversationOption(conversation, "Turn back to previous entry.","Page1")
  61. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  62. StartDialogConversation(conversation, 2, Item, Player, "\"Analysis of Chapter One.\" Clearly, the subject is in denial of her current status. Her husband is recorded as \"Lord Selien\" so obviously, the subject was a woman who lived in comfort. Her reference to being turned out of her home is correct, but only to the extent that her increasing madness led her to bring to her husband's home all manner of vile creatures, referring to them as her \"children.\" Upon her husband's death in battle, his family shunned the subject, which further isolated her, causing her to seek shelter elsewhere.")
  63. end
  64. function Page3(Item, Player)
  65. conversation = CreateConversation()
  66. if GetQuestStep(Player,Quest)==4 then
  67. SetStepComplete(Player,Quest,4)
  68. end
  69. if GetQuestStep(Player,Quest) >=6 then
  70. AddConversationOption(conversation, "Entry Four","Page4")
  71. end
  72. AddConversationOption(conversation, "Turn back to previous entry.","Page2")
  73. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  74. StartDialogConversation(conversation, 2, Item, Player, "\"Chapter Two -- My Children.\" I am blessed with seven sons, all in the peak of their strength and youth. The eldest is Varion. He looks remarkably like his dear, departed father. I wished to name all my sons in such a way that their names began with the same letter, but my husband forbade me. He relented when I became ill at the birth of our youngest, Voland. I am so blessed by Tunare! Seven sons! My only regret is that I have no daughters, but I am not complaining, for my sons will carry on the name of their father's house.")
  75. end
  76. function Page4(Item, Player)
  77. conversation = CreateConversation()
  78. if GetQuestStep(Player,Quest)==6 then
  79. SetStepComplete(Player,Quest,6)
  80. end
  81. if GetQuestStep(Player,Quest) >=8 then
  82. AddConversationOption(conversation, "Entry Five","Page5")
  83. end
  84. AddConversationOption(conversation, "Turn back to previous entry.","Page3")
  85. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  86. StartDialogConversation(conversation, 2, Item, Player, "\"Analysis of Chapter Two.\" Again, the subject tells some of the truth. She did indeed bear seven sons, the first and last of which are named as indicated. And, she did fall ill upon the birth of her final son, rendering her unable to have other children. The subject lay ill for nearly a year, during which time her sons were raised by her sister. When she regained her health, the subject had her sister arrested and executed for treason before she resumed her motherly duties.")
  87. end
  88. function Page5(Item, Player)
  89. conversation = CreateConversation()
  90. if GetQuestStep(Player,Quest)==8 then
  91. SetStepComplete(Player,Quest,8)
  92. end
  93. if GetQuestStep(Player,Quest) >=10 then
  94. AddConversationOption(conversation, "Entry Six","Page6")
  95. end
  96. AddConversationOption(conversation, "Turn back to previous entry.","Page4")
  97. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  98. StartDialogConversation(conversation, 2, Item, Player, "\"Chapter Three -- A Time of Hardship.\" Our move to the catacombs was not without its troubles, of course. My children needed me more than ever, clinging to me in the seemingly perpetual darkness beneath the city streets. We found that the crews who maintained the drains kept piles of fuel to use in the sconces set into the walls. I learned to borrow a bit of their fire to start my own. My eldest found the place I now call home by turning down a little-used side passage. The way is patrolled by roving gangs of thugs, but they left me alone. After all, I am guarded by my seven strong sons!")
  99. end
  100. function Page6(Item, Player)
  101. conversation = CreateConversation()
  102. if GetQuestStep(Player,Quest)==10 then
  103. SetStepComplete(Player,Quest,10)
  104. end
  105. if GetQuestStep(Player,Quest) >=12 then
  106. AddConversationOption(conversation, "Entry Seven","Page7")
  107. end
  108. AddConversationOption(conversation, "Turn back to previous entry.","Page5")
  109. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  110. StartDialogConversation(conversation, 2, Item, Player, "\"Analysis of Chapter Three.\" Again, the subject shows her inability to separate fact from fiction. Her eldest son would not have been able to find her living area as he, together with all his brothers, perished at sea. This occurred during the Shattering, when many travellers perished. In this case, the subject had sent her sons on an errand, the nature of which has never been determined. It is generally believed that the magnitude of the loss, both personally and throughout Norrath, coupled with the knowledge that she sent them on this journey, unhinged her mind.")
  111. end
  112. function Page7(Item, Player)
  113. conversation = CreateConversation()
  114. if GetQuestStep(Player,Quest)==12 then
  115. SetStepComplete(Player,Quest,12)
  116. end
  117. if GetQuestStep(Player,Quest) >=14 then
  118. AddConversationOption(conversation, "Entry Eight","Page8")
  119. end
  120. AddConversationOption(conversation, "Turn back to previous entry.","Page6")
  121. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  122. StartDialogConversation(conversation, 2, Item, Player, "\"Chapter Four -- The Days Grow Long.\" We are comfortable here, for the most part. I find that the days are sometimes long, but one of the boys will entertain me. Asrey, my middle boy, will recite tales of the distant past. I believe he will grow up to be a bard! His voice is clear and true. He loves to stand in the chambers where the ceilings are highest and sing, listening to his own voice echo. He is a good lad, as are all my sons, and I am grateful for their company.")
  123. end
  124. function Page8(Item, Player)
  125. conversation = CreateConversation()
  126. if GetQuestStep(Player,Quest)==14 then
  127. SetStepComplete(Player,Quest,14)
  128. end
  129. if GetQuestStep(Player,Quest) >=16 then
  130. AddConversationOption(conversation, "Entry Nine","Page9")
  131. end
  132. AddConversationOption(conversation, "Turn back to previous entry.","Page7")
  133. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  134. StartDialogConversation(conversation, 2, Item, Player, "\"Analysis of Chapter Four.\" The subject's thrid son, Asrey, did have a legendary voice, even in his youth. He was often called upon to sing before the Bayle family. At the conclusion of one of these events, Lady Larinna Bayle presented him with an engraved flute. The flute was lost at sea with Asrey and his brothers. It is interesting to note that the subject retains excellent memories of the details of her children's lives, but has blocked out the single largest event that befell them -- their own deaths.")
  135. end
  136. function Page9(Item, Player)
  137. conversation = CreateConversation()
  138. if GetQuestStep(Player,Quest)==16 then
  139. SetStepComplete(Player,Quest,16)
  140. end
  141. if GetQuestStep(Player,Quest) >=18 then
  142. AddConversationOption(conversation, "Entry Ten","Page8")
  143. end
  144. AddConversationOption(conversation, "Turn back to previous entry.","Page8")
  145. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  146. StartDialogConversation(conversation, 2, Item, Player, "\"Chapter Five -- A New Beginning.\" I've given up some of the fancy work I used to do before. Now that I must scrape by, I can no longer spend time weaving lace or painting miniatures. I have painted several portraits of my sons, however, that I am quite proud of. They are endlessly fascinating to me. I know it is sometimes difficult for them to live in this place, yet they do not complain. When they wander too far, I miss them terribly. Is that so wrong for a mother? After all, nothing is stronger than a mother\'s love.")
  147. end
  148. function Page10(Item, Player)
  149. conversation = CreateConversation()
  150. if GetQuestStep(Player,Quest)==18 then
  151. SetStepComplete(Player,Quest,18)
  152. end
  153. AddConversationOption(conversation, "Turn back to previous entry.","Page9")
  154. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  155. StartDialogConversation(conversation, 2, Item, Player, "\"Analysis of Chapter Five.\" We were unable to determine where the subject's portraits have gone, if indeed she painted any at all. There is no record of her having been interested in miniature painting prior to her exile to the Vermin's Snye. Some of the lace she created was, however, on display at the Museum of Fine Arts until it was stolen by vandals that tied the bits to some of the rats the subject called \"her children\" before setting them afire. The subject became agitated and defended the rats, thus earning her title of \"Rat Queen.\"")
  156. end
  157. function QuestStart(Item,Player)
  158. CloseItemConversation(Item,Player)
  159. OfferQuest(nil, Player, Quest)
  160. end