AHardMantoPlease.lua 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. --[[
  2. Script Name : Quests/Commonlands/AHardMantoPlease.lua
  3. Script Purpose : Handles the quest, "A Hard Man to Please"
  4. Script Author : premierio015
  5. Script Date : 21.05.2021
  6. Script Notes : Auto generated with QuestParser.
  7. Zone : Commonlands
  8. Quest Giver : Ferink
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepKill(Quest, 1, "I need to help Ferink protect Amoora", 4, 100, "I need to help Ferink defend Amoora and her family from the orc onslaught. I must get across the river quickly.", 11, 330250, 330123)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. FaceTarget(QuestGiver, Player)
  18. local conversation = CreateConversation()
  19. AddConversationOption(conversation, "Okay, let's go.")
  20. StartConversation(conversation, QuestGiver, Player, "The orcses are coming now. Quickly now, cross the river to her huts! We must stop the orcs from hurting my Amoora! I'll meets you there!")
  21. end
  22. function Declined(Quest, QuestGiver, Player)
  23. -- Add dialog here for when the quest is declined
  24. end
  25. function Deleted(Quest, QuestGiver, Player)
  26. -- Remove any quest specific items here when the quest is deleted
  27. end
  28. function Step1Complete(Quest, QuestGiver, Player)
  29. UpdateQuestStepDescription(Quest, 1, "I have defended Amoora and her family from the orc attack.")
  30. UpdateQuestTaskGroupDescription(Quest, 1, "I have defended Amoora and her family from the orc attack.")
  31. AddQuestStepChat(Quest, 2, "I should talk to Jaharin", 1, "I have defended Amoora and her family from the orc attack. I should go talk to Jaharin again.", 11, 330062)
  32. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  33. end
  34. function Step2Complete(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 2, "I received Jaharin's blessing for Ferink.")
  36. UpdateQuestTaskGroupDescription(Quest, 2, "I spoke to Jaharin again. I should tell Ferink the good news.")
  37. AddQuestStepChat(Quest, 3, "I need to speak to Ferink", 1, "I should go let Ferink know the good news.", 11, 330046)
  38. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  39. end
  40. function QuestComplete(Quest, QuestGiver, Player)
  41. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  42. UpdateQuestStepDescription(Quest, 3, "I have spoken to Ferink.")
  43. UpdateQuestTaskGroupDescription(Quest, 3, "I have returned to Ferink and let him know the good news.")
  44. UpdateQuestDescription(Quest, "I have defended Amoora and her family from the orc attack.")
  45. GiveQuestReward(Quest, Player)
  46. end
  47. function Reload(Quest, QuestGiver, Player, Step)
  48. if Step == 1 then
  49. Step1Complete(Quest, QuestGiver, Player)
  50. elseif Step == 2 then
  51. Step2Complete(Quest, QuestGiver, Player)
  52. elseif Step == 3 then
  53. QuestComplete(Quest, QuestGiver, Player)
  54. end
  55. end