9
3

AlexaLockets.lua 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. --[[
  2. Script Name : SpawnScripts/Nektropos1/AlexaLockets.lua
  3. Script Purpose : Alexa after defeating the sisters for The Everling Lockets quest
  4. Script Author : smash
  5. Script Date : 9/8/2016
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/PlayerHistory"
  9. function spawn(NPC)
  10. end
  11. function hailed(NPC, Spawn)
  12. if GetTempVariable(NPC, "talking") ~= "true" then
  13. StartDialogLoop(NPC, Spawn)
  14. local player_group = GetGroup(Spawn)
  15. if player_group ~= nil then
  16. for k,v in ipairs(player_group) do
  17. SetPlayerHistory(v, HISTORY.NEK_CASTLE_LIBRARY_ACCESS, 1)
  18. end
  19. else
  20. SetPlayerHistory(Spawn, HISTORY.NEK_CASTLE_LIBRARY_ACCESS, 1)
  21. end
  22. end
  23. end
  24. function StartDialogLoop(NPC, Spawn)
  25. SetTempVariable(NPC, "talking", "true")
  26. Say(NPC, "Wonderful you have gathered all the lockets.")
  27. AddTimer(NPC, 3500, "Dialog2")
  28. end
  29. function Dialog2(NPC)
  30. Say(NPC, "Unfortunately I have learned that Everling has added another protection to his door.")
  31. AddTimer(NPC, 3500, "Dialog3")
  32. end
  33. function Dialog3(NPC)
  34. Say(NPC, "He also gave his son Ollix a locket and has created a slot for that locket as well.")
  35. AddTimer(NPC, 3500, "Dialog4")
  36. end
  37. function Dialog4(NPC)
  38. Say(NPC, "Thankfully I know the resting place of the locket, it was buried with Ollix when he died.")
  39. AddTimer(NPC, 3500, "Dialog5")
  40. end
  41. function Dialog5(NPC)
  42. Say(NPC, "I have managed to unlock all of the doors within the castle area so you can move freely about.")
  43. AddTimer(NPC, 3500, "Dialog6")
  44. end
  45. function Dialog6(NPC)
  46. Say(NPC, "You will need to gain access to Lord Everlings bedchamber,")
  47. AddTimer(NPC, 3500, "Dialog7")
  48. end
  49. function Dialog7(NPC)
  50. Say(NPC, "there is a passageway behind the bookshelves within his bedchamber that leads to the castles lower levels.")
  51. AddTimer(NPC, 5000, "Despawn")
  52. end