DestroyingTheFoundation.lua 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. --[[
  2. Script Name : DestroyingtheFoundation.lua
  3. Script Purpose : Handles the quest, "Destroying the Foundation"
  4. Script Author : Shatou
  5. Script Date : 1/5/2020
  6. Script Notes :
  7. Zone : Caves
  8. Quest Giver : Emma Torque
  9. Preceded by : An Explosive Idea
  10. Followed by : None
  11. --]]
  12. local FULKOIR_HAGGLETON_ID = 1970043
  13. function Init(Quest)
  14. AddQuestStep(Quest, 1, "I need to destroy the digging machine DDBD-2830-A.", 1, 100, "Emma Torque needs me to destroy the two machines being used by the gnolls to dig through the caves and to kill the Freeportian gnome responsible for bringing them here.", 11)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  16. end
  17. function Step1Complete(Quest, QuestGiver, Player)
  18. UpdateQuestStepDescription(Quest, 1, "I have placed explosives on the digging machine DDBD-2830-A.")
  19. AddQuestStep(Quest, 2, "I need to destroy the digging machine DDBD-2830-B.", 1, 100, "Emma Torque needs me to destroy the two machines being used by the gnolls to dig through the caves and to kill the Freeportian gnome responsible for bringing them here.", 11)
  20. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  21. end
  22. function Step2Complete(Quest, QuestGiver, Player)
  23. UpdateQuestStepDescription(Quest, 2, "I have placed explosives on the digging machine DDBD-2830-B.")
  24. SpawnMob(GetZone(Player), FULKOIR_HAGGLETON_ID, true, 44.11, 37.72, -108.44, 221.25)
  25. AddQuestStepKill(Quest, 3, "I need to kill Fulkoir Haggleton. He will probably appear among the Rockpaw gnolls once I've destroyed his machines.", 1, 100, "Emma Torque needs me to destroy the two machines being used by the gnolls to dig through the caves and to kill the Freeportian gnome responsible for bringing them here.", 2466, FULKOIR_HAGGLETON_ID)
  26. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  27. end
  28. function Step3Complete(Quest, QuestGiver, Player)
  29. UpdateQuestStepDescription(Quest, 3, "I have killed Fulkoir Haggleton.")
  30. UpdateQuestTaskGroupDescription(Quest, 1, "I have destroyed all of the machines and killed Fulkoir.")
  31. AddQuestStepChat(Quest, 4, "I need to return to Emma Torque.", 1, "Now that I have done what she needed I should return to Emma Torque.", 11)
  32. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  33. end
  34. function QuestComplete(Quest, QuestGiver, Player)
  35. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  36. UpdateQuestStepDescription(Quest, 4, "I have spoken with Emma Torque.")
  37. UpdateQuestTaskGroupDescription(Quest, 2, "I have spoken with Emma Torque.")
  38. UpdateQuestDescription(Quest, "I have destroyed the gnoll's digging machines and killed the gnome responsible for providing them with this technology.")
  39. GiveQuestReward(Quest, Player)
  40. end
  41. function Reload(Quest, QuestGiver, Player, Step)
  42. if Step == 1 then
  43. Step1Complete(Quest, QuestGiver, Player)
  44. elseif Step == 2 then
  45. Step2Complete(Quest, QuestGiver, Player)
  46. elseif Step == 3 then
  47. Step3Complete(Quest, QuestGiver, Player)
  48. elseif Step == 4 then
  49. QuestComplete(Quest, QuestGiver, Player)
  50. end
  51. end
  52. function Accepted(Quest, QuestGiver, Player)
  53. -- Add dialog here for when the quest is accepted
  54. end
  55. function Declined(Quest, QuestGiver, Player)
  56. -- Add dialog here for when the quest is declined
  57. end