AngerFang.lua 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. --[[
  2. Script Name : AngerFang.lua
  3. Script Purpose : Handles the quest, "Anger-Fang"
  4. Script Author : jakejp
  5. Script Date : 4/28/2020
  6. Script Notes : Auto generated with QuestParser.
  7. Zone : The Ruins
  8. Quest Giver : Mardyp Prunt
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. require "SpawnScripts/Generic/DialogModule"
  13. function Init(Quest)
  14. AddQuestStepKill(Quest, 1, "Collect orc fangs", 20, 100, "Mardyp would like me to collect some orc fangs for him from the Ruins. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 102, 1270005,1270017)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  16. end
  17. function Accepted(Quest, QuestGiver, Player)
  18. -- Add dialog here for when the quest is accepted
  19. FaceTarget(QuestGiver, Player)
  20. Dialog.New(QuestGiver, Player)
  21. Dialog.AddDialog("Good! Mardyp go back to crushing.")
  22. Dialog.AddOption("I'll go get your fangs.")
  23. Dialog.Start()
  24. end
  25. function Declined(Quest, QuestGiver, Player)
  26. -- Add dialog here for when the quest is declined
  27. end
  28. function Deleted(Quest, QuestGiver, Player)
  29. -- Remove any quest specific items here when the quest is deleted
  30. end
  31. function Step1Complete(Quest, QuestGiver, Player)
  32. UpdateQuestStepDescription(Quest, 1, "I have collected the orc fangs.")
  33. AddQuestStepChat(Quest, 2, "Return to Mardyp.", 1, "Mardyp would like me to collect some orc fangs for him from the Ruins. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 102, 1270010)
  34. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  35. end
  36. function QuestComplete(Quest, QuestGiver, Player)
  37. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  38. UpdateQuestStepDescription(Quest, 2, "I have given Mardyp the fangs he asked for.")
  39. UpdateQuestTaskGroupDescription(Quest, 1, "I collected the orc fangs for Mardyp.")
  40. UpdateQuestDescription(Quest, "I have gotten the orc fangs for Mardyp. He was pleased.")
  41. GiveQuestReward(Quest, Player)
  42. end
  43. function Reload(Quest, QuestGiver, Player, Step)
  44. if Step == 1 then
  45. Step1Complete(Quest, QuestGiver, Player)
  46. elseif Step == 2 then
  47. QuestComplete(Quest, QuestGiver, Player)
  48. end
  49. end