9
3

advanced_problem_solving.lua 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. --[[
  2. Script Name : advanced_problem_solving.lua
  3. Script Purpose : Handles the quest, "Advanced Problem Solving"
  4. Script Author : torsten\\Dorbin
  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. require "SpawnScripts/Generic/DialogModule"
  13. function Init(Quest)
  14. AddQuestStepKill(Quest, 1, "Defeat Giantslayer bashers", 5, 100, "I've heard that Giantslayer bashers 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, 8400027)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  16. UpdateQuestZone(Quest,"The Sprawl")
  17. end
  18. function Accepted(Quest, QuestGiver, Player)
  19. FaceTarget(NPC, Spawn)
  20. Dialog.New(NPC, Spawn)
  21. Dialog.AddDialog("That's what I like to hear! Remember that dirty vagrant you delivered the message to? Rumor has it he's hiding among rogues and scoundrels from the other districts -- a gang called the Giantslayers. And his ... brethren ... have gotten their feathers all ruffled and are planning to come here to ... pay court ... if you understand me. They want to send a message to their leader. Now, I enjoy a good tussle as much as anyone, of course, but, uh ... we don't want to rob you of an opportunity to prove your fighting skills. So, why don't you go to the Giantslayers and tan their mangy hides for us?")
  22. Dialog.AddVoiceover("voiceover/english/crispin_luvinius/fprt_hood04/quests/crispinluvinius/crispin_x2_accept.mp3", 4053471999, 555717236)
  23. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn, 0)
  24. Dialog.AddOption("Don't worry... I'll handle it.", "Dialog6")
  25. Dialog.Start()
  26. end
  27. function Declined(Quest, QuestGiver, Player)
  28. -- Add dialog here for when the quest is declined
  29. end
  30. function Deleted(Quest, QuestGiver, Player)
  31. -- Remove any quest specific items here when the quest is deleted
  32. end
  33. function Step1Complete(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 1, "I've beat down five Giantslayer thugs")
  35. UpdateQuestTaskGroupDescription(Quest, 1, "I've sent the Giantslayers a message that they shouldn't listen to vagrants who tell tall tales.")
  36. UpdateQuestZone(Quest,"Beggar's Court")
  37. AddQuestStepChat(Quest, 2, "Talk with Crispin", 1, "I should let Crispin in the Beggar's Court 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)
  38. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  39. end
  40. function QuestComplete(Quest, QuestGiver, Player)
  41. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  42. UpdateQuestStepDescription(Quest, 2, "I've spoken with Crispin")
  43. UpdateQuestTaskGroupDescription(Quest, 2, "I've let Crispin know these guys won't be bothering them anymore.")
  44. UpdateQuestDescription(Quest, "I've taken care of Crispin's problem. It seems that the guy isn't as tough as he acts.")
  45. GiveQuestReward(Quest, Player)
  46. end
  47. function Reload(Quest, QuestGiver, Player, Step)
  48. if Step == 1 then
  49. Step1Complete(Quest, QuestGiver, Player)
  50. elseif Step == 2 then
  51. QuestComplete(Quest, QuestGiver, Player)
  52. end
  53. end