dirty_work.lua 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. --[[
  2. Script Name : Quests/BeggarsCourt/dirty_work.lua
  3. Script Purpose : Handles the quest, "Dirty Work"
  4. Script Author : Scatman (updated by Cynnar 2018.06.13 03:06:49)
  5. Script Date : 2009.04.05
  6. Script Notes : One of the cups to poison is a pink cube from CoE+
  7. Script Notes : mug_to_poison_2 (1370086) -16 -2 82
  8. Script Notes : I am setting the quest to update with just the one cup
  9. Script Notes : 82, -7, 112 for eavesdrop location
  10. Zone : Beggar's Court
  11. Quest Giver: Thavian Destrus
  12. Preceded by: A Delivery (a_delivery.lua)
  13. Followed by: Reel Him In (reel_him_in.lua)
  14. --]]
  15. local DELCAIRN_SEBASTIAN = 1370038
  16. local FATES_WISPER = 7086
  17. local A_MUG_TO_POISON = 3727
  18. function Init(Quest)
  19. AddQuestStepObtainItem(Quest, 1, "I need to purchase 'Fate's Whisper' from Loamshallow a merchant whose shop is southeast of the bank.", 1, 100, "I need to purchase some poison.", 0, FATES_WISPER)
  20. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_BoughtPoison")
  21. end
  22. function Accepted(Quest, QuestGiver, Player)
  23. FaceTarget(QuestGiver, Player)
  24. conversation = CreateConversation()
  25. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/delcairn_sebastian/fprt_hood04/quests/delcairn/delcairn005a.mp3", "", "", 3741115317, 660402658, Player)
  26. AddConversationOption(conversation, "Yes, sir.")
  27. StartConversation(conversation, QuestGiver, Player, "Neither Revlos nor his interrogator must live. Go, quickly.")
  28. end
  29. function Declined(Quest, QuestGiver, Player)
  30. end
  31. function Step1_Complete_BoughtPoison(Quest, QuestGiver, Player)
  32. UpdateQuestStepDescription(Quest, 1, "I have purchased the poison.")
  33. UpdateQuestTaskGroupDescription(Quest, 1, "I have purchased the poison.")
  34. AddQuestStep(Quest, 2, "I need to go to the gate to North Freeport and eavesdrop on the conversation that is supposed to take place there. I should hide behind the western side of the gates.", 1, 100, "I need to eavesdrop on a conversation.", 0)
  35. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_Listened")
  36. end
  37. function Step2_Complete_Listened(Quest, QuestGiver, Player)
  38. UpdateQuestStepDescription(Quest, 2, "I have learned the location that the meeting will take place in.")
  39. UpdateQuestTaskGroupDescription(Quest, 2, "I have learned the location that the meeting will take place in.")
  40. AddQuestStepSpell(Quest, 3, "I must poison the cups in the room in the southeastern area of the Beggar's Court, east of the inn.", 1, 100, "I need to poison the cups at the meeting place.", 0, A_MUG_TO_POISON)
  41. AddQuestStepCompleteAction(Quest, 3, "Step3_Complete_CupsPoisoned")
  42. end
  43. function Step3_Complete_CupsPoisoned(Quest, QuestGiver, Player)
  44. UpdateQuestStepDescription(Quest, 3, "I have poisoned the cups.")
  45. UpdateQuestTaskGroupDescription(Quest, 3, "I have poisoned the cups.")
  46. -- Fate's Whisper
  47. RemoveItem(Player, FATES_WISPER)
  48. AddQuestStepChat(Quest, 4, "I need to return to Delcairn Sebastian in the upstairs room in the western end of the northern half of Beggar's Court.", 1, "I need to return to Delcairn.", 0, DELCAIRN_SEBASTIAN)
  49. AddQuestStepCompleteAction(Quest, 4, "Quest_Complete")
  50. end
  51. function Quest_Complete(Quest, QuestGiver, Player)
  52. UpdateQuestDescription(Quest, "I have poisoned the cups that will be used in Revlos' interrogation.")
  53. GiveQuestReward(Quest, Player)
  54. end
  55. function Reload(Quest, QuestGiver, Player, Step)
  56. if Step == 1 then
  57. Step1_Complete_BoughtPoison(Quest, QuestGiver, Player)
  58. elseif Step == 2 then
  59. Step2_Complete_Listened(Quest, QuestGiver, Player)
  60. elseif Step == 3 then
  61. Step3_Complete_CupsPoisoned(Quest, QuestGiver, Player)
  62. end
  63. end
  64. function Deleted(Quest, QuestGiver, Player)
  65. end