paying_homage_to_the_past.lua 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. --[[
  2. Script Name : Quests/ScaleYard/paying_homage_to_the_past.lua
  3. Script Purpose : Handles the quest, "Paying Homage to the Past"
  4. Script Author : Xanibunib
  5. Script Date : 2009.03.14
  6. Zone : The Scale Yard
  7. Quest Giver : Brood Matron Vrim Malthyk
  8. QuestID # : 342
  9. Preceded by : He said, he said
  10. Followed by : Kill or be Killed
  11. --]]
  12. -- Item ID's
  13. local IKSAR_SKULL = 8251
  14. function Init(Quest)
  15. AddQuestStepKill(Quest, 1, "I must smash the ancient Shissar vase. No remants of our former oppressors shouldbe allowed to exist.", 1, 100, "The ritual states that I must destroy an object from the ancient Shissar civilization. I should look around Vrim's quarters. She lives up the stairs, northeast of the docks.", 569, 1390059)
  16. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_Asp")
  17. end
  18. function Accepted(Quest, QuestGiver, Player)
  19. if QuestGiver ~= nil then
  20. if GetDistance (Player, QuestGiver) < 30 then
  21. FaceTarget (QuestGiver, Player)
  22. conversation = CreateConversation()
  23. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/brood_matron_vrim_malthyk/fprt_hood06/rcp_vrim028.mp3", "", "", 2174236902, 836114620, Spawn)
  24. AddConversationOption(conversation, "I take my leave.")
  25. StartConversation(conversation, NPC, Spawn, "Good. This ritual will begin to teach you about our people. Go now to my quarters, up the stairs to the East. I have prepared most everything you will need to complete the ritual.")
  26. end
  27. end
  28. end
  29. function Declined(Quest, QuestGiver, Player)
  30. end
  31. function Deleted(Quest, QuestGiver, Player)
  32. RemoveIksarSkull(Player)
  33. end
  34. function RemoveIksarSkull(Player)
  35. while HasItem(Player, IKSAR_SKULL, 1) do
  36. RemoveItem(Player, IKSAR_SKULL)
  37. end
  38. end
  39. function Step1_Complete_Asp(Quest, QuestGiver, Player)
  40. UpdateQuestTaskGroupDescription(Quest, 1, "I have destroyed the Shissar vase and killed an asp that was hiding within it...")
  41. AddQuestStepHarvest(Quest, 2, "I must collect five skulls of fallen Iksar.", 5, 100, "I Must gather several Iksar skulls scattered across the Scale Yard.", 91, IKSAR_SKULL)
  42. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_GotSkulls")
  43. end
  44. function Step2_Complete_GotSkulls(Quest, QuestGiver, Player)
  45. UpdateQuestTaskGroupDescription(Quest, 2, "I have collected the skulls.")
  46. AddQuestStep(Quest, 3, "I must place the skulls in the brazier.", 1, 100, "I must place the skulls in the brazier and set them ablaze. I saw a brazier in Vrim's quarters, up the stairs, northeast of the docks.", 0)
  47. AddQuestStepCompleteAction(Quest, 3, "Step3_Complete_SkullsInFire")
  48. end
  49. function Step3_Complete_SkullsInFire(Quest, QuestGiver, Player)
  50. UpdateQuestTaskGroupDescription(Quest, 3, "I have placed the skulls in the fire.")
  51. RemoveIksarSkull(Player)
  52. AddQuestStep(Quest, 4, "I need to take the shackles off the wall.", 1, 100, "It Appears that the Iksar were once enslave by the Overlord. However, after proving their mettle during the Battle of Defiance, the Iksar were allowed to live freely in the Scale Yard. I am to take the old shackles from the time of enslavement and cast them into the sea!", 0)
  53. AddQuestStepCompleteAction(Quest, 4, "Step4_Complete_HaveShackles")
  54. end
  55. function Step4_Complete_HaveShackles(Quest, QuestGiver, Player)
  56. UpdateQuestTaskGroupDescription(Quest, 4, "I've taken the shackles.")
  57. AddQuestStepLocation(Quest, 5, "I must cast the shackles into the sea.", 30, "I need to toss the shackles into the sea. I can do so at the docks.", 0, 0, -4.5, 105)
  58. AddQuestStepCompleteAction(Quest, 5, "Step5_Complete_TossShackles")
  59. end
  60. function Step5_Complete_TossShackles(Quest, QuestGiver, Player)
  61. UpdateQuestTaskGroupDescription(Quest, 5, "I have cast the shackles into the sea! Never again will the Iksar be imprisoned by a lesser race!")
  62. AddQuestStepChat(Quest, 6, "I have completed all the tasks mentioned in the tome. Though only a short lesson, I feel I know much more about the past glories and struggles my people have endured.", 1, "The ritual is complete. I must speak with Vrim", 0, 1260003)
  63. AddQuestStepCompleteAction(Quest, 6, "QuestComplete")
  64. end
  65. function QuestComplete(Quest, QuestGiver, Player)
  66. UpdateQuestTaskGroupDescription(Quest, 1, "I have completed the ritual described in the ancient tome.")
  67. GiveQuestReward(Quest, Player)
  68. end
  69. function Reload(Quest, QuestGiver, Player, Step)
  70. if Step == 1 then
  71. Step1_Complete_Asp(Quest, QuestGiver, Player)
  72. elseif Step == 2 then
  73. Step2_Complete_GotSkulls(Quest, QuestGiver, Player)
  74. elseif Step == 3 then
  75. Step3_Complete_SkullsInFire(Quest, QuestGiver, Player)
  76. elseif Step == 4 then
  77. Step4_Complete_HaveShackles(Quest, QuestGiver, Player)
  78. elseif Step == 5 then
  79. Step5_Complete_TossShackles(Quest, QuestGiver, Player)
  80. end
  81. end