the_gnollish_menace.lua 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. --[[
  2. Script Name : Quests/Caves/the_gnollish_menace.lua
  3. Script Purpose : Handles the quest, "The Gnollish Menace"
  4. Script Author : Scatman
  5. Script Date : 2009.10.18
  6. Zone : The Caves
  7. Quest Giver: Lieutenant Delsun
  8. Preceded by: None
  9. Followed by: None
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepKill(Quest, 1, "I need to kill thirty gnolls within the Caves.", 30, 100, "Lieutenant Delsun has tasked me with taking out a large portion of the gnolls and their allies here in the Caves.", 1220, 1970064, 1970046, 1970065, 1970073, 1970049, 1970047, 1970067, 1970070, 1970035, 1970036, 1970038, 1970027, 1970044, 1970028, 1970069, 1970063, 1970042, 1970061, 1970068, 1970060, 1970024, 1970041, 1970043, 1970072, 1970066, 1970045, 1970052, 1970055, 1970075, 1970014)
  13. AddQuestStepKill(Quest, 2, "I need to kill two Dustpaw armorers.", 2, 100, "Lieutenant Delsun has tasked me with taking out a large portion of the gnolls and their allies here in the Caves.", 1544, 1970067, 1970070, 1970035, 1970036)
  14. AddQuestStepKill(Quest, 3, "I need to kill five alabaster behemoths.", 5, 100, "Lieutenant Delsun has tasked me with taking out a large portion of the gnolls and their allies here in the Caves.", 193, 1970057, 1970051, 1970058, 1970026, 1970021)
  15. AddQuestStepKill(Quest, 4, "I need to kill five Rockpaw guards.", 5, 100, "Lieutenant Delsun has tasked me with taking out a large portion of the gnolls and their allies here in the Caves.", 611, 1970064, 1970046, 1970065, 1970073, 1970049, 1970047)
  16. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_KilledGnolls")
  17. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_KilledArmorers")
  18. AddQuestStepCompleteAction(Quest, 3, "Step3_Complete_KilledBehemoths")
  19. AddQuestStepCompleteAction(Quest, 4, "Step4_Complete_KilledGuards")
  20. end
  21. function Accepted(Quest, QuestGiver, Player)
  22. FaceTarget(QuestGiver, Player)
  23. conversation = CreateConversation()
  24. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/lieutenant_delsun/qey_adv03_caves/quests/delsun/delsun_002a.mp3", "", "", 1211118613, 1660657141, Player)
  25. AddConversationOption(conversation, "All right.")
  26. StartConversation(conversation,QuestGiver, Player, "Once you've done this return to me. The city of Qeynos will want to thank you properly.")
  27. end
  28. function Declined(Quest, QuestGiver, Player)
  29. end
  30. function Step1_Complete_KilledGnolls(Quest, QuestGiver, Player)
  31. UpdateQuestStepDescription(Quest, 1, "I have killed thirty gnolls.")
  32. if QuestIsComplete(Player, 229) then
  33. MultipleStepsComplete(Quest, QuestGiver, Player)
  34. end
  35. end
  36. function Step2_Complete_KilledArmorers(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 2, "I have killed two Dustpaw armorers.")
  38. if QuestIsComplete(Player, 229) then
  39. MultipleStepsComplete(Quest, QuestGiver, Player)
  40. end
  41. end
  42. function Step3_Complete_KilledBehemoths(Quest, QuestGiver, Player)
  43. UpdateQuestStepDescription(Quest, 3, "I have killed five alabaster behemoths.")
  44. if QuestIsComplete(Player, 229) then
  45. MultipleStepsComplete(Quest, QuestGiver, Player)
  46. end
  47. end
  48. function Step4_Complete_KilledGuards(Quest, QuestGiver, Player)
  49. UpdateQuestStepDescription(Quest, 4, "I have killed five Rockpaw guards.")
  50. if QuestIsComplete(Player, 229) then
  51. MultipleStepsComplete(Quest, QuestGiver, Player)
  52. end
  53. end
  54. function MultipleStepsComplete(Quest, QuestGiver, Player)
  55. UpdateQuestTaskGroupDescription(Quest, 1, "I have done what Lieutenant Delsun asked.")
  56. AddQuestStepChat(Quest, 5, "I need to return to Lieutenant Delsun.", 1, "Now that the task is complete I should return to Lieutenant Delsun.", 0, 1970011)
  57. AddQuestStepCompleteAction(Quest, 5, "QuestComplete")
  58. end
  59. function QuestComplete(Quest, QuestGiver, Player)
  60. UpdateQuestStepDescription(Quest, 5, "I have spoken with Lieutenant Delsun.")
  61. UpdateQuestTaskGroupDescription(Quest, 2, "I have spoken with Lieutenant Delsun.")
  62. UpdateQuestDescription(Quest, "I have done what Lieutenant Delsun asked of me.")
  63. GiveQuestReward(Quest, Player)
  64. end
  65. function Reload(Quest, QuestGiver, Player, Step)
  66. if Step == 1 then
  67. Step1_Complete_KilledGnolls(Quest, QuestGiver, Player)
  68. elseif Step == 2 then
  69. Step2_Complete_KilledArmorers(Quest, QuestGiver, Player)
  70. elseif Step == 3 then
  71. Step3_Complete_KilledBehemoths(Quest, QuestGiver, Player)
  72. elseif Step == 4 then
  73. Step4_Complete_KilledGuards(Quest, QuestGiver, Player)
  74. end
  75. end