9
3

Drodo'sGoodies.lua 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. --[[
  2. Script Name : Quests/EnchantedLands/Drodo'sGoodies.lua
  3. Script Purpose : Handles the quest "Drodo's Goodies"
  4. Script Author : Cynnar
  5. Script Date : 2015.05.13
  6. Script Notes : <special-instructions>
  7. Zone : Enchanted Lands
  8. Quest Giver : Augin Drodo
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. local DrodosGoodies = 119
  13. function Init(Quest)
  14. AddQuestRewardCoin(Quest, math.random(10,95), math.random(39,49), math.random(1,1), 0)
  15. AddQuestStepKill(Quest, 1, "I must hunt grove badgers.", 1, 40, "I must hunt the critters near the granary in Enchanted Lands. They should have Drodo's goodies.", 2299, 390041)
  16. AddQuestStepKill(Quest, 2, "I must hunt lancer wasps.", 1, 40, "I must hunt the critters near the granary in Enchanted Lands. They should have Drodo's goodies.", 1229, 390092)
  17. AddQuestStepKill(Quest, 3, "I must hunt klakrok drones.", 1, 40, "I must hunt the critters near the granary in Enchanted Lands. They should have Drodo's goodies.", 1225, 390069)
  18. AddQuestStepKill(Quest, 4, "I must hunt briarpaw cubs.", 1, 40, "I must hunt the critters near the granary in Enchanted Lands. They should have Drodo's goodies.", 928, 390104)
  19. AddQuestStepCompleteAction(Quest, 1, "deck")
  20. AddQuestStepCompleteAction(Quest, 2, "comb")
  21. AddQuestStepCompleteAction(Quest, 3, "dice")
  22. AddQuestStepCompleteAction(Quest, 4, "box")
  23. end
  24. function CheckProgress(Quest, QuestGiver, Player)
  25. if QuestStepIsComplete(Player, DrodosGoodies, 1) and QuestStepIsComplete(Player, DrodosGoodies, 2) and QuestStepIsComplete(Player, DrodosGoodies, 3) and QuestStepIsComplete(Player, DrodosGoodies, 4) then
  26. UpdateQuestTaskGroupDescription(Quest, 1, "I hunted the critters near the granary and collected all of Drodo's goodies.")
  27. AddStep5(Quest, QuestGiver, Player)
  28. end
  29. end
  30. function AddStep5(Quest, QuestGiver, Player)
  31. SetCompleteFlag(Quest)
  32. AddQuestStepChat(Quest, 5, "I must return the goodies.", 1, "I must return the goodies to Augin Drodo at the granary near Bobick in the Enchanted Lands.", 0, GetSpawnID(QuestGiver))
  33. AddQuestStepCompleteAction(Quest, 5, "QuestComplete")
  34. end
  35. function deck(Quest, QuestGiver, Player)
  36. UpdateQuestStepDescription(Quest, 1, "I found Drodo's King's Court deck!")
  37. CheckProgress(Quest, QuestGiver, Player)
  38. end
  39. function comb(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 2, "I found Drodo's foot comb!")
  41. CheckProgress(Quest, QuestGiver, Player)
  42. end
  43. function dice(Quest, QuestGiver, Player)
  44. UpdateQuestStepDescription(Quest, 3, "I found Drodo's goblin dice!")
  45. CheckProgress(Quest, QuestGiver, Player)
  46. end
  47. function box(Quest, QuestGiver, Player)
  48. UpdateQuestStepDescription(Quest, 3, "I found Drodo's brunch box!")
  49. CheckProgress(Quest, QuestGiver, Player)
  50. end
  51. function Accepted(Quest, QuestGiver, Player)
  52. FaceTarget(QuestGiver, Player)
  53. conversation = CreateConversation()
  54. PlayFlavor(QuestGiver, "augin_drodo/enchanted/augin_drodo003.mp3", "", "", 3982874170, 1388125971, Spawn)
  55. AddConversationOption(conversation, "I'll return with your goodies.")
  56. StartConversation(conversation, QuestGiver, Player, "Excellent! That would be very neighborly of you! Wish I could help, but I got a bum knee ya know. Otherwise these critters would fear the name Drodo.")
  57. end
  58. function QuestComplete(Quest, QuestGiver, Player)
  59. GiveQuestReward(Quest, Player)
  60. end
  61. function Deleted(Quest, QuestGiver, Player)
  62. end
  63. function Declined(Quest, QuestGiver, Player)
  64. end
  65. function Reload(Quest, QuestGiver, Player, Step)
  66. if QuestStepIsComplete(Player, DrodosGoodies, 1) then
  67. deck(Quest, QuestGiver, Player)
  68. end
  69. if QuestStepIsComplete(Player, DrodosGoodies, 2) then
  70. comb(Quest, QuestGiver, Player)
  71. end
  72. if QuestStepIsComplete(Player, DrodosGoodies, 3) then
  73. dice(Quest, QuestGiver, Player)
  74. end
  75. if QuestStepIsComplete(Player, DrodosGoodies, 4) then
  76. box(Quest, QuestGiver, Player)
  77. end
  78. end