bog_exploring_for_grommluk.lua 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. --[[
  2. Script Name : Quests/CastleviewHamlet/bog_exploring_for_grommluk.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.01.26 06:01:18
  5. Script Purpose :
  6. Zone : CastleviewHamlet
  7. Quest Giver: Grommluk
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepLocation(Quest, 1, "I need to collect Peat Bog water.", 18, "I need to collect bog water in Grommluk's jar from the middle of Peat Bog.", 356, 667.10, -33.6, 501.99) AddQuestStepCompleteAction(Quest, 1, "QuestComplete")
  13. AddQuestStepCompleteAction(Quest, 1, "GatheredWater")
  14. UpdateQuestZone(Quest, "The Peat Bog")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. -- Add dialog here for when the quest is accepted
  18. end
  19. function Declined(Quest, QuestGiver, Player)
  20. -- Add dialog here for when the quest is declined
  21. end
  22. function Deleted(Quest, QuestGiver, Player)
  23. -- Remove any quest specific items here when the quest is deleted
  24. end
  25. function GatheredWater(Quest, QuestGiver, Player)
  26. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  27. UpdateQuestStepDescription(Quest, 1, "I collected swamp water in the jar.")
  28. UpdateQuestTaskGroupDescription(Quest, 1, "I collected a sample of the Peat Bog water in Grommluk's jar.")
  29. UpdateQuestZone(Quest, "Peat Bog")
  30. AddQuestStepChat(Quest, 2, "I need to return to Grommluk.", 1, "I need to give the bog water to Grommluk so he may assess it.", 356, 2360030)
  31. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  32. end
  33. function QuestComplete(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 2, "I returned to Grommluk.")
  35. UpdateQuestTaskGroupDescription(Quest, 2, "I gave the jar of Peat Bog water to Grommluk.")
  36. UpdateQuestZone(Quest, "Castleview Hamlet")
  37. UpdateQuestDescription(Quest, "I returned Grommluk's jar to him with swamp water I collected from the middle of Peat Bog. He paid me for my exploration services.")
  38. GiveQuestReward(Quest, Player)
  39. end
  40. function Reload(Quest, QuestGiver, Player, Step)
  41. if Step == 1 then
  42. GatheredWater(Quest, QuestGiver, Player)
  43. end
  44. if Step == 2 then
  45. QuestComplete(Quest, QuestGiver, Player)
  46. end
  47. end