cataloging_local_critters.lua 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. --[[
  2. Script Name : Quests/SunkenCity/cataloging_local_critters.lua
  3. Script Purpose : Handles the quest, "Cataloging Local Critters"
  4. Script Author : Scatman
  5. Script Date : 2009.07.28 (15.7.2022 by torsten)
  6. Zone : Sunken City
  7. Quest Giver: Inquisitor Thorson
  8. Preceded by: Spirits of the Night (spirits_of_the_night.lua)
  9. Followed by: Finding the Investigator (finding_the_investigator)
  10. --]]
  11. function Init(Quest)
  12. AddQuestStep(Quest, 1, "I need to catalog the presence of a brine sifter.", 1, 100, "I need to use the Catalogue Creature ability found in my Knowledge Book to obtain information on the local vermin.", 0)
  13. AddQuestStep(Quest, 2, "I need to catalog the presence of a small rust monster.", 1, 100, "I need to use the Catalogue Creature ability found in my Knowledge Book to obtain information on the local vermin.", 0)
  14. AddQuestStep(Quest, 3, "I must catalog the presence of a rust monster.", 1, 100, "I need to use the Catalogue Creature ability found in my Knowledge Book to obtain information on the local vermin.", 0)
  15. AddQuestStep(Quest, 4, "I need to catalog the presence of a small scorpion.", 1, 100, "I need to use the Catalogue Creature ability found in my Knowledge Book to obtain information on the local vermin.", 0)
  16. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_BrineSifter")
  17. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_SmallRustMonster")
  18. AddQuestStepCompleteAction(Quest, 3, "Step3_Complete_RustMonster")
  19. AddQuestStepCompleteAction(Quest, 4, "Step4_Complete_SmallScorpion")
  20. end
  21. function Accepted(Quest, QuestGiver, Player)
  22. FaceTarget(QuestGiver, Player)
  23. conversation = CreateConversation()
  24. AddConversationOption(conversation, "I'll return when I'm done.")
  25. StartConversation(conversation, QuestGiver, Player, "The Knowledge Book you obtained on the Outpost of the Overlord contains many Abilities that will prove useful to you. Among these Abilities is one called Catalogue Creature. If you draw close to a creature, you can use this ability to obtain information about it. Everything I need to know will be recorded in your Quest Journal. There is no need to attack any of these creatures, simply use the Catalogue Creature ability on them.")
  26. end
  27. function Declined(Quest, QuestGiver, Player)
  28. end
  29. function Step1_Complete_BrineSifter(Quest, QuestGiver, Player)
  30. UpdateQuestStepDescription(Quest, 1, "I have found that there are quite a lot of brine sifters here.")
  31. if QuestIsComplete(Player, 378) then
  32. AllCreaturesCataloged(Quest, QuestGiver, Player)
  33. end
  34. end
  35. function Step2_Complete_SmallRustMonster(Quest, QuestGiver, Player)
  36. UpdateQuestStepDescription(Quest, 2, "I have discovered that small rust monsters live in this area.")
  37. if QuestIsComplete(Player, 378) then
  38. AllCreaturesCataloged(Quest, QuestGiver, Player)
  39. end
  40. end
  41. function Step3_Complete_RustMonster(Quest, QuestGiver, Player)
  42. UpdateQuestStepDescription(Quest, 3, "I have found rust monsters here in the Sunken City.")
  43. if QuestIsComplete(Player, 378) then
  44. AllCreaturesCataloged(Quest, QuestGiver, Player)
  45. end
  46. end
  47. function Step4_Complete_SmallScorpion(Quest, QuestGiver, Player)
  48. UpdateQuestStepDescription(Quest, 4, "I have found small scorpions here in the Sunken City.")
  49. if QuestIsComplete(Player, 378) then
  50. AllCreaturesCataloged(Quest, QuestGiver, Player)
  51. end
  52. end
  53. function AllCreaturesCataloged(Quest, QuestGiver, Player)
  54. UpdateQuestTaskGroupDescription(Quest, 1, "I have obtained information on the local creatures.")
  55. AddQuestStepChat(Quest, 5, "I should take the information I obtained back to Inquisitor Thorson..", 1, "I should return to Inquisitor Thorson with what I have learned.", 0, 1240024)
  56. AddQuestStepCompleteAction(Quest, 5, "Quest_Complete")
  57. end
  58. function Quest_Complete(Quest, QuestGiver, Player)
  59. UpdateQuestStepDescription(Quest, 5, "I have taken the information back to Inquisitor Thorson.")
  60. UpdateQuestTaskGroupDescription(Quest, 2, "I gave my information to Inquisitor Thorson.")
  61. GiveQuestReward(Quest, Player)
  62. UpdateQuestDescription(Quest, "I successfully gathered information on several different kinds of creatures. Though a haunted place, the Sunken City is alive with small creatures... and some larger ones.")
  63. end
  64. function Reload(Quest, QuestGiver, Player, Step)
  65. if Step == 1 then
  66. Step1_Complete_BrineSifter(Quest, QuestGiver, Player)
  67. elseif Step == 2 then
  68. Step2_Complete_SmallRustMonster(Quest, QuestGiver, Player)
  69. elseif Step == 3 then
  70. Step3_Complete_RustMonster(Quest, QuestGiver, Player)
  71. elseif Step == 4 then
  72. Step4_Complete_SmallScorpion(Quest, QuestGiver, Player)
  73. elseif Step == 5 then
  74. Quest_Complete(Quest, QuestGiver, Player)
  75. end
  76. end