9
3

AFinalFoe.lua 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. --[[
  2. Script Name : AFinalFoe.lua
  3. Script Purpose : Handles the quest, "A Final Foe"
  4. Script Author : Shatou
  5. Script Date : 1/8/2020
  6. Script Notes :
  7. Zone : Peat Bog
  8. Quest Giver : Lieutenant Dawson
  9. Preceded by : On the Move
  10. Followed by : Reinforcements
  11. --]]
  12. local LIEUTENANT_DAWSON_ID = 1980012
  13. local DENTFANG_ID = 1980070
  14. function Init(Quest)
  15. AddQuestStepKill(Quest, 1, "I need to kill Dentfang.", 1, 100, "I need to kill Dentfang for Lieutenant Dawson.", 11, DENTFANG_ID)
  16. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  17. end
  18. function Step1Complete(Quest, QuestGiver, Player)
  19. UpdateQuestStepDescription(Quest, 1, "I have killed Dentfang.")
  20. AddQuestStepChat(Quest, 2, "I need to return to Dawson.", 1, "I need to kill Dentfang for Lieutenant Dawson.", 11, LIEUTENANT_DAWSON_ID)
  21. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  22. end
  23. function QuestComplete(Quest, QuestGiver, Player)
  24. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  25. UpdateQuestStepDescription(Quest, 2, "I have spoken with Dawson.")
  26. UpdateQuestTaskGroupDescription(Quest, 1, "I have killed Dentfang.")
  27. UpdateQuestDescription(Quest, "I have slain Dentfang. Lieutenant Dawson was very pleased with my work.")
  28. GiveQuestReward(Quest, Player)
  29. end
  30. function Reload(Quest, QuestGiver, Player, Step)
  31. if Step == 1 then
  32. Step1Complete(Quest, QuestGiver, Player)
  33. elseif Step == 2 then
  34. QuestComplete(Quest, QuestGiver, Player)
  35. end
  36. end
  37. function Accepted(Quest, QuestGiver, Player)
  38. -- Add dialog here for when the quest is accepted
  39. end
  40. function Declined(Quest, QuestGiver, Player)
  41. -- Add dialog here for when the quest is declined
  42. end