9
3

pounding_the_enemy.lua 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. --[[
  2. Script Name : Quests/Ruins/pounding_the_enemy.lua
  3. Script Purpose : Handles the quest, "Pounding the Enemy"
  4. Script Author : Scatman
  5. Script Date : 2009.07.28
  6. Zone : The Ruins
  7. Quest Giver: Lieutenant Argosian
  8. Preceded by: Pawns in the Game (pawns_in_the_game.lua)
  9. Followed by: Prophet and Loss (prophet_and_loss.lua)
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepKill(Quest, 1, "I must defeat five Brokentusk guards.", 5, 100, "I have been ordered to defeat the Brokentusk orcs and defend the vagrant squatters.", 2489, 1270035, 1270045, 1270095, 1270044)
  13. AddQuestStepKill(Quest, 2, "I must defeat five Brokentusk warriors.", 5, 100, "I have been ordered to defeat the Brokentusk orcs and defend the vagrant squatters.", 2489, 1270037, 1270056)
  14. AddQuestStepKill(Quest, 3, "I must defend the vagrants by slaying their overseer.", 1, 100, "I have been ordered to defeat the Brokentusk orcs and defend the vagrant squatters.", 2489, 1270010)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_KilledGuards")
  16. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_KilledWarriors")
  17. AddQuestStepCompleteAction(Quest, 3, "Step3_Complete_KilledOverseer")
  18. end
  19. function Accepted(Quest, QuestGiver, Player)
  20. FaceTarget(QuestGiver, Player)
  21. conversation = CreateConversation()
  22. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/lieutenant_argosian/fprt_adv04_ruins/revamp/lieutenant_argosian015b.mp3", "", "", 102436079, 1387861460, Player)
  23. AddConversationOption(conversation, "I will.")
  24. StartConversation(conversation, QuestGiver, Player, "I knew I could count on you. Return to me when the orcs have paid for their crimes.")
  25. end
  26. function Declined(Quest, QuestGiver, Player)
  27. end
  28. function Step1_Complete_KilledGuards(Quest, QuestGiver, Player)
  29. UpdateQuestStepDescription(Quest, 1, "I have defeated five Brokentusk guards")
  30. if QuestIsComplete(Player, 264) then
  31. KilledAllOrcs(Quest, QuestGiver, Player)
  32. end
  33. end
  34. function Step2_Complete_KilledWarriors(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 2, "I have defeated five Brokentusk warriors.")
  36. if QuestIsComplete(Player, 264) then
  37. KilledAllOrcs(Quest, QuestGiver, Player)
  38. end
  39. end
  40. function Step3_Complete_KilledOverseer(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 3, "I have slain the orc overseer.")
  42. if QuestIsComplete(Player, 264) then
  43. KilledAllOrcs(Quest, QuestGiver, Player)
  44. end
  45. end
  46. function KilledAllOrcs(Quest, QuestGiver, Player)
  47. UpdateQuestTaskGroupDescription(Quest, 1, "I have defeated the orcs, keeping the vagrants safe for now.")
  48. AddQuestStepChat(Quest, 4, "I must report back to Lieutenant Argosian.", 1, "I should return to the lieutenant and report that the vagrants are safe for now.", 0, 1270031)
  49. AddQuestStepCompleteAction(Quest, 4, "Quest_Complete")
  50. end
  51. function Quest_Complete(Quest, QuestGiver, Player)
  52. UpdateQuestStepDescription(Quest, 4, "I have reported back to Lieutenant Argosian.")
  53. UpdateQuestTaskGroupDescription(Quest, 2, "I have returned to Lieutenant Argosian.")
  54. GiveQuestReward(Quest, Player)
  55. UpdateQuestDescription(Quest, "I defeated a variety of Brokentusk orcs and kept the squatters safe in the Ruins. The threat is far from over, however.")
  56. end
  57. function Reload(Quest, QuestGiver, Player, Step)
  58. if Step == 1 then
  59. Step1_Complete_KilledGuards(Quest, QuestGiver, Player)
  60. elseif Step == 2 then
  61. Step2_Complete_KilledWarriors(Quest, QuestGiver, Player)
  62. elseif Step == 3 then
  63. Step3_Complete_KilledOverseer(Quest, QuestGiver, Player)
  64. end
  65. end