problem_solving.lua 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. --[[
  2. Script Name : problem_solving.lua
  3. Script Purpose : Handles the quest, "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 : None
  10. Followed by : Advanced Problem Solving
  11. --]]
  12. function Init(Quest)
  13. 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, 1270004)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Step1Complete(Quest, QuestGiver, Player)
  17. UpdateQuestStepDescription(Quest, 1, "I've dealt with the vagrants.")
  18. UpdateQuestTaskGroupDescription(Quest, 1, "Those vagrants got the message loud and clear.")
  19. 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. I can reach the Sprawl by using any of the bells in and around the City of Freeport.", 11, 1370126)
  20. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  21. end
  22. function QuestComplete(Quest, QuestGiver, Player)
  23. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  24. UpdateQuestStepDescription(Quest, 2, "I've spoken with Crispin.")
  25. UpdateQuestTaskGroupDescription(Quest, 2, "I've let Crispin know that I've solved his problem.")
  26. UpdateQuestDescription(Quest, "I've taken care of Crispin's problem. I think it won't be too long before his business partner decides to do what he was told to do.")
  27. GiveQuestReward(Quest, Player)
  28. end
  29. function Accepted(Quest, QuestGiver, Player)
  30. -- Add dialog here for when the quest is accepted
  31. end
  32. function Declined(Quest, QuestGiver, Player)
  33. -- Add dialog here for when the quest is declined
  34. end
  35. function Deleted(Quest, QuestGiver, Player)
  36. -- Remove any quest specific items here when the quest is deleted
  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