9
3

sometimes_you_feel_like_a_knut.lua 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. --[[
  2. Script Name : Quests/FrostfangSea/sometimes_you_feel_like_a_knut.lua
  3. Script Purpose : the quest "Sometimes You Feel Like A Knut"
  4. Script Author : theFoof
  5. Script Date : 2013.8.11
  6. Script Notes :
  7. Zone : Frostfang Sea
  8. Quest Giver : Knut Orcbane
  9. Preceded by : Flawless Core Chore
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. AddQuestRewardCoin(Quest, math.random(1,99), math.random(27,40), 0, 0)
  14. AddQuestStep(Quest, 1, "If you listen to Griz carefully, perhaps he can help guide you.", 1, 100, "While wearing Griz as your head equipment, explore the caves and tunnels within Demon's Delve.", 0)
  15. AddQuestStepCompleteAction(Quest, 1, "GotBag")
  16. end
  17. function Accepted(Quest, QuestGiver, Player)
  18. SummonItem(Player, 157116)
  19. FaceTarget(QuestGiver, Player)
  20. conversation = CreateConversation()
  21. AddConversationOption(conversation, "Wonderful.")
  22. StartConversation(conversation, NPC, Spawn, "You must wear him in order to hear him. Now, promise to bring him back -safe and sound. And do not be swayed by his bloodlust. He often forgets he no longer has claws.")
  23. end
  24. function Deleted(Quest, QuestGiver, Player)
  25. end
  26. function Declined(Quest, QuestGiver, Player)
  27. end
  28. function GotBag(Quest, QuestGiver, Player)
  29. UpdateQuestStepDescription(Quest, 1, "You found the sack that once contained the magick item.")
  30. AddQuestStep(Quest, 2, "Continue to explore the caves with Griz. If you listen to him carefully, perhaps he can help guide you.", 1, 100, "While wearing Griz as your head equipment, explore the caves and tunnels within Demon's Delve.", 0)
  31. AddQuestStepCompleteAction(Quest, 2, "FoundTotem")
  32. end
  33. function FoundTotem(Quest, QuestGiver, Player)
  34. AddSpawnAccess(GetSpawnByLocationID(GetZone(Player), 579551), Player)
  35. UpdateQuestStepDescription(Quest, 2, "Griz has helped you locate the source of the magick.")
  36. AddQuestStep(Quest, 3, "Griz is rather insistent. You must destroy the magick item -it is a Ry'Gorr necromantic totem!", 1, 100, "While wearing Griz as your head equipment, explore the caves and tunnels within Demon's Delve.", 0)
  37. AddQuestStepCompleteAction(Quest, 3, "DestroyedTotem")
  38. end
  39. function DestroyedTotem(Quest, QuestGiver, Player)
  40. UpdateQuestTaskGroupDescription(Quest, 1, "You destroyed the necromantic totem!")
  41. AddQuestStepChat(Quest, 4, "Return to Knut Orcbane now that you have destroyed the necromantic crystal the orcs had within the Demon's Delve tunnels.", 1, "You should return to Knut Orcbane, at Cragged Spine, now that you have destroyed the necromantic crystal the orcs had within the Demon's Delve tunnels.", 0, 4700113)
  42. AddQuestStepCompleteAction(Quest, 4, "CompleteQuest")
  43. end
  44. function CompleteQuest(Quest, QuestGiver, Player)
  45. UpdateQuestTaskGroupDescription(Quest, 2, "You told Knut how Griz helped you locate and destroy the Ry'Gorr necromantic crystal.")
  46. GiveQuestReward(Quest, Player)
  47. end
  48. function Reload(Quest, QuestGiver, Player, Step)
  49. if Step == 1 then
  50. GotBag(Quest, QuestGiver, Player)
  51. elseif Step == 2 then
  52. FoundTotem(Quest, QuestGiver, Player)
  53. elseif Step == 3 then
  54. DestroyedTotem(Quest, QuestGiver, Player)
  55. end
  56. end