malkaen_weed.lua 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. --[[
  2. Script Name : Quests/Darklight/malkaen_weed.lua
  3. Script Purpose : Handles the quest, "Malkaen Weed"
  4. Script Author : Scatman
  5. Script Date : 2009.01.31
  6. Zone : Darklight Wood
  7. Quest Giver: Fileyl Alyylharil
  8. Preceded by: Prowler Pelts (prowler_pelts.lua)
  9. Followed by: Danya's Order (danyas_order.lua)
  10. --]]
  11. function Init(Quest)
  12. -- Malkaen Weed
  13. AddQuestStepObtainItem(Quest, 1, "I need to dig up six Malkaen Weeds.", 6, 100, ".", 197, 7922)
  14. AddQuestStepCompleteAction(Quest, 1, "step1_complete_gotWeeds")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. if QuestGiver ~= nil then
  18. if GetDistance(Player, QuestGiver) < 30 then
  19. FaceTarget(QuestGiver, Player)
  20. conversation = CreateConversation()
  21. PlayFlavor(QuestGiver, "voiceover/english/neriak/fileyl_alyylharil/darklight_wood/hates_envy/fileyl/fileyl007.mp3", "", "", 700356968, 3682250631, Player)
  22. AddConversationOption(conversation, "I'll be back.")
  23. StartConversation(conversation, QuestGiver, Player, "Of course you can, a monkey could do it! But a monkey wouldn't know what to do with the money afterwards.")
  24. end
  25. end
  26. end
  27. function Declined(Quest, QuestGiver, Player)
  28. end
  29. function step1_complete_gotWeeds(Quest, QuestGiver, Player)
  30. UpdateQuestStepDescription(Quest, 1, "I have collected the weeds.")
  31. UpdateQuestTaskGroupDescription(Quest, 1, "I have collected the weeds.")
  32. AddQuestStepChat(Quest, 2, "I need to bring the Malkaen Weed back to Fileyl.", 1, ".", 0, 340050)
  33. AddQuestStepCompleteAction(Quest, 2, "quest_complete")
  34. end
  35. function quest_complete(Quest, QuestGiver, Player)
  36. -- Take weeds away
  37. while HasItem(Player, 7922, 1) do
  38. RemoveItem(Player, 7922)
  39. end
  40. UpdateQuestDescription(Quest, "I have brought Fileyl the Malkaen Weed he neededs for his work.")
  41. GiveQuestReward(Quest, Player)
  42. end
  43. function Reload(Quest, QuestGiver, Player, Step)
  44. if Step == 1 then
  45. step1_complete_gotWeeds(Quest, QuestGiver, Player)
  46. end
  47. end