TrinketsOfTheDead.lua 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. --[[
  2. Script Name : Quests/NektroposCastle/TrinketsOfTheDead.lua
  3. Script Purpose : Trinkets of the Dead
  4. Script Author : smash
  5. Script Date : 2016.1.24
  6. Zone : Nektropos Castle
  7. Quest Giver : Master Eldin Necrosis
  8. Preceded by : None
  9. Followed by : None
  10. --]]
  11. function Init(Quest)
  12. AddStep1(Quest)
  13. AddStep2(Quest)
  14. AddStep3(Quest)
  15. AddStep4(Quest)
  16. AddStep5(Quest)
  17. AddStep6(Quest)
  18. AddStep7(Quest)
  19. AddStep8(Quest)
  20. AddStep9(Quest)
  21. AddStep10(Quest)
  22. end
  23. function Accepted(Quest, QuestGiver, Player)
  24. AcceptedDialog(QuestGiver, Player)
  25. end
  26. function Declined(Quest, QuestGiver, Player)
  27. end
  28. function Deleted()
  29. end
  30. function AcceptedDialog(QuestGiver, Player)
  31. FaceTarget(QuestGiver, Player)
  32. conversation = CreateConversation()
  33. PlayFlavor(QuestGiver, "voiceover/english/master_eldin_necrosis_/nektropos/eldin006.mp3", "", "", 2450617503, 1834362480, Player)
  34. AddConversationOption(conversation, "No problem at all!")
  35. StartConversation(conversation, QuestGiver, Player, "I'll pay you. Just head inside and bring me back whatever treasures you find! Once you finish, return to me, and I'll see about your payment!")
  36. end
  37. function AddStep1(Quest)
  38. AddQuestStepKill(Quest, 1, "I need to retrieve the Inquisitor of Ullkorruuk's censer.", 1, 100, "Eldin has asked me to retrieve several different kinds of items from the ghosts in Nektropos Castle.", 370, 1780194)
  39. AddQuestStepCompleteAction(Quest, 1, "Step1Completed")
  40. end
  41. function Step1Completed(Quest, QuestGiver, Player)
  42. UpdateQuestStepDescription(Quest, 1, "I have found the censer.")
  43. ShouldAddStep11(Quest, Player)
  44. end
  45. function AddStep2(Quest)
  46. AddQuestStepKill(Quest, 2, "I need to take the holy water from a priestess of Ullkorruuk.", 1, 100, "Eldin has asked me to retrieve several different kinds of items from the ghosts in Nektropos Castle.", 176, 1780009)
  47. AddQuestStepCompleteAction(Quest, 2, "Step2Completed")
  48. end
  49. function Step2Completed(Quest, QuestGiver, Player)
  50. UpdateQuestStepDescription(Quest, 2, "I have the holy water.")
  51. ShouldAddStep11(Quest, Player)
  52. end
  53. function AddStep3(Quest)
  54. AddQuestStepKill(Quest, 3, "I need to retrieve one of Lord Everling's shirts from an Everling manservant.", 1, 100, "Eldin has asked me to retrieve several different kinds of items from the ghosts in Nektropos Castle.", 1736, 1780038, 1780040, 1780036)
  55. AddQuestStepCompleteAction(Quest, 3, "Step3Completed")
  56. end
  57. function Step3Completed(Quest, QuestGiver, Player)
  58. UpdateQuestStepDescription(Quest, 3, "I have the shirt.")
  59. ShouldAddStep11(Quest, Player)
  60. end
  61. function AddStep4(Quest)
  62. AddQuestStepKill(Quest, 4, "I need to get the keyring from an Everling stable boy.", 1, 100, "Eldin has asked me to retrieve several different kinds of items from the ghosts in Nektropos Castle.", 2174, 1780027)
  63. AddQuestStepCompleteAction(Quest, 4, "Step4Completed")
  64. end
  65. function Step4Completed(Quest, QuestGiver, Player)
  66. UpdateQuestStepDescription(Quest, 4, "I have the found the keyring.")
  67. ShouldAddStep11(Quest, Player)
  68. end
  69. function AddStep5(Quest)
  70. AddQuestStepKill(Quest, 5, "I need to take a scabard from a Thexian guard.", 1, 100, "Eldin has asked me to retrieve several different kinds of items from the ghosts in Nektropos Castle.", 921, 1780015, 1780029)
  71. AddQuestStepCompleteAction(Quest, 5, "Step5Completed")
  72. end
  73. function Step5Completed(Quest, QuestGiver, Player)
  74. UpdateQuestStepDescription(Quest, 5, "I have taken the scabard.")
  75. ShouldAddStep11(Quest, Player)
  76. end
  77. function AddStep6(Quest)
  78. AddQuestStepKill(Quest, 6, "I should take the coin purse of a dark patron.", 1, 100, "Eldin has asked me to retrieve several different kinds of items from the ghosts in Nektropos Castle.", 10, 1780003, 1780192)
  79. AddQuestStepCompleteAction(Quest, 6, "Step6Completed")
  80. end
  81. function Step6Completed(Quest, QuestGiver, Player)
  82. UpdateQuestStepDescription(Quest, 6, "I have taken the coin purse.")
  83. ShouldAddStep11(Quest, Player)
  84. end
  85. function AddStep7(Quest)
  86. AddQuestStepKill(Quest, 7, "I need to get the hair brush from Elise's handmaiden.", 1, 100, "Eldin has asked me to retrieve several different kinds of items from the ghosts in Nektropos Castle.", 1228, 1780195)
  87. AddQuestStepCompleteAction(Quest, 7, "Step7Completed")
  88. end
  89. function Step7Completed(Quest, QuestGiver, Player)
  90. UpdateQuestStepDescription(Quest, 7, "I have the brush.")
  91. ShouldAddStep11(Quest, Player)
  92. end
  93. function AddStep8(Quest)
  94. AddQuestStepKill(Quest, 8, "I should retrieve Sheila Everling's bodice from her handmaiden.", 1, 100, "Eldin has asked me to retrieve several different kinds of items from the ghosts in Nektropos Castle.", 1738, 1780196)
  95. AddQuestStepCompleteAction(Quest, 8, "Step8Completed")
  96. end
  97. function Step8Completed(Quest, QuestGiver, Player)
  98. UpdateQuestStepDescription(Quest, 8, "I have the bodice.")
  99. ShouldAddStep11(Quest, Player)
  100. end
  101. function AddStep9(Quest)
  102. AddQuestStepKill(Quest, 9, "I need to find Crysta's bracelet. I'm sure her handmaiden has it.", 1, 100, "Eldin has asked me to retrieve several different kinds of items from the ghosts in Nektropos Castle.", 390, 1780197)
  103. AddQuestStepCompleteAction(Quest, 9, "Step9Completed")
  104. end
  105. function Step9Completed(Quest, QuestGiver, Player)
  106. UpdateQuestStepDescription(Quest, 9, "I have Crysta's bracelet.")
  107. ShouldAddStep11(Quest, Player)
  108. end
  109. function AddStep10(Quest)
  110. AddQuestStepKill(Quest, 10, "I need to find Jenni's hair bow from her handmaiden.", 1, 100, "Eldin has asked me to retrieve several different kinds of items from the ghosts in Nektropos Castle.", 739, 1780198)
  111. AddQuestStepCompleteAction(Quest, 10, "Step10Completed")
  112. end
  113. function Step10Completed(Quest, QuestGiver, Player)
  114. UpdateQuestStepDescription(Quest, 10, "I have the hair bow.")
  115. ShouldAddStep11(Quest, Player)
  116. end
  117. function ShouldAddStep11(Quest, Player)
  118. --Check if step 1-10 have all been completed
  119. local i = 1
  120. local should_add = true
  121. while i < 11 do
  122. if not QuestStepIsComplete(Player, 174, i) then
  123. should_add = false
  124. break
  125. end
  126. i = i + 1
  127. end
  128. if should_add then
  129. AddStep11(Quest)
  130. end
  131. end
  132. function AddStep11(Quest)
  133. AddQuestStepChat(Quest, 11, "I should go speak with Eldin.", 1, "Now that I have gathered all of the trinkets I should go give them to Eldin.", 0, 1780008)
  134. AddQuestStepCompleteAction(Quest, 11, "CompleteQuest")
  135. UpdateQuestTaskGroupDescription(Quest, 1, "I have all of the items that Eldin wanted.")
  136. SetCompleteFlag(Quest)
  137. end
  138. function CompleteQuest(Quest, QuestGiver, Player)
  139. GiveQuestReward(Quest, Player)
  140. end
  141. function Reload(Quest, QuestGiver, Player, Step)
  142. if Step == 1 then
  143. Step1Completed(Quest, QuestGiver, Player)
  144. end
  145. if Step == 2 then
  146. Step2Completed(Quest, QuestGiver, Player)
  147. end
  148. if Step == 3 then
  149. Step3Completed(Quest, QuestGiver, Player)
  150. end
  151. if Step == 4 then
  152. Step4Completed(Quest, QuestGiver, Player)
  153. end
  154. if Step == 5 then
  155. Step5Completed(Quest, QuestGiver, Player)
  156. end
  157. if Step == 6 then
  158. Step6Completed(Quest, QuestGiver, Player)
  159. end
  160. if Step == 7 then
  161. Step7Completed(Quest, QuestGiver, Player)
  162. end
  163. if Step == 8 then
  164. Step8Completed(Quest, QuestGiver, Player)
  165. end
  166. if Step == 9 then
  167. Step9Completed(Quest, QuestGiver, Player)
  168. end
  169. if Step == 10 then
  170. Step10Completed(Quest, QuestGiver, Player)
  171. end
  172. end