problem_solving.lua 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. --[[
  2. Script Name : problem_solving.lua
  3. Script Purpose : Handles the quest, "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 : None
  10. Followed by : Advanced Problem Solving
  11. --]]
  12. require "SpawnScripts/Generic/DialogModule"
  13. function Init(Quest)
  14. AddQuestStepKill(Quest, 1, "Kill vagrant squatters", 10, 100, "I need to send a message to the vagrant squatters in the Ruins. The message will involve a lot of them breathing dirt. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 611, 8420023,8420066)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  16. UpdateQuestZone(Quest,"Ruins")
  17. end
  18. function Step1Complete(Quest, QuestGiver, Player)
  19. UpdateQuestStepDescription(Quest, 1, "I've dealt with the vagrants.")
  20. UpdateQuestTaskGroupDescription(Quest, 1, "Those vagrants got the message loud and clear.")
  21. UpdateQuestZone(Quest,"Beggar's Court")
  22. AddQuestStepChat(Quest, 2, "Talk with Crispin", 1, "I should let Crispin in Beggar's Court know that his problem has been solved. I should get paid, too.", 11, 1370126)
  23. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  24. end
  25. function QuestComplete(Quest, QuestGiver, Player)
  26. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  27. UpdateQuestStepDescription(Quest, 2, "I've spoken with Crispin.")
  28. UpdateQuestTaskGroupDescription(Quest, 2, "I've let Crispin know that I've solved his problem.")
  29. UpdateQuestDescription(Quest, "I've taken care of Crispin's problem. It shouldn't be long before his business partner decides to step in line.")
  30. GiveQuestReward(Quest, Player)
  31. end
  32. function Accepted(Quest, QuestGiver, Player)
  33. FaceTarget(QuestGiver, Player)
  34. Dialog.New(QuestGiver, Player)
  35. Dialog.AddDialog("Okay, here's the deal. The guy is a vagrant who lives out in the ruins, right? We want to send the message that no one messes with us. You need to head south of here and do some dirty work to his buddies, understand?")
  36. Dialog.AddVoiceover("voiceover/english/crispin_luvinius/fprt_hood04/quests/crispinluvinius/crispin_x1_accept.mp3", 121176241, 3802962144)
  37. PlayFlavor(QuestGiver, "", "", "sniff", 0, 0, Player, 0)
  38. Dialog.AddOption("Sounds like an easy job.", "Dialog3")
  39. Dialog.Start()
  40. end
  41. function Declined(Quest, QuestGiver, Player)
  42. -- Add dialog here for when the quest is declined
  43. end
  44. function Deleted(Quest, QuestGiver, Player)
  45. -- Remove any quest specific items here when the quest is deleted
  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