9
3

OneMan'sWaste....lua 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. --[[
  2. Script Name : Quests/Darklight/OneMan'sWaste....lua
  3. Script Purpose : Handles the quest, "One Man's Waste..."
  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 : What's in Demand?
  10. Followed by : Useful Materials
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepObtainItem(Quest, 1, "Search outside T'Vatar Outpost for old weapons", 6, 100, "Ilmtar D'Viervs wants me to collect some old weapons just outside T'Vatar Outpost.", 5, 6485)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Step1Complete(Quest, QuestGiver, Player)
  17. UpdateQuestStepDescription(Quest, 1, "I have collected several old weapons")
  18. AddQuestStepChat(Quest, 2, "Bring these weapons to Ilmtar D'Viervs", 1, "Ilmtar D'Viervs wants me to collect some old weapons just outside T'Vatar Outpost.", 5, 340076)
  19. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  20. end
  21. function QuestComplete(Quest, QuestGiver, Player)
  22. UpdateQuestDescription(Quest, "I have collected the old weapons for Ilmtar.")
  23. while HasItem(Player, 6485, 1) do
  24. RemoveItem(Player, 6485)
  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. AddConversationOption(con, "I'll see what can I dig up.")
  40. StartConversation(con, QuestGiver, Player, "Once you've collected a decent number of weapons return them to me.")
  41. end
  42. function Declined(Quest, QuestGiver, Player)
  43. -- Add dialog here for when the quest is declined
  44. end
  45. function Deleted(Quest, Spawn)
  46. while HasItem(Player, 6485, 1) do
  47. RemoveItem(Player, 6485)
  48. end
  49. end