9
3

chuggles_toolbox.lua 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. --[[
  2. Script Name : Quests/ThievesWay/chuggles_toolbox.lua
  3. Script Author : premierio015
  4. Script Date : 29.06.2021
  5. Script Purpose :
  6. Zone : ThievesWay
  7. Quest Giver:
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepKill(Quest, 1, "I need to find a cogspindler on one of the union menders.", 1, 66, "I need to find Chuggle's five tools and replace them in the toolbox. There's a good chance that they're down here in the Thieves' Way.", 1228, 8430033)
  13. AddQuestStepKill(Quest, 2, "I need to find a zaptwister on one of the Darkblade nobles.", 1, 70, "I need to find Chuggle's five tools and replace them in the toolbox. There's a good chance that they're down here in the Thieves' Way.", 1031, 8430006)
  14. AddQuestStepKill(Quest, 3, "I need to find a sprocket wobbler on one of the diseased ratonga.", 1, 70, "I need to find Chuggle's five tools and replace them in the toolbox. There's a good chance that they're down here in the Thieves' Way.", 32, 8430010,8430009,8430011)
  15. AddQuestStepKill(Quest, 4, "I need to find an octagonal bludgeoner from the corruptors.", 1, 70, "I need to find Chuggle's five tools and replace them in the toolbox. There's a good chance that they're down here in the Thieves' Way.", 634, 8430001)
  16. AddQuestStepKill(Quest, 5, "I need to find a can of elbow grease from a fallen crusader.", 1, 70, "I need to find Chuggle's five tools and replace them in the toolbox. There's a good chance that they're down here in the Thieves' Way.", 943, 8430034)
  17. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  18. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  19. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  20. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  21. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  22. end
  23. function Step1Complete(Quest, QuestGiver, Player)
  24. UpdateQuestStepDescription(Quest, 1, "I found a cogspindler.")
  25. QuestCheck(Quest, QuestGiver, Player)
  26. end
  27. function Step2Complete(Quest, QuestGiver, Player)
  28. UpdateQuestStepDescription(Quest, 2, "I found a zaptwister.")
  29. QuestCheck(Quest, QuestGiver, Player)
  30. end
  31. function Step3Complete(Quest, QuestGiver, Player)
  32. UpdateQuestStepDescription(Quest, 3, "I found a sprocket wobbler.")
  33. QuestCheck(Quest, QuestGiver, Player)
  34. end
  35. function Step4Complete(Quest, QuestGiver, Player)
  36. UpdateQuestStepDescription(Quest, 4, "I found an octagonal bludgeoner.")
  37. QuestCheck(Quest, QuestGiver, Player)
  38. end
  39. function Step5Complete(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 5, "I found a can of elbow grease.")
  41. QuestCheck(Quest, QuestGiver, Player)
  42. end
  43. function QuestCheck(Quest, QuestGiver, Player)
  44. if QuestStepIsComplete(Player,483,1) and QuestStepIsComplete(Player,483,2) and QuestStepIsComplete(Player,483,3) and QuestStepIsComplete(Player,483,4) and QuestStepIsComplete(Player,483,5)then
  45. UpdateQuestStepDescription(Quest, 1, "I found all the tools that were missing from Chuggle's toolbox.")
  46. UpdateQuestZone(Quest, "Temple Street")
  47. AddQuestStepChat(Quest, 6, "I need to speak with Chuggle Valvesplitter.", 1, "I have to return toolbox to Chuggle Valvesplitter." , 11, 1360021)
  48. AddQuestStepCompleteAction(Quest,6, "quest_complete")
  49. end
  50. end
  51. function Accepted(Quest, QuestGiver, Player)
  52. if HasItem(Player, 5014,1) then
  53. RemoveItem(Player, 5014)
  54. SendMessage(Player,"You place the toolbox in your quest satchle for later.")
  55. end
  56. end
  57. function Declined(Quest, QuestGiver, Player)
  58. end
  59. function quest_complete(Quest, QuestGiver, Player)
  60. UpdateQuestDescription(Quest, 3, "I have spoken with Chuggle Valvesplitter and returned the toolbox.")
  61. GiveQuestReward(Quest, Player)
  62. end
  63. function Reload(Quest, QuestGiver, Player, Step)
  64. if Step == 1 then
  65. Step1Complete(Quest, QuestGiver, Player)
  66. elseif Step == 2 then
  67. Step2Complete(Quest, QuestGiver, Player)
  68. elseif Step == 3 then
  69. Step3Complete(Quest, QuestGiver, Player)
  70. elseif Step == 4 then
  71. Step4Complete(Quest, QuestGiver, Player)
  72. elseif Step == 5 then
  73. Step5Complete(Quest, QuestGiver, Player)
  74. elseif Step == 6 then
  75. QuestComplete(Quest, QuestGiver, Player)
  76. end
  77. end