a_gift_from_the_serpents_mouth.lua 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. --[[
  2. Script Name : Quests/TheSerpentSewer/a_gift_from_the_serpents_mouth.lua
  3. Script Purpose : Handles the quest, "A Gift From the Serpent's Mouth"
  4. Script Author : premierio015
  5. Script Date : 02.07.2021
  6. Script Notes : Auto generated with QuestParser.
  7. Zone : Serpent Sewer
  8. Quest Giver :
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepChat(Quest, 1, "I need to find someone that can make use of this fang.", 1, "I should find someone in The Serpent Sewer that could make use of this fang.", 11, 1550056)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. -- Add dialog here for when the quest is accepted
  18. end
  19. function Declined(Quest, QuestGiver, Player)
  20. -- Add dialog here for when the quest is declined
  21. end
  22. function Deleted(Quest, QuestGiver, Player)
  23. -- Remove any quest specific items here when the quest is deleted
  24. end
  25. function Step1Complete(Quest, QuestGiver, Player)
  26. UpdateQuestStepDescription(Quest, 1, "I spoke with Marcus Puer.")
  27. UpdateQuestTaskGroupDescription(Quest, 1, "Marcus Puer can make use of the fang.")
  28. AddQuestStepKill(Quest, 2, "I need to collect three filthy moccasin snake skins.", 3, 50, "I need to collect the materials Marcus Puer needs to fashion a weapon from the fang.", 98, 1550002, 1550039)
  29. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  30. end
  31. function Step2Complete(Quest, QuestGiver, Player)
  32. UpdateQuestStepDescription(Quest, 2, "I found the moccasin snake skins.")
  33. AddQuestStepKill(Quest, 3, "I need to collect two globs of goo from drudge globules.", 2, 50, "I need to collect the materials Marcus Puer needs to fashion a weapon from the fang.", 345, 1550001, 1550038)
  34. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  35. end
  36. function Step3Complete(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 3, "I found the globs of goo.")
  38. AddQuestStepKill(Quest, 4, "I need to collect a hollow cog shaft from a crazed channel mender.", 1, 50, "I need to collect the materials Marcus Puer needs to fashion a weapon from the fang.", 841, 1550012, 1550013, 1550049, 1550050)
  39. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  40. end
  41. function Step4Complete(Quest, QuestGiver, Player)
  42. UpdateQuestStepDescription(Quest, 4, "I found the hollow cog.")
  43. UpdateQuestTaskGroupDescription(Quest, 2, "I collected everything Marcus needs to create the weapon.")
  44. AddQuestStepChat(Quest, 5, "I need to return to Marcus in the Serpent Sewer.", 1, "I should return to Marcus Puer with the materials I've collected.", 11, 1550056)
  45. AddQuestStepCompleteAction(Quest, 5, "QuestComplete")
  46. end
  47. function QuestComplete(Quest, QuestGiver, Player)
  48. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  49. UpdateQuestStepDescription(Quest, 5, "I gave the materials to Marcus.")
  50. UpdateQuestTaskGroupDescription(Quest, 3, "I returned to Marcus with the materials.")
  51. if HasItem(Player, 13354) then
  52. RemoveItem(Player, 13354)
  53. end
  54. UpdateQuestDescription(Quest, "Marcus Puer was able to craft me a weapon from the fang once I was able to collect the materials he needed.")
  55. GiveQuestReward(Quest, Player)
  56. end
  57. function Reload(Quest, QuestGiver, Player, Step)
  58. if Step == 1 then
  59. Step1Complete(Quest, QuestGiver, Player)
  60. elseif Step == 2 then
  61. Step2Complete(Quest, QuestGiver, Player)
  62. elseif Step == 3 then
  63. Step3Complete(Quest, QuestGiver, Player)
  64. elseif Step == 4 then
  65. Step4Complete(Quest, QuestGiver, Player)
  66. elseif Step == 5 then
  67. QuestComplete(Quest, QuestGiver, Player)
  68. end
  69. end