9
3

confrontation.lua 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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, 2340009)
  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. GiveQuestReward(Quest, Player)
  59. end
  60. function Reload(Quest, QuestGiver, Player, Step)
  61. if Step == 1 then
  62. step1_complete_talkedToCayan(Quest, QuestGiver, Player)
  63. elseif Step == 2 then
  64. step2_complete_placedDisplay(Quest, QuestGiver, Player)
  65. end
  66. end