to_spite_a_darkleaf.lua 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. --[[
  2. Script Name : to_spite_a_darkleaf.lua
  3. Script Purpose : Handles the quest, "To Spite a Darkleaf"
  4. Script Author : torsten\\Dorbin
  5. Script Date : 17.07.2022
  6. Script Notes :
  7. Zone : Beggar's Court
  8. Quest Giver : Mariana Darkleaf
  9. Preceded by : None
  10. Followed by : Running For A Candidate
  11. --]]
  12. require "SpawnScripts/Generic/DialogModule"
  13. function Init(Quest)
  14. AddQuestStepKill(Quest, 1, "I must kill 10 Shoreside Asps in the Ruins.", 10, 100, "I should head over to the Ruins and kill ten (10) Snakes just to tick her off.", 98, 8420020,8400012)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  16. UpdateQuestZone(Quest,"The Ruins")
  17. end
  18. function Step1Complete(Quest, QuestGiver, Player)
  19. UpdateQuestStepDescription(Quest, 1, "I have killed the snakes.")
  20. UpdateQuestTaskGroupDescription(Quest, 1, "I've killed the Snakes.")
  21. UpdateQuestZone(Quest,"Beggar's Court")
  22. AddQuestStepChat(Quest, 2, "I should return to Mariana.", 1, "I should now return to Mariana Darkleaf and let her know I did what she asked... and bother her some more.", 11, 1370014)
  23. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  24. end
  25. function QuestComplete(Quest, QuestGiver, Player)
  26. UpdateQuestStepDescription(Quest, 2, "I let Mariana know that I was still alive.")
  27. UpdateQuestTaskGroupDescription(Quest, 2, "I let Mariana know that I was still alive.")
  28. UpdateQuestDescription(Quest, "Mariana Darkleaf wasn't too pleased to see me return - alive, that is. Even though it took some time out of my day to kill those snakes, it was still worth it just to see her face when I returned.")
  29. GiveQuestReward(Quest, Player)
  30. end
  31. function Accepted(Quest, QuestGiver, Player)
  32. FaceTarget(QuestGiver, Player)
  33. Dialog.New(QuestGiver, Player)
  34. Dialog.AddDialog("Really? Well then, why don't you run along to the Ruins and play with some Shoreside Asps, hmmm? Maybe you'll get bitten by your serpent pals and never bother me again!")
  35. Dialog.AddOption("We'll see about that.")
  36. Dialog.AddOption("You are insufferable!")
  37. Dialog.Start()
  38. end
  39. function Declined(Quest, QuestGiver, Player)
  40. -- Add dialog here for when the quest is declined
  41. end
  42. function Deleted(Quest, QuestGiver, Player)
  43. -- Remove any quest specific items here when the quest is deleted
  44. end
  45. function Reload(Quest, QuestGiver, Player, Step)
  46. if Step == 1 then
  47. Step1Complete(Quest, QuestGiver, Player)
  48. elseif Step == 2 then
  49. QuestComplete(Quest, QuestGiver, Player)
  50. end
  51. end