nap_time_for_evigis.lua 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. --[[
  2. Script Name : Quests/FrostfangSea/nap_time_for_evigis.lua
  3. Script Purpose : for the quest "Nap Time for Evigis"
  4. Script Author : theFoof
  5. Script Date : 2013.6.13
  6. Script Notes :
  7. Zone : Frostfang Sea
  8. Quest Giver : Torli Blackbow
  9. Preceded by : Seeking Elemental Education
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. AddQuestRewardCoin(Quest, math.random(5,90), math.random(71,86), math.random(0,1), 0)
  14. AddQuestStep(Quest, 1, "Reduce Evigis the Ancient's health and then cast Gerla's Elemental Lullaby upon it", 1, 100, "Return to the Velinoid Catacombs to face Evigis the Ancient with Gerla's Elemental Lullaby.", 3774)
  15. AddQuestStepCompleteAction(Quest, 1, "KilledEvigis")
  16. end
  17. function Accepted(Quest, QuestGiver, Player)
  18. if not HasItem(Player, 46463) then
  19. SummonItem(Player, 46463)
  20. end
  21. FaceTarget(QuestGiver, Player)
  22. conversation = CreateConversation()
  23. PlayFlavor(QuestGiver, "torli_blackbow/halas/new_halas_guard_house/torli_blackaxe_013.mp3", "", "", 280356547, 1472834780, Player)
  24. AddConversationOption(conversation, "I will not fail.")
  25. StartConversation(conversation, QuestGiver, Player, "I never doubted ye for a moment, " .. GetName(Player) .. "! Take this and go with Brell's blessings upon ye!")
  26. end
  27. function Deleted(Quest, QuestGiver, Player)
  28. if HasItem(Player, 46463) then
  29. RemoveItem(Player, 46463)
  30. end
  31. end
  32. function Declined(Quest, QuestGiver, Player)
  33. end
  34. function KilledEvigis(Quest, QuestGiver, Player)
  35. UpdateQuestTaskGroupDescription(Quest, 1, "You returned Evigis to his slumber!")
  36. AddQuestStepChat(Quest, 2, "Return to Torli Blackbow at the White Lodge.", 1, "You should return to Torli Blackbow at the White Lodge, the guard house for New Halas.", 0, 4700137)
  37. AddQuestStepCompleteAction(Quest, 2, "CompleteQuest")
  38. end
  39. function CompleteQuest(Quest, QuestGiver, Player)
  40. if HasItem(Player, 46463) then
  41. RemoveItem(Player, 46463)
  42. end
  43. GiveQuestReward(Quest, Player)
  44. end
  45. function Reload(Quest, QuestGiver, Player, Step)
  46. if Step == 1 then
  47. KilledEvigis(Quest, QuestGiver, Player)
  48. end
  49. end