9
3

reel_him_in.lua 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. --[[
  2. Script Name : Quests/BeggarsCourt/reel_him_in.lua
  3. Script Purpose : Handles the quest, "Reel Him In"
  4. Script Author : Scatman (updated by Cynnar 2018.06.14 06:06:04)
  5. Script Date : 2009.04.07
  6. Zone : Beggar's Court
  7. Quest Giver: Thavian Destrus
  8. Preceded by: Dirty Work (dirty_work.lua)
  9. Followed by: Thaen Sevellos (thaen_sevellos)
  10. --]]
  11. local HIDDEN_COMPONENTS = 8086
  12. local A_SMALL_EXPLOSIVE_DEVICE = 2754
  13. local LIEUTENANT_CERVAEN = 1370037
  14. local DELCAIRN_SEBASTIAN = 1370038
  15. function Init(Quest)
  16. AddQuestStepObtainItem(Quest, 1, "I need to collect the stashed components found strewn around the city - the containers will be marked so that I can recognize them.", 3, 100, ".", 2285, HIDDEN_COMPONENTS)
  17. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_GotComponents")
  18. end
  19. function Accepted(Quest, QuestGiver, Player)
  20. FaceTarget(QuestGiver, Player)
  21. conversation = CreateConversation()
  22. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/lieutenant_cervaen/fprt_hood04/quests/cervaen/cervaen005a.mp3", "", "", 673024524, 1827470261, Player)
  23. AddConversationOption(conversation, "I won't")
  24. StartConversation(conversation, QuestGiver, Player, "Oh... don't make a big ruckus when you get those supplies.")
  25. end
  26. function Declined(Quest, QuestGiver, Player)
  27. end
  28. function Step1_Complete_GotComponents(Quest, QuestGiver, Player)
  29. UpdateQuestStepDescription(Quest, 1, "I have collected the stashed components.")
  30. AddQuestStepChat(Quest, 2, "I need to speak with Lieutenant Cervaen and have him put these components together. He is upstairs in the western end of the northeastern half of Beggar's Court.", 1, ".", 0, LIEUTENANT_CERVAEN)
  31. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_SpokeToCervaen")
  32. end
  33. function Step2_Complete_SpokeToCervaen(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 2, "Lieutenant Cervaen has put the bomb together.")
  35. -- hidden components
  36. RemoveItem(Player, HIDDEN_COMPONENTS)
  37. RemoveItem(Player, HIDDEN_COMPONENTS)
  38. RemoveItem(Player, HIDDEN_COMPONENTS)
  39. -- a small explosive device
  40. SummonItem(Player, A_SMALL_EXPLOSIVE_DEVICE)
  41. AddQuestStep(Quest, 3, "I need to blow up the supplies in the eastern end of the northern half of Beggar's Court.", 1, 100, ".", 0)
  42. AddQuestStepCompleteAction(Quest, 3, "Step3_Complete_PlacedExplosives")
  43. end
  44. function Step3_Complete_PlacedExplosives(Quest, QuestGiver, Player)
  45. UpdateQuestStepDescription(Quest, 3, "I have placed the explosives.")
  46. -- a small explosive device
  47. RemoveItem(Player, A_SMALL_EXPLOSIVE_DEVICE)
  48. AddQuestStepChat(Quest, 4, "I need to return to Declairn Sebastian in the upstairs room in the western end of the northern half of Beggar's Court.", 1, ".", 0, DELCAIRN_SEBASTIAN)
  49. AddQuestStepCompleteAction(Quest, 4, "Quest_Complete")
  50. end
  51. function Quest_Complete(Quest, QuestGiver, Player)
  52. UpdateQuestDescription(Quest, "Adjunct-Captain Rommuls has been captured by the Brotherhood. It is unlikely that he will survive much longer.")
  53. GiveQuestReward(Quest, Player)
  54. end
  55. function Reload(Quest, QuestGiver, Player, Step)
  56. if Step == 1 then
  57. Step1_Complete_GotComponents(Quest, QuestGiver, Player)
  58. elseif Step == 2 then
  59. Step2_Complete_SpokeToCervaen(Quest, QuestGiver, Player)
  60. elseif Step == 3 then
  61. Step3_Complete_PlacedExplosives(Quest, QuestGiver, Player)
  62. end
  63. end
  64. function Deleted(Quest, QuestGiver, Player)
  65. while HasItem(Player, HIDDEN_COMPONENTS, 1) do
  66. RemoveItem(Player, HIDDEN_COMPONENTS)
  67. end
  68. while HasItem(Player, A_SMALL_EXPLOSIVE_DEVICE, 1) do
  69. RemoveItem(Player, A_SMALL_EXPLOSIVE_DEVICE)
  70. end
  71. end