ReapingTheBenefitsOfAMonopoly.lua 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. --[[
  2. Script Name : ReapingtheBenefitsofaMonopoly.lua
  3. Script Purpose : Handles the quest, "Reaping the Benefits of a Monopoly"
  4. Script Author : FeaRFX
  5. Script Date : 25/01/2017
  6. Script Notes :
  7. Zone : Darklight Wood
  8. Quest Giver :
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepObtainItem(Quest, 1, "Fish up searing trout", 8, 100, "Dirzdia wants some searing trout from the Lower Tendril River.", 2542, 37182)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Step1Complete(Quest, QuestGiver, Player)
  17. UpdateQuestStepDescription(Quest, 1, "I have caught the trout")
  18. AddQuestStepChat(Quest, 2, "Bring these trout back to Dirzdia", 1, "Dirzdia wants some searing trout from the Lower Tendril River.", 2542, 140025)
  19. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  20. end
  21. function QuestComplete(Quest, QuestGiver, Player)
  22. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  23. UpdateQuestStepDescription(Quest, 2, "I have given Dirzdia the trout")
  24. UpdateQuestTaskGroupDescription(Quest, 1, "I have brought Dirzdia the searing trout.")
  25. UpdateQuestDescription(Quest, "I have caught the searing trout and brought them back to Dirzdia.")
  26. while HasItem(Player, 37182, 1) do
  27. RemoveItem(Player, 37182)
  28. end
  29. GiveQuestReward(Quest, Player)
  30. end
  31. function Reload(Quest, QuestGiver, Player, Step)
  32. if Step == 1 then
  33. Step1Complete(Quest, QuestGiver, Player)
  34. elseif Step == 2 then
  35. QuestComplete(Quest, QuestGiver, Player)
  36. end
  37. end
  38. function Accepted(Quest, QuestGiver, Player)
  39. -- Add dialog here for when the quest is accepted
  40. end
  41. function Declined(Quest, QuestGiver, Player)
  42. -- Add dialog here for when the quest is declined
  43. end