9
3

battle_on_the_home_front.lua 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. --[[
  2. Script Name : Quests/ScaleYard/battle_on_the_home_front.lua
  3. Script Purpose : Quest 185, Battle On The Home Front
  4. Script Author : Xanibunib
  5. Script Date : 4.9.2009
  6. Zone : Scale Yard
  7. Quest Giver: Clan Chief Malachi Sleetspear
  8. Quest ID # : 185
  9. Preceded by: Sound off!
  10. Followed by: What Happens In The Scale Yard Stays...
  11. --]]
  12. -- Quest ID's
  13. local QUEST_3 = 348 -- 185 --Battle On The Home Front
  14. function Init(Quest)
  15. AddQuestStepChat(Quest, 1, "Malachi has asked me to speak with an Iksar named Issik. Issik was last seen talking to Arms Dealer Shilza.", 1, "Malachi wants me to speak with Issik, an Iksar in charge of Commonland Orc raiding parties. Malachi wants to know when his group will get to goon a raid.", 0, 1390043)
  16. AddQuestStepCompleteAction(Quest, 1, "Step1_TalkedToIssik")
  17. end
  18. function Accepted(Quest, QuestGiver, Player)
  19. if QuestGiver ~= nil then
  20. if GetDistance(Player, QuestGiver) < 30 then
  21. FaceTarget(NPC, Spawn)
  22. conversation = CreateConversation()
  23. PlayFlavor(NPC, "voiceover/english/gu38/tutorial_revamp/clan_chief_malachi_sleetspear/fprt_hood06/malachi058.mp3", "", "", 3619805885, 1780261513, Spawn)
  24. AddConversationOption(conversation, "Sounds simple enough.")
  25. StartConversation(conversation, NPC, Spawn, "You can find him west of the fountain at the end of the alley, near Arms Dealer Shilza. Go now.")
  26. end
  27. end
  28. end
  29. function Declined(Quest, QuestGiver, Player)
  30. end
  31. function Deleted(Quest, QuestGiver, Player)
  32. end
  33. function Step1_TalkedToIssik(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 1, "I spoke to Issik. Malachi is not going to be happy. I should go tell him the news.")
  35. AddQuestStepChat(Quest, 2, "I need to let Malachi know the bad news.", 1, "Malachi wants me to speak with Issik, an Iksar in charge of Commonland Orc raiding parties. Malachi wants to know when his group will get to goon a raid.", 0, 1390004)
  36. AddQuestStepCompleteAction(Quest, 2, "Step2_TalkedToChief")
  37. end
  38. function Step2_TalkedToChief(Quest, QuestGiver, Player)
  39. UpdateQuestTaskGroupDescription(Quest, 1, "Issik told me he chose another group of raiders instead of Malachi's group. I don't think he willbe very happy about this at all. Regardless, I need to let him know the news.")
  40. AddQuestStep(Quest, 3, "I need to smash the desk.", 1, 100, "Malachi is furious as Issik! Rather than kill him, Malachi has something different in mind. I am to smash the furniture in Issik's quarters and teach the Iskar a lesson! His quarters are up the stiars, just east of the docks.", 0)
  41. AddQuestStep(Quest, 4, "I need to smash the chair.", 1, 100, "Malachi is furious as Issik! Rather than kill him, Malachi has something different in mind. I am to smash the furniture in Issik's quarters and teach the Iskar a lesson! His quarters are up the stiars, just east of the docks.", 0)
  42. AddQuestStep(Quest, 5, "I need to smash the weapon rack.", 1, 100, "Malachi is furious as Issik! Rather than kill him, Malachi has something different in mind. I am to smash the furniture in Issik's quarters and teach the Iskar a lesson! His quarters are up the stiars, just east of the docks.", 0)
  43. AddQuestStepCompleteAction(Quest, 3, "Step3_SmashDesk")
  44. AddQuestStepCompleteAction(Quest, 4, "Step4_SmashChair")
  45. AddQuestStepCompleteAction(Quest, 5, "Step5_SmashWeaponRack")
  46. end
  47. function Step3_SmashDesk(Quest, QuestGiver, Player)
  48. UpdateQuestStepDescription(Quest, 3, "I have smashed the desk.")
  49. if QuestIsComplete(Player, QUEST_3) then
  50. SmashingDone(Quest, QuestGiver, Player)
  51. end
  52. end
  53. function Step4_SmashChair(Quest, QuestGiver, Player)
  54. UpdateQuestStepDescription(Quest, 4, "I have smashed the chair.")
  55. if QuestIsComplete(Player, QUEST_3) then
  56. SmashingDone(Quest, QuestGiver, Player)
  57. end
  58. end
  59. function Step5_SmashWeaponRack(Quest, QuestGiver, Player)
  60. UpdateQuestStepDescription(Quest, 5, "I have smashed the weapon rack.")
  61. if QuestIsComplete(Player, QUEST_3) then
  62. SmashingDone(Quest, QuestGiver, Player)
  63. end
  64. end
  65. function SmashingDone(Quest, QuestGiver, Player)
  66. UpdateQuestTaskGroupDescription(Quest, 2, "I have smashed the furiture in Issik's office. I should go speak with Malachi.")
  67. AddQuestStepChat(Quest, 6, "I need to tell Malachi the deed has been done.", 1, "I need to speak with Malachi", 0, 1390004)
  68. AddQuestStepCompleteAction(Quest, 6, "QuestComplete")
  69. end
  70. function QuestComplete(Quest, QuestGiver, Player)
  71. UpdateQuestDescription(Quest, "Malachi may not be leading any raiding parties soon, but I'm sure we taught Issik a lesson!")
  72. --*Replace this line with the one above* UpdateQuestTaskGroupDescription(Quest, 1, "Malachi may not be leading any raiding parties soon, but I'm sure we taught Issik a lesson!")
  73. GiveQuestReward(Quest, Player)
  74. end
  75. function Reload(Quest, QuestGiver, Player)
  76. if Step == 1 then
  77. Step1_TalkedToIssik(Quest, QuestGiver, Player)
  78. elseif Step == 2 then
  79. Step2_TalkToChief(Quest, QuestGiver, Player)
  80. elseif Step == 3 then
  81. Step3_SmashDesk(Quest, QuestGiver, Player)
  82. elseif Step == 4 then
  83. Step4_SmashChair(Quest, QuestGiver, Player)
  84. elseif Step == 5 then
  85. Step5_SmashWeaponRack(Quest, QuestGiver, Player)
  86. end
  87. end