mystail_tails_for_fevalin.lua 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. --[[
  2. Script Name : Quests/CastleviewHamlet/mystail_tails_for_fevalin.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.01.28 05:01:28
  5. Script Purpose :
  6. Zone : CastleviewHamlet
  7. Quest Giver: Fevalin
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. require "SpawnScripts/Generic/DialogModule"
  12. function Init(Quest)
  13. AddQuestStepKill(Quest, 1, "I must kill some mystail yearlings.", 6, 80, "I must collect tails from mystail yearlings.", 172, 1950009,8300035)
  14. AddQuestStepCompleteAction(Quest, 1, "RatsDead")
  15. UpdateQuestZone(Quest, "Oakmyst Forest")
  16. end
  17. function Accepted(Quest, QuestGiver, Player)
  18. FaceTarget(QuestGiver, Player)
  19. Dialog.New(QuestGiver, Player)
  20. Dialog.AddDialog("Thanks for pitching in. Every bundle of tails helps! You'll' find the mystail rats within Oakmyst Forest. Happy hunting!")
  21. Dialog.AddVoiceover("voiceover/english/merchant_fevalin/qey_village04/merchantfevalin005.mp3",25404249,2050252222)
  22. PlayFlavor(QuestGiver, "", "", "smile", 0,0 , Player)
  23. Dialog.AddOption("I'm off to Oakmyst Forest shortly!")
  24. Dialog.Start()
  25. end
  26. function Declined(Quest, QuestGiver, Player)
  27. -- Add dialog here for when the quest is declined
  28. end
  29. function Deleted(Quest, QuestGiver, Player)
  30. -- Remove any quest specific items here when the quest is deleted
  31. end
  32. function RatsDead(Quest, QuestGiver, Player)
  33. UpdateQuestStepDescription(Quest, 1, "I have killed some mystail yearlings.")
  34. UpdateQuestTaskGroupDescription(Quest, 1, "I have collected six mystail yearling tails.")
  35. AddQuestStepChat(Quest, 2, "I must return to Fevalin.", 1, "I must gives these mystrat tails to Fevalin.", 172, 2360039)
  36. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  37. UpdateQuestZone(Quest, "Castleview Hamlet")
  38. end
  39. function QuestComplete(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 2, "I have returned to Fevalin.")
  41. UpdateQuestTaskGroupDescription(Quest, 2, "I have delivered the mystrat tails to Fevalin.")
  42. UpdateQuestDescription(Quest, "I collected all six mystail yearling tails for Merchant Fevalin. He has rewarded for my service.")
  43. GiveQuestReward(Quest, Player)
  44. end
  45. function Reload(Quest, QuestGiver, Player, Step)
  46. if Step == 1 then
  47. RatsDead(Quest, QuestGiver, Player)
  48. elseif Step == 2 then
  49. QuestComplete(Quest, QuestGiver, Player)
  50. end
  51. end