9
3

SealingtheRift.lua 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. --[[
  2. Script Name : Quests/Darklight/SealingtheRift.lua
  3. Script Purpose : Handles the quest, "Sealing the Rift"
  4. Script Author : Cynnar
  5. Script Date : 7/5/2015
  6. Script Notes :
  7. Zone : Darklight Wood
  8. Quest Giver : Pellandra D'Xatyl
  9. Preceded by : A Solidified Front (ASolidifiedFront.lua)
  10. Followed by : Searching for Sigils (SearchingforSigils.lua)
  11. --]]
  12. function Init(Quest)
  13. AddQuestStep(Quest, 1, "Seal one of the newly opened Sablevein rifts", 1, 100, "Pellandra D'Xatyl has ordered me to find one of the newly opened rifts and seal it using any means necessary!", 11, 340760)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Step1Complete(Quest, QuestGiver, Player)
  17. UpdateQuestStepDescription(Quest, 1, "I found and sealed the newly opened rift")
  18. AddQuestStepChat(Quest, 2, "Return to Pellandra D'Xatyl", 1, "Pellandra D'Xatyl has ordered me to find one of the newly opened rifts and seal it using any means necessary!", 11, 340038)
  19. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  20. end
  21. function QuestComplete(Quest, QuestGiver, Player)
  22. UpdateQuestDescription(Quest, "I sealed one of the Sablevein rifts found south of Hate's Envy.")
  23. GiveQuestReward(Quest, Player)
  24. end
  25. function Reload(Quest, QuestGiver, Player, Step)
  26. if Step == 1 then
  27. Step1Complete(Quest, QuestGiver, Player)
  28. elseif Step == 2 then
  29. QuestComplete(Quest, QuestGiver, Player)
  30. end
  31. end
  32. function Accepted(Quest, QuestGiver, Player)
  33. FaceTarget(QuestGiver, Player)
  34. conversation = CreateConversation()
  35. PlayFlavor(QuestGiver, "pellandra_d_xatyl/darklight_wood/hates_envy/pellandra_revamp/pellandra005.mp3", "", "", 2498536389, 3964718754, Player)
  36. AddConversationOption(conversation, "I will return victorious!")
  37. StartConversation(conversation, QuestGiver, Player, "The citizens of Hate Envy depend upon you, " .. GetName(Player) .. ". Do not fail them.")
  38. end
  39. function Declined(Quest, QuestGiver, Player)
  40. -- Add dialog here for when the quest is declined
  41. end
  42. function Deleted(Quest, QuestGiver, Player)
  43. private_spawn_pebble = GetSpawn(Spawn, 340760)
  44. private_spawn_boulder = GetSpawn(Spawn, 340761)
  45. private_spawn_particle1 = GetSpawn(Spawn, 340747)
  46. private_spawn_particle2 = GetSpawn(Spawn, 341218)
  47. AddSpawnAccess(private_spawn_pebble, Spawn)
  48. RemoveSpawnAccess(private_spawn_boulder, Spawn)
  49. RemoveSpawnAccess(private_spawn_particle1, Spawn)
  50. RemoveSpawnAccess(private_spawn_particle2, Spawn)
  51. end