9
3

UsefulMaterials.lua 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. --[[
  2. Script Name : Quests/Darklight/UsefulMaterials.lua
  3. Script Purpose : Handles the quest, "Useful Materials"
  4. Script Author : Cynnar
  5. Script Date : 8/30/2015
  6. Script Notes :
  7. Zone : Darklight Wood
  8. Quest Giver : Ilmtar D'Viervs
  9. Preceded by : One Man's Waste...
  10. Followed by : Sorcerous Necessities
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepObtainItem(Quest, 1, "Collect pieces of wood for Ilmtar D'Viervs", 6, 100, "Ilmtar D'Viervs wants wood from the Field of Ruin.", 830, 6486)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Step1Complete(Quest, QuestGiver, Player)
  17. UpdateQuestStepDescription(Quest, 1, "I have collected the wood")
  18. AddQuestStepChat(Quest, 2, "Bring the wood back to Ilmtar", 1, "Ilmtar D'Viervs wants wood from the Field of Ruin.", 830, 340076)
  19. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  20. end
  21. function QuestComplete(Quest, QuestGiver, Player)
  22. UpdateQuestDescription(Quest, "I have brought Ilmtar the wood he asked for.")
  23. while HasItem(Player, 6486, 1) do
  24. RemoveItem(Player, 6486)
  25. end
  26. GiveQuestReward(Quest, Player)
  27. end
  28. function Reload(Quest, QuestGiver, Player, Step)
  29. if Step == 1 then
  30. Step1Complete(Quest, QuestGiver, Player)
  31. elseif Step == 2 then
  32. QuestComplete(Quest, QuestGiver, Player)
  33. end
  34. end
  35. function Accepted(Quest, QuestGiver, Player)
  36. FaceTarget(QuestGiver, Player)
  37. local con = CreateConversation()
  38. PlayFlavor(QuestGiver, "", "", "", 0, 0, Player)
  39. StartConversation(con, QuestGiver, Player, "Good.")
  40. end
  41. function Declined(Quest, QuestGiver, Player)
  42. -- Add dialog here for when the quest is declined
  43. end
  44. function Deleted(Quest, QuestGiver, Player)
  45. end