joining_the_gang.lua 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. --[[
  2. Script Name : Quests/SunkenCity/joining_the_gang.lua
  3. Script Purpose : Handles the quest, "Joining the Gang"
  4. Script Author : Scatman
  5. Script Date : 2009.08.01
  6. Zone : Sunken City
  7. Quest Giver: Manius Galla
  8. Preceded by: None
  9. Followed by: None
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepKill(Quest, 1, "I must kill two Blackshield raiders.", 2, 100, "I need to kill some of the Blackshields in the Sunken City.", 611, 1240123, 1240126, 1240117, 1240098, 1240124, 1240073, 1240067, 1240119, 1240140, 1240081, 1240118)
  13. AddQuestStepKill(Quest, 2, "I must kill two Blackshield plunderers.", 2, 100, "I need to kill some of the Blackshields in the Sunken City.", 611, 1240129, 1240092, 1240111, 1240095, 1240114, 1240078, 1240068)
  14. AddQuestStepKill(Quest, 3, "I must kill two Blackshield pillagers.", 2, 100, "I need to kill some of the Blackshields in the Sunken City.", 611, 1240090, 1240142, 1240113, 1240128, 1240069, 1240120, 1240099, 1240085, 1240148)
  15. AddQuestStepKill(Quest, 4, "I must kill two Blackshield ravagers.", 2, 100, "I need to kill some of the Blackshields in the Sunken City.", 611, 1240094, 1240088, 1240136, 1240077, 1240130, 1240101, 1240100, 1240087, 1240074)
  16. AddQuestStepKill(Quest, 5, "I must kill two Blackshield pirates.", 2, 100, "I need to kill some of the Blackshields in the Sunken City.", 611, 1240064, 1240093, 1240097, 1240134, 1240143, 1240055, 1240137, 1240089, 1240082, 1240147, 1240121)
  17. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_KilledRaiders")
  18. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_KilledPlunderers")
  19. AddQuestStepCompleteAction(Quest, 3, "Step3_Complete_KilledPillagers")
  20. AddQuestStepCompleteAction(Quest, 4, "Step4_Complete_KilledRavagers")
  21. AddQuestStepCompleteAction(Quest, 5, "Step5_Complete_KilledPirates")
  22. end
  23. function Accepted(Quest, QuestGiver, Player)
  24. FaceTarget(QuestGiver, Player)
  25. conversation = CreateConversation()
  26. PlayFlavor(QuestGiver, "voiceover/english/optional5/standard_dark_elf_male/fprt_hood05/quests/tilzaknlim/tilzak_x1_accept.mp3", "", "", 16004203, 2050489897, Player)
  27. AddConversationOption(conversation, "I'll be back when I have them.", "dlg_3_3")
  28. StartConversation(conversation, QuestGiver, Player, "OH! You'll help me? Oh thank you so much, friend! I wish to make a nice souffle from the fins of the Dusk Sharks that roam the waters here in the Sunken City. I need a large fin in order to make this souffle. I will be eagerly anticipating your return!")
  29. end
  30. function Declined(Quest, QuestGiver, Player)
  31. end
  32. function Step1_Complete_KilledRaiders(Quest, QuestGiver, Player)
  33. UpdateQuestStepDescription(Quest, 1, "I have killed the Blackshield raiders.")
  34. if QuestIsComplete(Player, 278) then
  35. KilledBlacksields(Quest, QuestGiver, Player)
  36. end
  37. end
  38. function Step2_Complete_KilledPlunderers(Quest, QuestGiver, Player)
  39. UpdateQuestStepDescription(Quest, 2, "I have killed the Blackshield plunderers.")
  40. if QuestIsComplete(Player, 278) then
  41. KilledBlacksields(Quest, QuestGiver, Player)
  42. end
  43. end
  44. function Step3_Complete_KilledPillagers(Quest, QuestGiver, Player)
  45. UpdateQuestStepDescription(Quest, 3, "I have killed the Blackshield pillagers.")
  46. if QuestIsComplete(Player, 278) then
  47. KilledBlacksields(Quest, QuestGiver, Player)
  48. end
  49. end
  50. function Step4_Complete_KilledRavagers(Quest, QuestGiver, Player)
  51. UpdateQuestStepDescription(Quest, 4, "I have killed the Blackshield ravagers.")
  52. if QuestIsComplete(Player, 278) then
  53. KilledBlacksields(Quest, QuestGiver, Player)
  54. end
  55. end
  56. function Step5_Complete_KilledPirates(Quest, QuestGiver, Player)
  57. UpdateQuestStepDescription(Quest, 5, "I have killed the Blackshield pirates.")
  58. if QuestIsComplete(Player, 278) then
  59. KilledBlacksields(Quest, QuestGiver, Player)
  60. end
  61. end
  62. function KilledBlacksields(Quest, QuestGiver, Player)
  63. UpdateQuestTaskGroupDescription(Quest, 1, "I've killed all of the Blackshields that were part of my test.")
  64. AddQuestStepChat(Quest, 2, "I need to speak with Manius.", 1, "I should return to Manius and let him know that I've passed his test.", 0, 1240079)
  65. AddQuestStepCompleteAction(Quest, 2, "Quest_Complete")
  66. end
  67. function Quest_Complete(Quest, QuestGiver, Player)
  68. UpdateQuestStepDescription(Quest, 2, "I've spoken with Manius.")
  69. UpdateQuestTaskGroupDescription(Quest, 2, "I've let Manius know that I've done what it takes to pass his test.")
  70. GiveQuestReward(Quest, Player)
  71. UpdateQuestDescription(Quest, "I've killed the raider lackeys like Manius has asked, and completed my test. He said he'll think about letting me join, but hasn't decided yet. Maybe I should check back with him later.")
  72. end
  73. function Reload(Quest, QuestGiver, Player, Step)
  74. if Step == 1 then
  75. Step1_Complete_KilledRaiders(Quest, QuestGiver, Player)
  76. elseif Step == 2 then
  77. Step2_Complete_KilledPlunderers(Quest, QuestGiver, Player)
  78. elseif Step == 3 then
  79. Step3_Complete_KilledPillagers(Quest, QuestGiver, Player)
  80. elseif Step == 4 then
  81. Step4_Complete_KilledRavagers(Quest, QuestGiver, Player)
  82. elseif Step == 5 then
  83. Step5_Complete_KilledPirates(Quest, QuestGiver, Player)
  84. end
  85. end