show_em_whos_boss.lua 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. --[[
  2. Script Name : Quests/TheSprawl/show_em_whos_boss.lua
  3. Script Purpose : Handles the quest, "Show 'Em Who's Boss"
  4. Script Author : Scatman
  5. Script Date : 2009.07.26
  6. Zone : The Sprawl
  7. Quest Giver: Trainer Durbok
  8. Preceded by: None
  9. Followed by: None
  10. --]]
  11. function Init(Quest)
  12. local choice = math.random(1, 6)
  13. if choice == 1 then
  14. AddQuestStepKill(Quest, 1, "I should deliver a beating to six Dervish crooks.", 6, 100, "I need to defeat some rival gang members to show them the Dreadnaughts cannot be trifled with.", 611, ID)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_KilledCrooks")
  16. elseif choice == 2 then
  17. AddQuestStepKill(Quest, 1, "I should deliver a beating to six Dervish hoodlums.", 6, 100, "I need to defeat some rival gang members to show them the Dreadnaughts cannot be trifled with.", 611, ID)
  18. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_KilledHoodlums")
  19. elseif choice == 3 then
  20. AddQuestStepKill(Quest, 1, "I should deliver a beating to six Black Magi anarchists.", 6, 100, "I need to defeat some rival gang members to show them the Dreadnaughts cannot be trifled with.", 611, ID)
  21. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_KilledAnarchists")
  22. elseif choice == 4 then
  23. AddQuestStepKill(Quest, 1, "I should deliver a beating to six Black Magi fanatics.", 6, 100, "I need to defeat some rival gang members to show them the Dreadnaughts cannot be trifled with.", 611, ID)
  24. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_KilledFanatics")
  25. elseif choice == 5 then
  26. AddQuestStepKill(Quest, 1, "I should deliver a beating to six Black Magi dissidents.", 6, 100, "I need to defeat some rival gang members to show them the Dreadnaughts cannot be trifled with.", 611, ID)
  27. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_KilledDissidents")
  28. elseif choice == 6 then
  29. AddQuestStepKill(Quest, 1, "I should deliver a beating to six Black Magi insurgents.", 6, 100, "I need to defeat some rival gang members to show them the Dreadnaughts cannot be trifled with.", 611, ID)
  30. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_KilledInsurgents")
  31. end
  32. end
  33. function Accepted(Quest, QuestGiver, Player)
  34. FaceTarget(QuestGiver, Player)
  35. conversation = CreateConversation()
  36. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/trainer_durbok/fprt_adv03_sprawl/quests/trainer_durbok008.mp3", "", "", 2693497223, 3993753671, Player)
  37. AddConversationOption(conversation, "Will do.")
  38. StartConversation(conversation, QuestGiver, Player, "Sounds good. I'll jot down the particulars in your journal. Come back to me for payment when you're finished showing those scum who's boss.")
  39. end
  40. function Declined(Quest, QuestGiver, Player)
  41. end
  42. function Step1_Complete_KilledCrooks(Quest, QuestGiver, Player)
  43. UpdateQuestStepDescription(Quest, 1, "I have defeated six Dervish crooks.")
  44. Step1_Complete_NextStep(Quest, QuestGiver, Player)
  45. end
  46. function Step1_Complete_KilledHoodlums(Quest, QuestGiver, Player)
  47. UpdateQuestStepDescription(Quest, 1, "I have defeated six Dervish hoodlums.")
  48. Step1_Complete_NextStep(Quest, QuestGiver, Player)
  49. end
  50. function Step1_Complete_KilledAnarchists(Quest, QuestGiver, Player)
  51. UpdateQuestStepDescription(Quest, 1, "I have defeated six Black Magi anarchists.")
  52. Step1_Complete_NextStep(Quest, QuestGiver, Player)
  53. end
  54. function Step1_Complete_KilledFanatics(Quest, QuestGiver, Player)
  55. UpdateQuestStepDescription(Quest, 1, "I have defeated six Black Magi fanatics.")
  56. Step1_Complete_NextStep(Quest, QuestGiver, Player)
  57. end
  58. function Step1_Complete_KilledDissidents(Quest, QuestGiver, Player)
  59. UpdateQuestStepDescription(Quest, 1, "I have defeated six Black Magi dissidents.")
  60. Step1_Complete_NextStep(Quest, QuestGiver, Player)
  61. end
  62. function Step1_Complete_KilledInsurgents(Quest, QuestGiver, Player)
  63. UpdateQuestStepDescription(Quest, 1, "I have defeated six Black Magi insurgents.")
  64. Step1_Complete_NextStep(Quest, QuestGiver, Player)
  65. end
  66. function Step1_Complete_NextStep(Quest, QuestGiver, Player)
  67. UpdateQuestTaskGroupDescription(Quest, 1, "I taught the Dreadnaughts' rivals a valuable lesson in pain.")
  68. AddQuestStepChat(Quest, 2, "I should return to Trainer Durbok near the Giantslayers for my reward.", 1, "Having taught those thugs a lesson, I should return to Trainer Durbok.", 0, 1260027)
  69. AddQuestStepCompleteAction(Quest, 2, "Quest_Complete")
  70. end
  71. function Quest_Complete(Quest, QuestGiver, Player)
  72. UpdateQuestStepDescription(Quest, 2, "I have received my reward from Trainer Durbok.")
  73. UpdateQuestTaskGroupDescription(Quest, 2, "I let Trainer Durbok know my efforts were a success.")
  74. GiveQuestReward(Quest, Player)
  75. UpdateQuestDescription(Quest, "I have defeated the enemies of the Dreadnaughts and taught those rival gangs a lesson. The Sprawl should be a bit more orderly thanks to my efforts.")
  76. end
  77. function Reload(Quest, QuestGiver, Player)
  78. if Step == 1 then
  79. local choice = math.random(1, 6)
  80. if choice == 1 then
  81. Step1_Complete_KilledCrooks(Quest, QuestGiver, Player)
  82. elseif choice == 2 then
  83. Step1_Complete_KilledHoodlums(Quest, QuestGiver, Player)
  84. elseif choice == 3 then
  85. Step1_Complete_KilledAnarchists(Quest, QuestGiver, Player)
  86. elseif choice == 4 then
  87. Step1_Complete_KilledFanatics(Quest, QuestGiver, Player)
  88. elseif choice == 5 then
  89. Step1_Complete_KilledDissidents(Quest, QuestGiver, Player)
  90. elseif choice == 6 then
  91. Step1_Complete_KilledInsurgents(Quest, QuestGiver, Player)
  92. end
  93. end
  94. end