the_lost_book_of_arbos.lua 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. function Init(Quest)
  12. AddQuestStepChat(Quest, 1, "I must find Faeadaen.", 1, "I must search Castleview Hamlet for Faeadaen.", 0, 2360022)
  13. AddQuestStepCompleteAction(Quest, 1, "FaeTalked")
  14. end
  15. function Accepted(Quest, QuestGiver, Player)
  16. -- Add dialog here for when the quest is accepted
  17. end
  18. function Declined(Quest, QuestGiver, Player)
  19. -- Add dialog here for when the quest is declined
  20. end
  21. function Deleted(Quest, QuestGiver, Player)
  22. -- Remove any quest specific items here when the quest is deleted
  23. end
  24. function FaeTalked(Quest, QuestGiver, Player)
  25. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  26. UpdateQuestStepDescription(Quest, 1, "I found Faeadaen in Castleview Hamlet.")
  27. UpdateQuestTaskGroupDescription(Quest, 1, "I found Faeadaen in Castleview Hamlet.")
  28. 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)
  29. AddQuestStepCompleteAction(Quest, 2, "BookshelfTalk")
  30. end
  31. function BookshelfTalk(Quest, QuestGiver, Player)
  32. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  33. UpdateQuestStepDescription(Quest, 2, "I found the lost book.")
  34. UpdateQuestTaskGroupDescription(Quest, 2, "I found the lost book in the inn's bookshelves.")
  35. AddQuestStepChat(Quest, 3, "I must return to Bleemeb.", 1, "I must return this book to Bleemeb.", 718, 2360055)
  36. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  37. end
  38. function QuestComplete(Quest, QuestGiver, Player)
  39. UpdateQuestStepDescription(Quest, 3, "I returned to Bleemeb.")
  40. UpdateQuestTaskGroupDescription(Quest, 3, "I returned the lost book to Bleemeb.")
  41. UpdateQuestDescription(Quest, "I retrieved the Book of Arbos and returned it to Bleemeb. The book was written in a rare lost elven language.")
  42. GiveQuestReward(Quest, Player)
  43. end
  44. function Reload(Quest, QuestGiver, Player, Step)
  45. if Step == 1 then
  46. FaeTalked(Quest, QuestGiver, Player)
  47. elseif Step == 2 then
  48. BookshelfTalk(Quest, QuestGiver, Player)
  49. elseif Step == 3 then
  50. QuestComplete(Quest, QuestGiver, Player)
  51. end
  52. end