9
3

clan_of_the_cave_imps.lua 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. --[[
  2. Script Name : Quests/FrostfangSea/clan_of_the_cave_imps.lua
  3. Script Purpose : the quest Clan of the Cave Imps
  4. Script Author : theFoof
  5. Script Date : 2013.7.21
  6. Script Notes :
  7. Zone : Frostfang Sea
  8. Quest Giver : Knut Orcbane
  9. Preceded by : Impish Threats
  10. Followed by : Mystery on the Orc Iceberg
  11. --]]
  12. function Init(Quest)
  13. AddQuestRewardCoin(Quest, math.random(5,90), math.random(12,25), 0, 0)
  14. AddQuestStep(Quest, 1, "Reclaim any Cragged Spine supply crates you locate within the glacial imp cave.", 4, 100, "Reclaim the Cragged Spine provisions that the miscreants and scoundrels have stolen.", 655)
  15. AddQuestStepKill(Quest, 2, "Slay any imps that may stand in your way within the glacial imp cave.", 6, 100, "Reclaim the Cragged Spine provisions that the miscreants and scoundrels have stolen.", 611, 4700066, 4700065, 4701106, 4701143)
  16. AddQuestStepCompleteAction(Quest, 1, "GotCrates")
  17. AddQuestStepCompleteAction(Quest, 2, "KilledImps")
  18. end
  19. function Accepted(Quest, QuestGiver, Player)
  20. end
  21. function Deleted(Quest, QuestGiver, Player)
  22. end
  23. function Declined(Quest, QuestGiver, Player)
  24. end
  25. function GotCrates(Quest, QuestGiver, Player)
  26. UpdateQuestStepDescription(Quest, 1, "You found all of the Cragged Spine supply crates!")
  27. ProgressCheck(Quest, QuestGiver, Player)
  28. end
  29. function KilledImps(Quest, QuestGiver, Player)
  30. UpdateQuestStepDescription(Quest, 2, "You've slain enough of the imps!")
  31. ProgressCheck(Quest, QuestGiver, Player)
  32. end
  33. function ProgressCheck(Quest, QuestGiver, Player)
  34. if QuestStepIsComplete(Player, 79, 1) and QuestStepIsComplete(Player, 79, 2) then
  35. AddStep3(Quest, QuestGiver, Player)
  36. end
  37. end
  38. function AddStep3(Quest, QuestGiver, Player)
  39. UpdateQuestTaskGroupDescription(Quest, 1, "You found all of the Cragged Spine supply crates and have slain many imps in the process!")
  40. AddQuestStepChat(Quest, 3, "Return to Knut Orcbane now that you retrieved all of the stolen Cragged Spine provisions.", 1, "You should return to Knut Orcbane, at Cragged Spine, now that you retrieved all of the stolen Cragged Spine supplies.", 0, 4700113)
  41. AddQuestStepCompleteAction(Quest, 3, "CompleteQuest")
  42. end
  43. function CompleteQuest(Quest, QuestGiver, Player)
  44. GiveQuestReward(Quest, Player)
  45. end
  46. function Reload(Quest, QuestGiver, Player, Step)
  47. if QuestStepIsComplete(Player, 79, 1) then
  48. GotCrates(Quest, QuestGiver, Player)
  49. elseif QuestStepIsComplete(Player, 79, 2) then
  50. KilledImps(Quest, QuestGiver, Player)
  51. end
  52. end