whirling_ice_time.lua 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. --[[
  2. Script Name : Quests/FrostfangSea/whirling_ice_time.lua
  3. Script Purpose : for the quest Whirling Ice Time
  4. Script Author : theFoof
  5. Script Date : 2013.6.16
  6. Script Notes :
  7. Zone : Frostfang Sea
  8. Quest Giver : Odon Scourgeson
  9. Preceded by : None
  10. Followed by : Highly Flammable Materials
  11. --]]
  12. function Init(Quest)
  13. AddQuestRewardCoin(Quest, math.random(5,90), math.random(12,25), 0, 0)
  14. AddQuestStep(Quest, 1, "Apply the Draught of Whirling Ice to the green sparkling arrows that have been shot upon the Cragged Spine beachfront.", 6, 100, "Odon gave you a Draught of Whirling Ice, which he claims will create whirling eddies of fog and ice on the beachfront, causing confusion amongst the Ry'Gorr.", 2511)
  15. AddQuestStepCompleteAction(Quest, 1, "UsedDraught")
  16. end
  17. function Accepted(Quest, QuestGiver, Player)
  18. if not HasItem(Player, 6556) then
  19. SummonItem(Player, 6556)
  20. end
  21. FaceTarget(QuestGiver, Player)
  22. conversation = CreateConversation()
  23. PlayFlavor(QuestGiver, "odon_scourgeson/halas/cragged_spine/odon_scourgeson_011.mp3", "", "", 57352685, 126930630, Player)
  24. AddConversationOption(conversation, "I will, Odon.")
  25. StartConversation(conversation, QuestGiver, Player, "Here is the Draught of Whirling Ice I spoke of. Use it at the locations marked by a glowing green arrow shaft.")
  26. end
  27. function Deleted(Quest, QuestGiver, Player)
  28. end
  29. function Declined(Quest, QuestGiver, Player)
  30. end
  31. function UsedDraught(Quest, QuestGiver, Player)
  32. UpdateQuestStepDescription(Quest, 1, " The icy whirlstorms conjured by the Draught of Whirling Ice worked wonders!")
  33. UpdateQuestTaskGroupDescription(Quest, 1, "The icy whirlstorms conjured by the Draught of Whirling Ice worked wonders!")
  34. AddQuestStepChat(Quest, 2, "Return to Odon Scourgeson at Cragged Spine.", 1, "You should return return to Odon Scourgeson now that the Draught of Whirling Ice caused confusion and chaos on the near by beach front.", 0, 4700108)
  35. AddQuestStepCompleteAction(Quest, 2, "CompleteQuest")
  36. end
  37. function CompleteQuest(Quest, QuestGiver, Player)
  38. GiveQuestReward(Quest, Player)
  39. if HasItem(Player, 6556) then
  40. RemoveItem(Player, 6556)
  41. end
  42. end
  43. function Reload(Quest, QuestGiver, Player, Step)
  44. if Step == 1 then
  45. UsedDraught(Quest, QuestGiver, Player)
  46. end
  47. end