AlabasterForTheMages.lua 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. --[[
  2. Script Name : AlabasterfortheMages.lua
  3. Script Purpose : Handles the quest, "Alabaster for the Mages"
  4. Script Author : Shatou
  5. Script Date : 1/6/2020
  6. Script Notes :
  7. Zone : Caves
  8. Quest Giver : a chunk of alabaster(examine item)
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. local AN_ALABASTER_GOLEM_ID_1 = 1970030
  13. local AN_ALABASTER_GOLEM_ID_2 = 1970022
  14. local ELSPETH_ASTLEY_ID = 2310087
  15. function Init(Quest)
  16. AddQuestStepKill(Quest, 1, "Gather chunks of alabaster", 5, 66, "I need to gather up five more blocks of alabaster. Should I need to leave the Caves, I may return via any mariner bell within the City of Qeynos.", 1170, AN_ALABASTER_GOLEM_ID_1, AN_ALABASTER_GOLEM_ID_2)
  17. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  18. end
  19. function Step1Complete(Quest, QuestGiver, Player)
  20. UpdateQuestStepDescription(Quest, 1, "You have gathered all five chunks of alabaster.")
  21. UpdateQuestTaskGroupDescription(Quest, 1, "I've gathered up all five blocks of alabaster.")
  22. AddQuestStepChat(Quest, 2, "I need to speak with a mage at the Concordium who is interested in the alabaster", 1, "I need to speak with a mage in the Concordium who will buy the alabaster.", 1170, ELSPETH_ASTLEY_ID)
  23. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  24. end
  25. function QuestComplete(Quest, QuestGiver, Player)
  26. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  27. UpdateQuestStepDescription(Quest, 2, "I sold the alabaster to Elspeth.")
  28. UpdateQuestTaskGroupDescription(Quest, 2, "I've spoken with Elspeth in the Concordium who bought the alabaster from me.")
  29. UpdateQuestDescription(Quest, "I found someone at the Concordium who was willing to take the alabaster off of my hands. Elspeth had need of the alabaster for creating wands.")
  30. GiveQuestReward(Quest, Player)
  31. end
  32. function Reload(Quest, QuestGiver, Player, Step)
  33. if Step == 1 then
  34. Step1Complete(Quest, QuestGiver, Player)
  35. elseif Step == 2 then
  36. QuestComplete(Quest, QuestGiver, Player)
  37. end
  38. end
  39. function Accepted(Quest, QuestGiver, Player)
  40. -- Add dialog here for when the quest is accepted
  41. end
  42. function Declined(Quest, QuestGiver, Player)
  43. -- Add dialog here for when the quest is declined
  44. end