9
3

book_bound_to_bring_knowldege.lua 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. --[[
  2. Script Name : Quests/Nettleville/book_bound_to_bring_knowldege.lua
  3. Script Purpose : Handles the quest, "Books Bound to Bring Knowledge"
  4. Script Author : Scatman
  5. Script Date : 2009.08.10
  6. Zone : Nettleville
  7. Quest Giver: Helain Conyers
  8. Preceded by: None
  9. Followed by: Wind Blown Brell Serilis (wind_blown_brell_serilis.lua)
  10. --]]
  11. -- Item ID's
  12. local STACK_OF_BOOKS = 13282
  13. function Init(Quest)
  14. AddQuestStepChat(Quest, 1, "Andret can be found at the scribe building, in the Northern corner of town.", 1, "She has asked me to get some books from Andret Surtees.", 718, 2330035)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_SpokeWithAndret")
  16. end
  17. function Accepted(Quest, QuestGiver, Player)
  18. FaceTarget(QuestGiver, Player)
  19. conversation = CreateConversation()
  20. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers009.mp3", "", "", 154750033, 3665943959, Player)
  21. AddConversationOption(conversation, "Sure thing. Be back soon!")
  22. StartConversation(conversation, QuestGiver, Player, "Uh, thank you! Andret Surtees said that I could borrow some books from him. Always looking for more knowledge! Hehehe. Could you go pick them up for me?")
  23. end
  24. function Declined(Quest, QuestGiver, Player)
  25. end
  26. function Step1_Complete_SpokeWithAndret(Quest, QuestGiver, Player)
  27. UpdateQuestStepDescription(Quest, 1, "Andret gave me a stack of books for her.")
  28. UpdateQuestTaskGroupDescription(Quest, 1, "Andret gave me a stack of books for her.")
  29. -- Stack of books
  30. if not HasItem(Player, STACK_OF_BOOKS, 1) then
  31. SummonItem(Player, STACK_OF_BOOKS)
  32. end
  33. AddQuestStepChat(Quest, 2, "Speak to Helain. She was at the stairs leading to the Mariner's Bell.", 1, "I should return to her, now that I have run the errand.", 0, 2330007)
  34. AddQuestStepCompleteAction(Quest, 2, "Quest_Complete")
  35. end
  36. function Quest_Complete(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 2, "Helain was very thankful for the books.")
  38. UpdateQuestTaskGroupDescription(Quest, 2, "Helain was very thankful for the books.")
  39. -- Stack of books
  40. while HasItem(Player, STACK_OF_BOOKS, 1) do
  41. RemoveItem(Player, STACK_OF_BOOKS)
  42. end
  43. UpdateQuestDescription(Quest, "Helain was very thankful for Andret's books.")
  44. GiveQuestReward(Quest, Player)
  45. end
  46. function Reload(Quest, QuestGiver, Player, Step)
  47. if Step == 1 then
  48. Step1_Complete_SpokeWithAndret(Quest, QuestGiver, Player)
  49. end
  50. end