oakmyst_minerals.lua 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. --[[
  2. Script Name : Quests/SouthQeynos/oakmyst_minerals.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.05.14 07:05:17
  5. Script Purpose :
  6. Zone : SouthQeynos
  7. Quest Giver: Hegrenn
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepKill(Quest, 1, "I need to hunt Oakmyst royal defenders in Oakmyst Forest.", 3, 60, "I need to go to the Oakmyst Forest and slay some Oakmyst royal defenders to try to find some type of mineral.", 187, 1950047)
  13. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  14. UpdateQuestZone(Quest,"Oakmyst Forest")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. FaceTarget(QuestGiver, Player)
  18. conversation = CreateConversation()
  19. AddConversationOption(conversation, "All right.")
  20. StartConversation(conversation, QuestGiver, Player, "Good! Bring them back here as soon as you have them.")
  21. end
  22. function Declined(Quest, QuestGiver, Player)
  23. -- Add dialog here for when the quest is declined
  24. end
  25. function Deleted(Quest, QuestGiver, Player)
  26. -- Remove any quest specific items here when the quest is deleted
  27. end
  28. function Step1Complete(Quest, QuestGiver, Player)
  29. UpdateQuestStepDescription(Quest, 1, "I've gathered three pieces of an unknown mineral.")
  30. UpdateQuestTaskGroupDescription(Quest, 1, "I've gathered the mineral Blacksmith Hegrenn was interested in.")
  31. UpdateQuestZone(Quest,"South Qeynos")
  32. AddQuestStepChat(Quest, 2, "Deliver the mineral to Blacksmith Hegrenn.", 1, "Blacksmith Hegrenn will want to see these minerals. She was in the Bag 'n Barrel on the top floor in South Qeynos.", 187, 2310038)
  33. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  34. end
  35. function QuestComplete(Quest, QuestGiver, Player)
  36. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  37. UpdateQuestStepDescription(Quest, 2, "I've returned to Hegrenn with the minerals.")
  38. UpdateQuestTaskGroupDescription(Quest, 2, "I've given Hegrenn the minerals she requested. She seemed quite pleased about the discorvery, but asked me to keep it to myself.")
  39. UpdateQuestDescription(Quest, "There was more to all of this than just gossip. Sure enough I found an unknown mineral. Hegrenn was quite pleased, but asked me to keep the news to myself.")
  40. GiveQuestReward(Quest, Player)
  41. end
  42. function Reload(Quest, QuestGiver, Player, Step)
  43. if Step == 1 then
  44. Step1Complete(Quest, QuestGiver, Player)
  45. elseif Step == 2 then
  46. QuestComplete(Quest, QuestGiver, Player)
  47. end
  48. end