9
3

IsabellaCellusFamilyHistoryBook.lua 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. --[[
  2. Script Name : ItemScripts/IsabellaCellusFamilyHistoryBook.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.05.20 02:05:33
  5. Script Purpose :
  6. :
  7. --]]
  8. local Quest = 5843
  9. function examined(Item, Player)
  10. conversation = CreateConversation()
  11. if not HasQuest(Player,Quest) and not HasCompletedQuest(Player,Quest) then
  12. AddConversationOption(conversation, "Read the intro","Intro")
  13. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  14. StartDialogConversation(conversation, 2, Item, Player, "This is more of a portfolio than book as so many pages are missing. Reading through the pages that exist, I get the impression that the remaining pages are likely to be found in and around Antonica.")
  15. else
  16. Intro(Item,Player)
  17. end
  18. end
  19. function Intro(Item,Player)
  20. conversation = CreateConversation()
  21. AddConversationOption(conversation, "Entry One","Page1")
  22. if HasQuest(Player,Quest) then
  23. AddConversationOption(conversation, "Turn to last page","PageCheck")
  24. end
  25. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  26. StartDialogConversation(conversation, 2, Item, Player, "I am sure that some of my family’s writings still exist elsewhere in Norrath. Unless they were destroyed in the Shattering or as mentioned before, held back by unscrupulous vendors. Whatever portion of this tome you have, cherish it and remember the Cellus family of Qeynos.")
  27. end
  28. function PageCheck(Item,Player)
  29. if GetQuestStep(Player,Quest) ==1 or GetQuestStep(Player,Quest) ==2 then
  30. Page1(Item, Player)
  31. elseif GetQuestStep(Player,Quest) ==3 or GetQuestStep(Player,Quest) == 4 then
  32. Page2(Item, Player)
  33. elseif GetQuestStep(Player,Quest) == 5 or GetQuestStep(Player,Quest) ==6 then
  34. Page3(Item, Player)
  35. elseif GetQuestStep(Player,Quest) ==7 or GetQuestStep(Player,Quest) ==8 then
  36. Page4(Item, Player)
  37. elseif GetQuestStep(Player,Quest) ==9 or GetQuestStep(Player,Quest) ==10 then
  38. Page5(Item, Player)
  39. elseif GetQuestStep(Player,Quest) ==11 or GetQuestStep(Player,Quest) ==12 then
  40. Page6(Item, Player)
  41. elseif GetQuestStep(Player,Quest) ==13 or GetQuestStep(Player,Quest) ==14 then
  42. Page7(Item, Player)
  43. elseif GetQuestStep(Player,Quest) ==15 or GetQuestStep(Player,Quest) ==16 then
  44. Page8(Item, Player)
  45. elseif GetQuestStep(Player,Quest) ==17 or GetQuestStep(Player,Quest) ==18 then
  46. Page9(Item, Player)
  47. end
  48. end
  49. function Page1(Item, Player)
  50. conversation = CreateConversation()
  51. if CanReceiveQuest(Player,Quest)then
  52. QuestStart(Item,Player)
  53. end
  54. if GetQuestStep(Player,Quest) >=2 then
  55. AddConversationOption(conversation, "Entry Two","Page2")
  56. end
  57. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  58. StartDialogConversation(conversation, 2, Item, Player, "“Antonica,”\nby Isabella Cellus.\n\nI am travelling through an area known as Qeynos Hills. It’s filled with quite a population of animals and different sorts of folks. Someone is following me -")
  59. end
  60. function Page2(Item, Player)
  61. conversation = CreateConversation()
  62. if GetQuestStep(Player,Quest)==2 then
  63. SetStepComplete(Player,Quest,2)
  64. end
  65. if GetQuestStep(Player,Quest) >=4 then
  66. AddConversationOption(conversation, "Entry Three","Page3")
  67. end
  68. AddConversationOption(conversation, "Turn back to previous entry.","Page1")
  69. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  70. StartDialogConversation(conversation, 2, Item, Player, "-- so I am not enjoying this journey. Anyway, from these Hills, one can see North Qeynos, Western Karana and the frosted peaks of the northern mountains. The Sabertooth gnolls that came over from Blackburrow are especially annoying. They keep stealing my paper! Those little runts! During my --")
  71. end
  72. function Page3(Item, Player)
  73. conversation = CreateConversation()
  74. if GetQuestStep(Player,Quest)==4 then
  75. SetStepComplete(Player,Quest,4)
  76. end
  77. if GetQuestStep(Player,Quest) >=6 then
  78. AddConversationOption(conversation, "Entry Four","Page4")
  79. end
  80. AddConversationOption(conversation, "Turn back to previous entry.","Page2")
  81. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  82. StartDialogConversation(conversation, 2, Item, Player, "-- travels, I’ve met a lovely ranger named Holly Windstalker. She’s very friendly and outgoing, but a bit crazed about wolves and bears. We were having a picnic near the Surefall Glades, when someone walked by with --")
  83. end
  84. function Page4(Item, Player)
  85. conversation = CreateConversation()
  86. if GetQuestStep(Player,Quest)==6 then
  87. SetStepComplete(Player,Quest,6)
  88. end
  89. if GetQuestStep(Player,Quest) >=8 then
  90. AddConversationOption(conversation, "Entry Five","Page5")
  91. end
  92. AddConversationOption(conversation, "Turn back to previous entry.","Page3")
  93. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  94. StartDialogConversation(conversation, 2, Item, Player, "-- a wolf pelt over his shoulder. Holly went nuts! She up and gave this poor fellow a piece of her mind, then chased him all the way to Blackburrow! He shouted at her, “My lady --")
  95. end
  96. function Page5(Item, Player)
  97. conversation = CreateConversation()
  98. if GetQuestStep(Player,Quest)==8 then
  99. SetStepComplete(Player,Quest,8)
  100. end
  101. if GetQuestStep(Player,Quest) >=10 then
  102. AddConversationOption(conversation, "Entry Six","Page6")
  103. end
  104. AddConversationOption(conversation, "Turn back to previous entry.","Page4")
  105. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  106. StartDialogConversation(conversation, 2, Item, Player, "-- the wolf attacked me first!” Holly didn’t seem to care. I think I’ll head over that way to interview him for my next bit on Blackburrow. Thanks to Holly, now I know someone who goes there!")
  107. end
  108. function Page6(Item, Player)
  109. conversation = CreateConversation()
  110. if GetQuestStep(Player,Quest)==10 then
  111. SetStepComplete(Player,Quest,10)
  112. end
  113. if GetQuestStep(Player,Quest) >=12 then
  114. AddConversationOption(conversation, "Entry Seven","Page7")
  115. end
  116. AddConversationOption(conversation, "Turn back to previous entry.","Page5")
  117. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  118. StartDialogConversation(conversation, 2, Item, Player, "The fellow Holly chased to Blackburrow is related to a handsome scout named Malityn. He’s very noble and good-hearted, and I’ve been spending a lot of time with him. Blackburrow is a classic dungeon, very dark and gloomier the further down into it one gets. Groups of Sabertooth gnolls are hard at work digging out tunnels. With Malityn at my side, however, I felt very safe. He must do something about --")
  119. end
  120. function Page7(Item, Player)
  121. conversation = CreateConversation()
  122. if GetQuestStep(Player,Quest)==12 then
  123. SetStepComplete(Player,Quest,12)
  124. end
  125. if GetQuestStep(Player,Quest) >=14 then
  126. AddConversationOption(conversation, "Entry Eight","Page8")
  127. end
  128. AddConversationOption(conversation, "Turn back to previous entry.","Page6")
  129. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  130. StartDialogConversation(conversation, 2, Item, Player, "-- his hair. Anyway, Blackburrow is a pretty dismal place and dampness is not good for my complexion. Malityn was starting to be so possessive! If anyone so much as spoke to me, he’d whack off their head! So, it’s farewell to Malityn and back to Qeynos Hills. Hopefully, I’ll be able to shake this cold. I’m going to gather some willowbark to brew some tea, which will help tremendously with my headache. I saw some willows to the north, beyond the aqueduct.")
  131. end
  132. function Page8(Item, Player)
  133. conversation = CreateConversation()
  134. if GetQuestStep(Player,Quest)==14 then
  135. SetStepComplete(Player,Quest,14)
  136. end
  137. if GetQuestStep(Player,Quest) >=16 then
  138. AddConversationOption(conversation, "Entry Nine","Page9")
  139. end
  140. AddConversationOption(conversation, "Turn back to previous entry.","Page7")
  141. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  142. StartDialogConversation(conversation, 2, Item, Player, "There is a lot of unrest these days in the Qeynos Hills, which makes me rethink my adventuring out in the wilds. Barbarians are moving southward from their home in Halas, although the reason isn’t clear to me. They sure are big, though! I might wander up that way. That would mean another trip through Blackburrow, though, and I am not sure I’m ready to face --")
  143. end
  144. function Page9(Item, Player)
  145. conversation = CreateConversation()
  146. if GetQuestStep(Player,Quest)==16 then
  147. SetStepComplete(Player,Quest,16)
  148. end
  149. if GetQuestStep(Player,Quest) >=18 then
  150. AddConversationOption(conversation, "Entry Ten","Page10")
  151. end
  152. AddConversationOption(conversation, "Turn back to previous entry.","Page8")
  153. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  154. StartDialogConversation(conversation, 2, Item, Player, "-- Malityn. Unless he’s ready to move on with me, there is no point in continuing to see him. Holly says scouts can be that way, especially when he spends all that time underground, investigating those gnolls. Some days I wish I had --")
  155. end
  156. function Page10(Item, Player)
  157. conversation = CreateConversation()
  158. if GetQuestStep(Player,Quest)==18 then
  159. SetStepComplete(Player,Quest,18)
  160. end
  161. AddConversationOption(conversation, "Turn back to previous entry.","Page9")
  162. AddConversationOption(conversation, "Close the book.","CloseItemConversation")
  163. StartDialogConversation(conversation, 2, Item, Player, "-- never left the safety of South Qeynos. Malityn says he’s ready to leave Blackburrow and come with me, as he thinks the damp is ruining his hair. At last! The woods and hills are lovely but I will lay aside my pen for now and return to my home. Perhaps our daughter will carry on the tale.")
  164. end
  165. function QuestStart(Item,Player)
  166. CloseItemConversation(Item,Player)
  167. OfferQuest(nil, Player, Quest)
  168. end