9
3

ay_theres_the_rubbish.lua 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. --[[
  2. Script Name : ay_theres_the_rubbish.lua
  3. Script Purpose : Handles the quest, "Ay, There's the Rubb'ish"
  4. Script Author : torsten
  5. Script Date : 11.07.2022
  6. Script Notes :
  7. Zone : Big Bend
  8. Quest Giver : Kroota Gukbutcher
  9. Preceded by : None
  10. Followed by : Rat Barsh!
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepHarvest(Quest, 1, "Any pieces of rubbish need to be picked up.", 4, 100, "I am to remove the remnants of the fight from around the gates to the City of Freeport.", 2365, 1001007)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Step1Complete(Quest, QuestGiver, Player)
  17. UpdateQuestStepDescription(Quest, 1, "I have removed enough of the junk near the gate.")
  18. UpdateQuestTaskGroupDescription(Quest, 1, "I have cleaned up the rubbish.")
  19. while HasItem(Player, 1001007) do
  20. RemoveItem(Player, 1001007)
  21. end
  22. AddQuestStepHarvest(Quest, 2, "Any thrown aside bones need to be picked up.", 2, 100, "I am to remove the remnants of the fight from around the gates to the City of Freeport.", 418, 1001008)
  23. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  24. end
  25. function Step2Complete(Quest, QuestGiver, Player)
  26. UpdateQuestStepDescription(Quest, 2, "I have picked up enough bones at the gate. I should return to Kroota.")
  27. UpdateQuestTaskGroupDescription(Quest, 2, "I have cleaned up the rubbish.")
  28. while HasItem(Player, 1001008) do
  29. RemoveItem(Player, 1001008)
  30. end
  31. AddQuestStepChat(Quest, 3, "I should return to Kroota.", 1, "I should return to Kroota, I have cleaned up the rubbish.", 0, 1340040)
  32. AddQuestStepCompleteAction(Quest, 3, "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, 3, "I have removed enough of the junk near the gate.")
  37. UpdateQuestTaskGroupDescription(Quest, 3, "I have cleaned up the rubbish.")
  38. UpdateQuestDescription(Quest, "I cleaned up the trash and other signs of the fight from around the gate to South Freeport.")
  39. GiveQuestReward(Quest, Player)
  40. end
  41. function Accepted(Quest, QuestGiver, Player)
  42. -- Add dialog here for when the quest is accepted
  43. end
  44. function Declined(Quest, QuestGiver, Player)
  45. -- Add dialog here for when the quest is declined
  46. end
  47. function Deleted(Quest, QuestGiver, Player)
  48. -- Remove any quest specific items here when the quest is deleted
  49. end
  50. function Reload(Quest, QuestGiver, Player, Step)
  51. if Step == 1 then
  52. Step1Complete(Quest, QuestGiver, Player)
  53. elseif Step == 2 then
  54. Step2Complete(Quest, QuestGiver, Player)
  55. elseif Step == 3 then
  56. QuestComplete(Quest, QuestGiver, Player)
  57. end
  58. end