confrontation.lua 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. --[[
  2. Script Name : Quests/StarcrestCommune/confrontation.lua
  3. Script Purpose : Handles the quest, "Confrontation"
  4. Script Author : Scatman
  5. Script Date : 2008.09.21
  6. Zone : Starcrest Commune
  7. Quest Giver: Maareona Ludimintium
  8. Preceded by: Hidden Treasures (hidden_treasures.lua)
  9. Followed by:
  10. --]]
  11. -- Items ID's
  12. local FOLDING_STAND = 7379
  13. local NULLIFICATION_STONE = 10087
  14. local SOUL_SPIKE = 13134
  15. function Init(Quest)
  16. AddQuestStepChat(Quest, 1, "I need to retrieve materials for a public demonstration from Cayan Sable. I can get to Cayan by climbing the bench behind the northwest corner of the armor shop.", 1, "I will need to confront the intended recipient of the package we intercepted. Cayan may know where to find him.", 0, 2340017)
  17. AddQuestStepCompleteAction(Quest, 1, "step1_complete_talkedToCayan")
  18. end
  19. function Accepted(Quest, QuestGiver, Player)
  20. if QuestGiver ~= nil then
  21. if GetDistance(Player, QuestGiver) < 30 then
  22. FaceTarget(QuestGiver, Player)
  23. conversation = CreateConversation()
  24. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/maareona_ludimintium/qey_village02/quests/maareona/maareona029.mp3", "", "", 2162492923, 520954117, Player)
  25. AddConversationOption(conversation, "How do I destroy the soul spike?", "TapIt")
  26. StartConversation(conversation, QuestGiver, Player, "He might, but do not worry. He will not harm you, not here. At most he will attempt to pull you to Freeport with him. I do not think I need to lecture you on that.")
  27. end
  28. end
  29. end
  30. function Declined(Quest, QuestGiver, Player)
  31. end
  32. function Deleted(Quest, QuestGiver, Player)
  33. while HasItem(Player, FOLDING_STAND, 1) do
  34. RemoveItem(Player, FOLDING_STAND)
  35. end
  36. while HasItem(Player, NULLIFICATION_STONE, 1) do
  37. RemoveItem(Player, NULLIFICATION_STONE)
  38. end
  39. while HasItem(Player, SOUL_SPIKE, 1) do
  40. RemoveItem(Player, SOUL_SPIKE)
  41. end
  42. end
  43. function step1_complete_talkedToCayan(Quest, QuestGiver, Player)
  44. UpdateQuestStepDescription(Quest, 1, "I have gotten the needed materials.")
  45. -- folding stand
  46. SummonItem(Spawn, FOLDING_STAND)
  47. AddQuestStep(Quest, 2, "I need to put a display in the central area of the Starcrest Commune, near the fountain of Deep Reflection.", 1, 100, "I will need to confront the intended recipient of the package we intercepted. Cayan may know where to find him.")
  48. AddQuestStepCompleteAction(Quest, 2, "step2_complete_placedDisplay")
  49. end
  50. function step2_complete_placedDisplay(Quest, QuestGiver, Player)
  51. UpdateQuestStepDescription(Quest, 2, "I put on my demonstration. Velderoth Malraen attempted to interrupt me.")
  52. AddQuestStepChat(Quest, 3, "I need to return to Maareona and tell her what happened.", 1, "I will need to confront the intended recipient of the package we intercepted. Cayan may know where to find him.", 0, 2340006)
  53. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  54. end
  55. function QuestComplete(Quest, QuestGiver, Player)
  56. UpdateQuestDescription(Quest, 3, "I have spoken with Maareona.")
  57. UpdateQuestTaskGroupDescription(Quest, 1, "Velderoth Malraen escaped after I confronted him.")
  58. UpdateQuestDescription(Quest, "Velderoth Malraen confronted me when I destroyed the Soul Spike. He did not retrieve the Soul Spike but he did escape.")
  59. GiveQuestReward(Quest, Player)
  60. end
  61. function Reload(Quest, QuestGiver, Player, Step)
  62. if Step == 1 then
  63. step1_complete_talkedToCayan(Quest, QuestGiver, Player)
  64. elseif Step == 2 then
  65. step2_complete_placedDisplay(Quest, QuestGiver, Player)
  66. end
  67. end