the_lost_book_of_arbos.lua 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. --[[
  2. Script Name : Quests/CastleviewHamlet/the_lost_book_of_arbos.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.01.29 05:01:14
  5. Script Purpose :
  6. Zone : CastleviewHamlet
  7. Quest Giver: Bleemeb
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. require "SpawnScripts/Generic/DialogModule"
  12. function Init(Quest)
  13. AddQuestStepChat(Quest, 1, "I must find Faeadaen.", 1, "I must search Castleview Hamlet for Faeadaen.", 0, 2360022)
  14. AddQuestStepCompleteAction(Quest, 1, "FaeTalked")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. PlayFlavor(QuestGiver, "", "", "thanks", 0,0 , Player)
  18. CloseConversation(QuestGiver,Player)
  19. end
  20. function Declined(Quest, QuestGiver, Player)
  21. -- Add dialog here for when the quest is declined
  22. end
  23. function Deleted(Quest, QuestGiver, Player)
  24. -- Remove any quest specific items here when the quest is deleted
  25. end
  26. function FaeTalked(Quest, QuestGiver, Player)
  27. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  28. UpdateQuestStepDescription(Quest, 1, "I found Faeadaen in Castleview Hamlet.")
  29. UpdateQuestTaskGroupDescription(Quest, 1, "I found Faeadaen in Castleview Hamlet.")
  30. AddQuestStep(Quest, 2, "I must search for the book at the inn in Castleview.", 1, "I must search for The Book of Arbos at the Bed and Book Inn in Castleview Hamlet.", 0)
  31. AddQuestStepCompleteAction(Quest, 2, "BookshelfTalk")
  32. end
  33. function BookshelfTalk(Quest, QuestGiver, Player)
  34. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  35. UpdateQuestStepDescription(Quest, 2, "I found the lost book.")
  36. UpdateQuestTaskGroupDescription(Quest, 2, "I found the lost book in the inn's bookshelves.")
  37. AddQuestStepChat(Quest, 3, "I must return to Bleemeb.", 1, "I must return this book to Bleemeb.", 718, 2360055)
  38. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  39. end
  40. function QuestComplete(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 3, "I returned to Bleemeb.")
  42. UpdateQuestTaskGroupDescription(Quest, 3, "I returned the lost book to Bleemeb.")
  43. UpdateQuestDescription(Quest, "I retrieved the Book of Arbos and returned it to Bleemeb. The book was written in a rare lost elven language.")
  44. GiveQuestReward(Quest, Player)
  45. end
  46. function Reload(Quest, QuestGiver, Player, Step)
  47. if Step == 1 then
  48. FaeTalked(Quest, QuestGiver, Player)
  49. elseif Step == 2 then
  50. BookshelfTalk(Quest, QuestGiver, Player)
  51. elseif Step == 3 then
  52. QuestComplete(Quest, QuestGiver, Player)
  53. end
  54. end