ToDrawUponWellsprings.lua 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. --[[
  2. Script Name : Quests/Darklight/ToDrawUponWellsprings.lua
  3. Script Purpose : Handles the quest, "To Draw Upon Wellsprings"
  4. Script Author : Cynnar
  5. Script Date : 8/30/2015
  6. Script Notes :
  7. Zone : Darklight Wood
  8. Quest Giver : Calnozz J'Melvirr
  9. Preceded by : None
  10. Followed by : Stunning Revelation
  11. --]]
  12. function Init(Quest)
  13. AddQuestStep(Quest, 1, "Bring wellspring cubs to Calnozz J'Melvirr", 3, 100, "I need to bring three bear cubs to Calnozz J'Melvirr back at T'Vatar Outpost.", 174)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Step1Complete(Quest, QuestGiver, Player)
  17. UpdateQuestStepDescription(Quest, 1, "I have brought wellspring cubs to Calnozz J'Melvirr")
  18. AddQuestStepChat(Quest, 2, "Speak with Calnozz J'Melvirr", 1, "I need to bring three bear cubs to Calnozz J'Melvirr back at T'Vatar Outpost.", 11, 340066)
  19. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  20. end
  21. function QuestComplete(Quest, QuestGiver, Player)
  22. while HasItem(Player, 45117) do
  23. RemoveItem(Player, 45117)
  24. end
  25. UpdateQuestDescription(Quest, "I have collected all the bear cubs for Calnozz J'Melvirr.")
  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. if HasItem(Player, 45117) == false then
  37. SummonItem(Player, 45117, 1)
  38. end
  39. FaceTarget(QuestGiver, Player)
  40. conversation = CreateConversation()
  41. Say(QuestGiver, "Excellent. I will be here waiting for you to bring the cubs back. Here is the leash.")
  42. end
  43. function Deleted(Quest, QuestGiver, Player)
  44. Despawn("cub")
  45. SetTempVariable(Player, "cub", nil)
  46. end