forgotten_potion.lua 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. --[[
  2. Script Name : Quests/TheCryptofBetrayal/forgotten_potion.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.10.15 08:10:45
  5. Script Purpose :
  6. Zone : TheCryptofBetrayal
  7. Quest Giver:
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepKill(Quest, 1, "Maglus wants me to collect shriller wings.", 10, 30, "I need to collect forsaken shriller wings inside the Crypt of Betrayal and give them to Cryptkeeper Maglus.", 140, 2010026, 2010003, 2010035)
  13. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  14. end
  15. function Accepted(Quest, QuestGiver, Player)
  16. FaceTarget(QuestGiver, Player)
  17. local conversation = CreateConversation()
  18. if GetClientVersion(Player) == 546 then
  19. SendStateCommand(QuestGiver, 13061)
  20. else
  21. PlayAnimation(QuestGiver, 13061)
  22. end
  23. AddConversationOption(conversation, "I will be back.")
  24. StartConversation(conversation, QuestGiver, Player, "Perfect! That's fifteen ... no, ten! Yes, ten more shriller wings! They're easy pickings in these catacombs. Thanks!")
  25. end
  26. function Declined(Quest, QuestGiver, Player)
  27. -- Add dialog here for when the quest is declined
  28. end
  29. function Deleted(Quest, QuestGiver, Player)
  30. -- Remove any quest specific items here when the quest is deleted
  31. end
  32. function Step1Complete(Quest, QuestGiver, Player)
  33. UpdateQuestStepDescription(Quest, 1, "I have collected shriller wings.")
  34. UpdateQuestTaskGroupDescription(Quest, 1, "I have the shriller wings for Maglus.")
  35. AddQuestStepChat(Quest, 2, "I must return to Cryptkeeper Maglus.", 1, "I must take these forsaken shriller wings to Cryptkeeper Maglus in the Crypt of Betrayal.", 11, 2010043)
  36. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  37. end
  38. function QuestComplete(Quest, QuestGiver, Player)
  39. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  40. UpdateQuestStepDescription(Quest, 2, "I gave the forsaken shriller wings to Cryptkeeper Maglus.")
  41. UpdateQuestTaskGroupDescription(Quest, 2, "I gave the forsaken shriller wings to Cryptkeeper Maglus.")
  42. UpdateQuestDescription(Quest, "I obtained ten forsaken shriller wings and gave them to Cryptkeeper Maglus so that she can make her potion.")
  43. GiveQuestReward(Quest, Player)
  44. end
  45. function Reload(Quest, QuestGiver, Player, Step)
  46. if Step == 1 then
  47. Step1Complete(Quest, QuestGiver, Player)
  48. elseif Step == 2 then
  49. QuestComplete(Quest, QuestGiver, Player)
  50. end
  51. end