an_axe_for_all_ages.lua 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. --[[
  2. Script Name : Quests/TheCryptofBetrayal/an_axe_for_all_ages.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.11.01 06:11:34
  5. Script Purpose :
  6. Zone : TheCryptofBetrayal
  7. Quest Giver:
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepKill(Quest, 1, "I should find the haft of the old and broken axe.", 1, 30, "I need to find a new haft that was once a part of the axe. I should probably begin looking in the Crypt of Betrayal where I first found the pieces.", 2157, 2010031, 2010028, 2010010, 2010027, 2010029, 2010039, 2010006, 2010021, 2010022, 2010023, 2010024, 2010012, 2010014, 2010018, 2010019)
  13. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  14. end
  15. function Accepted(Quest, QuestGiver, Player)
  16. -- Add dialog here for when the quest is accepted
  17. end
  18. function Declined(Quest, QuestGiver, Player)
  19. -- Add dialog here for when the quest is declined
  20. end
  21. function Deleted(Quest, QuestGiver, Player)
  22. -- Remove any quest specific items here when the quest is deleted
  23. end
  24. function Step1Complete(Quest, QuestGiver, Player)
  25. UpdateQuestStepDescription(Quest, 1, "I have found the haft of the old and broken axe.")
  26. UpdateQuestTaskGroupDescription(Quest, 1, "I have found the old haft for the Axe. Despite the apparent age the wood has held up remarkably well.")
  27. AddQuestStepKill(Quest, 2, "I should find the missing axe head piece.", 1, 30, "The large chip missing from the axe head seems to have remains of dried goo. I might try to find the missing piece of the axe head among any slime creatures I find down in the Crypt of Betrayal.", 678, 2010011, 2010015, 2010016)
  28. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  29. end
  30. function Step2Complete(Quest, QuestGiver, Player)
  31. UpdateQuestStepDescription(Quest, 2, "I have found the missing axe head piece.")
  32. UpdateQuestTaskGroupDescription(Quest, 2, "I have found the missing axe head piece within the remains of a grotesque mass.")
  33. AddQuestStepKill(Quest, 3, "I should find a replacement counterweight for the chipped axe.", 1, 30, "It seems as if the handle counterweight is missing. A replacement will need to be found. Perhaps the Bloodsabers might be willing to give me one if I ask real nicely.", 666, 2010033, 2010037, 2010036, 2010000, 2010038, 2010034, 2010005, 2010004, 2010007, 2010008, 2010031, 2010028, 2010010, 2010027, 2010029, 2010039, 2010006, 2010021, 2010022, 2010023, 2010024, 2010012, 2010014, 2010018, 2010019)
  34. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  35. end
  36. function QuestComplete(Quest, QuestGiver, Player)
  37. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  38. UpdateQuestStepDescription(Quest, 3, "I have found a replacement counterweight for the chipped axe.")
  39. UpdateQuestTaskGroupDescription(Quest, 3, "I have found a replacement counterweight for the axe.")
  40. if HasItem(Player, 1349) then -- a chipped axe head(Item)
  41. RemoveItem(Player, 1349)
  42. end
  43. UpdateQuestDescription(Quest, "I have found all the pieces and reassembled Sharpscar.")
  44. GiveQuestReward(Quest, Player)
  45. end
  46. function Reload(Quest, QuestGiver, Player, Step)
  47. if Step == 1 then
  48. Step1Complete(Quest, QuestGiver, Player)
  49. elseif Step == 2 then
  50. Step2Complete(Quest, QuestGiver, Player)
  51. elseif Step == 3 then
  52. QuestComplete(Quest, QuestGiver, Player)
  53. end
  54. end