advanced_problem_solving.lua 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. --[[
  2. Script Name : advanced_problem_solving.lua
  3. Script Purpose : Handles the quest, "Advanced Problem Solving"
  4. Script Author : torsten
  5. Script Date : 17.07.2022
  6. Script Notes :
  7. Zone : The Sprawl
  8. Quest Giver : Crispin Luvinius
  9. Preceded by : Problem Solving
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepKill(Quest, 1, "Defeat Giantslayer thugs", 5, 100, "I've heard that Giantslayer thugs hang out in the Sprawl. I should pay them a little visit. I can reach the Sprawl by using any of the bells in and around the City of Freeport.", 611, 1260013)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. -- Add dialog here for when the quest is accepted
  18. end
  19. function Declined(Quest, QuestGiver, Player)
  20. -- Add dialog here for when the quest is declined
  21. end
  22. function Deleted(Quest, QuestGiver, Player)
  23. -- Remove any quest specific items here when the quest is deleted
  24. end
  25. function Step1Complete(Quest, QuestGiver, Player)
  26. UpdateQuestStepDescription(Quest, 1, "I've beat down five Giantslayer thugs")
  27. UpdateQuestTaskGroupDescription(Quest, 1, "I've sent the Giantslayers a message that they shouldn't listen to vagrants who tell tall tales.")
  28. AddQuestStepChat(Quest, 2, "Talk with Crispin", 1, "I should let Crispin in the Sprawl know that he and his gang have nothing to worry about. I can reach the Sprawl by using any of the bells in and around the City of Freeport.", 11, 1370126)
  29. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  30. end
  31. function QuestComplete(Quest, QuestGiver, Player)
  32. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  33. UpdateQuestStepDescription(Quest, 2, "I've spoken with Crispin")
  34. UpdateQuestTaskGroupDescription(Quest, 2, "I've let Crispin know these guys won't be bothering them anymore.")
  35. UpdateQuestDescription(Quest, "I've taken care of Crispin's problem. It seems that the guy isn't as tough as he acts.")
  36. GiveQuestReward(Quest, Player)
  37. end
  38. function Reload(Quest, QuestGiver, Player, Step)
  39. if Step == 1 then
  40. Step1Complete(Quest, QuestGiver, Player)
  41. elseif Step == 2 then
  42. QuestComplete(Quest, QuestGiver, Player)
  43. end
  44. end