gruttooth_invasion_priest.lua 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. --[[
  2. Script Name : Quests/Hallmark/gruttooth_invasion_priest.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.09.09 08:09:42
  5. Script Purpose :
  6. Zone : Hallmark
  7. Quest Giver: Garven Tralk
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. require "SpawnScripts/Generic/DialogModule"
  12. function Init(Quest)
  13. AddQuestStep(Quest, 1, "Grab a weapon from the nearby weapon rack.", 1, 100, "I need to grab a weapon off of the weapon rack on the beach and help defend the outpost.", 45)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. FaceTarget(QuestGiver, Player)
  18. Dialog.New(QuestGiver, Player)
  19. Dialog.AddDialog("All right then. Quickly now, grab a weapon from the rack here and go to the west gate. Our scouts have reported that another group of goblins is going to charge the barricade at any moment now -- if they haven't already.")
  20. Dialog.AddVoiceover("voiceover/english/garven_tralk/tutorial_island02/garventralk017.mp3",2814753632, 2666092435)
  21. Dialog.AddOption("Continue.", "PContinue2")
  22. Dialog.Start()
  23. end
  24. function Declined(Quest, QuestGiver, Player)
  25. PlayFlavor(QuestGiver, "voiceover/english/garven_tralk/tutorial_island02_fvo_onaoienter.mp3", "You there! Stop standing around like a drunken sailor and get over here!", "", 4010256509, 3318344012, Player)
  26. end
  27. function Deleted(Quest, QuestGiver, Player)
  28. PlayFlavor(QuestGiver, "voiceover/english/garven_tralk/tutorial_island02_fvo_onaoienter.mp3", "You there! Stop standing around like a drunken sailor and get over here!", "", 4010256509, 3318344012, Player)
  29. end
  30. function Step1Complete(Quest, QuestGiver, Player)
  31. if not HasItem(Player, 1001011,1) and not HasItem(Player, 73731,1) then
  32. GiveQuestItem(Quest,Player,"You found some items that suit you on the weapon rack.",1001011, 73731)
  33. end
  34. UpdateQuestStepDescription(Quest, 1, "Got my weapon, now to kill some goblins.")
  35. UpdateQuestTaskGroupDescription(Quest, 1, "I've got my weapon and am ready to do my part defending the outpost.")
  36. AddQuestStepKill(Quest, 2, "I must kill one of the Gruttooth invaders attacking the outpost.", 1, 100, "I must head up the stairs and out to the west gate. Just past the barricades there I'll find goblin invaders attacking the outpost. It's my job to kill at least one of the buggers.", 11, 3250063)
  37. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  38. end
  39. function Step2Complete(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 2, "I've killed one of the Gruttooth invaders attacking the outpost.")
  41. UpdateQuestTaskGroupDescription(Quest, 2, "I've done my part in helping defend the outpost against a goblin raid.")
  42. AddQuestStepChat(Quest, 3, "I need to talk to Garven again.", 1, "I've done my duty and should talk to Garven on the beach again.", 11, 3250020)
  43. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  44. end
  45. function QuestComplete(Quest, QuestGiver, Player)
  46. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  47. UpdateQuestStepDescription(Quest, 3, "Garven has rewarded me for my efforts")
  48. UpdateQuestTaskGroupDescription(Quest, 3, "Garven has rewarded me for my efforts.")
  49. UpdateQuestDescription(Quest, "I successfully helped fend off one of the nearly constant goblin raids on this island, even managing to kill one of the invaders myself. Garven has instructed me to seek out the trainer of my profession on the Isle for further tasks. With any luck I'll be headed for one of the larger cities sometime soon.")
  50. GiveQuestReward(Quest, Player)
  51. end
  52. function Reload(Quest, QuestGiver, Player, Step)
  53. if Step == 1 then
  54. Step1Complete(Quest, QuestGiver, Player)
  55. elseif Step == 2 then
  56. Step2Complete(Quest, QuestGiver, Player)
  57. elseif Step == 3 then
  58. QuestComplete(Quest, QuestGiver, Player)
  59. end
  60. end