dominating_the_dervish.lua 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. --[[
  2. Script Name : Quests/TheSprawl/dominating_the_dervish.lua
  3. Script Purpose : Handles the quest, "Dominating the Dervish"
  4. Script Author : Scatman
  5. Script Date : 2009.07.26
  6. Zone : The Sprawl
  7. Quest Giver: Enforcer Kurdek
  8. Preceded by: Investigating the Black Magi (investigating_the_black_magi.lua)
  9. Followed by: Heading into the Ruins (heading_into_the_ruins.lua)
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepKill(Quest, 1, "I need to deliver a beating to four Dervish hooligans.", 4, 100, "I need to defeat some Dervish in battle.", 0, 1260014, 1260008, 1260015, 1260010, 1260011, 1260012, 1260118, 1260021)
  13. AddQuestStepKill(Quest, 2, "I must defeat four Dervish hoodlums.", 4, 100, "I need to defeat some Dervish in battle.", 0, 1260110, 1260091, 1260067, 1260092, 1260111, 1260073, 1260073, 1260119, 1260103, 1260090, 1260065, 1260066, 1260113)
  14. AddQuestStepKill(Quest, 3, "I must best two Dervish crooks in battle.", 2, 100, "I need to defeat some Dervish in battle.", 0, 1260098, 1260105, 1260100, 1260096, 1260117, 1260099, 1260089, 1260115, 1260114, 1260102, 1260101, 1260116)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_KilledHooligans")
  16. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_KilledHoodlums")
  17. AddQuestStepCompleteAction(Quest, 3, "Step3_Complete_KilledCrooks")
  18. end
  19. function Accepted(Quest, QuestGiver, Player)
  20. FaceTarget(QuestGiver, Player)
  21. conversation = CreateConversation()
  22. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/enforcer_kurdek/fprt_adv03_sprawl/quests/enforcer_kurdek039.mp3", "", "", 2511484682, 858916391, Player)
  23. AddConversationOption(conversation, "I'll do my best.")
  24. StartConversation(conversation, QuestGiver, Player, "Take out some of the Dervish hooligans, hoodlums, and crooks. You may have to fight your way deeper in to find some of them. Watch your back, because the Dervish don't fight fairly. But then again, neither should you! Return to me when you've taught them a lesson, and I'll reward you handsomely on behalf of the Dreadnaughts.")
  25. end
  26. function Declined(Quest, QuestGiver, Player)
  27. end
  28. function Step1_Complete_KilledHooligans(Quest, QuestGiver, Player)
  29. UpdateQuestStepDescription(Quest, 1, "I have defeated four Dervish hooligans.")
  30. if QuestIsComplete(Player, 256) then
  31. Multiple_Steps_Complete(Quest, QuestGiver, Player)
  32. end
  33. end
  34. function Step2_Complete_KilledHoodlums(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 2, "I have crushed four Dervish hoodlums")
  36. if QuestIsComplete(Player, 256) then
  37. Multiple_Steps_Complete(Quest, QuestGiver, Player)
  38. end
  39. end
  40. function Step3_Complete_KilledCrooks(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 3, "I must best two Dervish crooks in battle.")
  42. if QuestIsComplete(Player, 256) then
  43. Multiple_Steps_Complete(Quest, QuestGiver, Player)
  44. end
  45. end
  46. function Multiple_Steps_Complete(Quest, QuestGiver, Player)
  47. UpdateQuestTaskGroupDescription(Quest, 1, "I have taught the Dervish a lesson they won't soon forget")
  48. AddQuestStepChat(Quest, 4, "I should proclaim my victory to Enforcer Kurdek.", 1, "I should return to Enforcer Kurdek and tell him that I punished the Dervish.", 0, 1260006)
  49. AddQuestStepCompleteAction(Quest, 4, "Quest_Complete")
  50. end
  51. function Quest_Complete(Quest, QuestGiver, Player)
  52. UpdateQuestStepDescription(Quest, 4, "I have informed Enforcer Kurdek of my success.")
  53. UpdateQuestTaskGroupDescription(Quest, 2, "I reported back to Enforcer Kurdek.")
  54. GiveQuestReward(Quest, Player)
  55. UpdateQuestDescription(Quest, "I defeated a lot of Dervish, but they seem to have established a strong foothold here in the Sprawl. Hopefully my efforts will help the Dreadnaughts maintain control and keep them out of Freeport proper.")
  56. end
  57. function Reload(Quest, QuestGiver, Player)
  58. if Step == 1 then
  59. Step1_Complete_KilledHooligans(Quest, QuestGiver, Player)
  60. elseif Step == 2 then
  61. Step2_Complete_KilledHoodlums(Quest, QuestGiver, Player)
  62. elseif Step == 3 then
  63. Step3_Complete_KilledCrooks(Quest, QuestGiver, Player)
  64. end
  65. end