search_for_the_shrubbery.lua 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. --[[
  2. Script Name : search_for_the_shrubbery.lua
  3. Script Purpose : Handles the quest, "Search for the Shrubbery"
  4. Script Author : torsten
  5. Script Date : 14.07.2022
  6. Script Notes :
  7. Zone : Big Bend
  8. Quest Giver : Graktak Splatterblood
  9. Preceded by : None
  10. Followed by : Swamp Water Stew
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepHarvest(Quest, 1, "I need to collect shrubs from the center of Big Bend for Graktak.", 5, 100, "Graktak wants me to collect shrubs for his stew. They can be found in the center of Big Bend.", 194, 12772)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Step1Complete(Quest, QuestGiver, Player)
  17. UpdateQuestStepDescription(Quest, 1, "I have collected the shrubs that Graktak wanted for his stew.")
  18. UpdateQuestTaskGroupDescription(Quest, 1, "I have collected what I hope is enough shrubs for the large troll Graktak.")
  19. AddQuestStepChat(Quest, 2, "I should return to Graktak.", 1, "I should return to Graktak to deliver the shrubs.", 11, 1340042)
  20. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  21. end
  22. function QuestComplete(Quest, QuestGiver, Player)
  23. UpdateQuestDescription(Quest, "I was able to find the shrubs of 'much goodness' for Graktak. I have determined that most trolls in Freeport only care for two things, killing and eating. Fortunately, it seems if I continue to help Graktak he may decide not to eat me.")
  24. GiveQuestReward(Quest, Player)
  25. while HasItem(Player, 12772) do --Shrubs
  26. RemoveItem(Player, 12772)
  27. end
  28. end
  29. function Accepted(Quest, QuestGiver, Player)
  30. -- Add dialog here for when the quest is accepted
  31. end
  32. function Declined(Quest, QuestGiver, Player)
  33. -- Add dialog here for when the quest is declined
  34. end
  35. function Deleted(Quest, QuestGiver, Player)
  36. -- Remove any quest specific items here when the quest is deleted
  37. end
  38. function Reload(Quest, QuestGiver, Player, Step)
  39. if Step == 1 then
  40. Step1Complete(Quest, QuestGiver, Player)
  41. elseif Step == 2 then
  42. Complete(Quest, QuestGiver, Player)
  43. end
  44. end