gnomore_gnomesteaks.lua 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. --[[
  2. Script Name : gnomore_gnomesteaks.lua
  3. Script Purpose : Handles the quest, "Gnomore Gnomesteaks"
  4. Script Author : torsten
  5. Script Date : 13.07.2022
  6. Script Notes :
  7. Zone : Big Bend
  8. Quest Giver : Braz Gutpounder
  9. Preceded by : Troll Patrol
  10. Followed by : Troll Adventures
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepChat(Quest, 1, "Check up on Ruzb and see if he's back to eating gnomes again.", 1, "Check in with Ruzb and make sure he's not gone back to eating gnomes again.", 11, 1340024)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Step1Complete(Quest, QuestGiver, Player)
  17. UpdateQuestStepDescription(Quest, 1, "Looks like Ruzb is beyond salvation.")
  18. UpdateQuestTaskGroupDescription(Quest, 1, "Looks like Ruzb just couldn't keep away from the gnomesteaks. His loss.")
  19. local zone = GetZone(Player)
  20. local RuzbNPC = GetSpawnByLocationID(zone, 388762, false)
  21. Despawn(RuzbNPC)
  22. local Ruzb = GetSpawnByLocationID(zone, 133773787, false)
  23. local SpawnRuzb = SpawnByLocationID(zone, 133773787,false)
  24. AddQuestStepKill(Quest, 2, "I need to kill Ruzb!", 1, 100, "I need to kill Ruzb after he attacked me.", 91, 1340140)
  25. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  26. end
  27. function Step2Complete(Quest, QuestGiver, Player)
  28. UpdateQuestStepDescription(Quest, 2, "I needed to kill Ruzb.")
  29. UpdateQuestTaskGroupDescription(Quest, 2, "I needed to kill Ruzb after he attacked me.")
  30. AddQuestStepChat(Quest, 3, "I need to return to Braz.", 1, "I need to return to Braz after I killed Ruzb.", 11, 1340039)
  31. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  32. end
  33. function QuestComplete(Quest, QuestGiver, Player)
  34. UpdateQuestDescription(Quest, "Unfortunately, Ruzb just couldn't keep from eating the gnomes. Much to his discomfort, he had to be put out of his own misery. Or rather, Freeport can't have its citizens eating each other. It's just bad for morale.")
  35. GiveQuestReward(Quest, Player)
  36. end
  37. function Accepted(Quest, QuestGiver, Player)
  38. -- Add dialog here for when the quest is accepted
  39. end
  40. function Declined(Quest, QuestGiver, Player)
  41. -- Add dialog here for when the quest is declined
  42. end
  43. function Deleted(Quest, QuestGiver, Player)
  44. -- Remove any quest specific items here when the quest is deleted
  45. end
  46. function Reload(Quest, QuestGiver, Player, Step)
  47. if Step == 1 then
  48. Step1Complete(Quest, QuestGiver, Player)
  49. elseif Step == 2 then
  50. Step2Complete(Quest, QuestGiver, Player)
  51. elseif Step == 3 then
  52. QuestComplete(Quest, QuestGiver, Player)
  53. end
  54. end