AlexaBasement.lua 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. --[[
  2. Script Name : SpawnScripts/Nektropos1/AlexaBasement.lua
  3. Script Purpose : Alexa after reaching the basement
  4. Script Author : smash
  5. Script Date : 9/12/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_BASEMENT_STUDY_ACCESS, 1)
  18. end
  19. else
  20. SetPlayerHistory(Spawn, HISTORY.NEK_CASTLE_BASEMENT_STUDY_ACCESS, 1)
  21. end
  22. end
  23. end
  24. function StartDialogLoop(NPC, Spawn)
  25. SetTempVariable(NPC, "talking", "true")
  26. Say(NPC, "You are almost there.")
  27. AddTimer(NPC, 3500, "Dialog2")
  28. end
  29. function Dialog2(NPC)
  30. Say(NPC, "This basement is rife with hidden doors and secret passageways.")
  31. AddTimer(NPC, 3500, "Dialog3")
  32. end
  33. function Dialog3(NPC)
  34. Say(NPC, "Lord Everling has a research chamber in the basement,")
  35. AddTimer(NPC, 3500, "Dialog4")
  36. end
  37. function Dialog4(NPC)
  38. Say(NPC, "head back down this hallway and examine the torch sconces along the walls.")
  39. AddTimer(NPC, 3500, "Dialog5")
  40. end
  41. function Dialog5(NPC)
  42. Say(NPC, "One of the sconces will move opening up the entrance to the research laboratory.")
  43. AddTimer(NPC, 3500, "Dialog6")
  44. end
  45. function Dialog6(NPC)
  46. Say(NPC, "Inside the chamber you should find a scroll that will reveal the location of the rest of the secret doors.")
  47. AddTimer(NPC, 3000, "SpawnAlexaOllix")
  48. end
  49. function SpawnAlexaOllix(NPC)
  50. SpawnByLocationID(GetZone(NPC), 1584996)
  51. Despawn(NPC)
  52. end