bookcasewiththesecretpuzzleboxvault.lua 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --[[
  2. Script Name : SpawnScripts/RuinsVarsoon/bookcasewiththesecretpuzzleboxvault.lua
  3. Script Author : Premierio015
  4. Script Date : 2023.05.05 07:05:25
  5. Script Purpose :
  6. :
  7. --]]
  8. local TheHiddenRiddle = 5531
  9. function spawn(NPC)
  10. end
  11. function casted_on(NPC, Spawn, SpellName)
  12. if SpellName == 'inspect' then
  13. local con = CreateConversation()
  14. AddConversationOption(con, "'Logbook - Varsoon Apprentices'")
  15. AddConversationOption(con, "'Conflict and Harmony'", "ConflictAndHarmony")
  16. AddConversationOption(con, "Leave the bookcase alone.")
  17. StartDialogConversation(con, 1, NPC, Spawn, "This bookcase is filled with numerous tomes. Much of it is covered in dust as if these vaults of knowledge have not been utilized in centuries.")
  18. end
  19. end
  20. function ConflictAndHarmony(NPC, Spawn)
  21. if GetQuestStep(Spawn, TheHiddenRiddle) == 1 then
  22. SetStepComplete(Spawn, TheHiddenRiddle, 1)
  23. end
  24. local con = CreateConversation()
  25. AddConversationOption(con, "Leave the safe alone.")
  26. if GetQuestStep(Spawn, TheHiddenRiddle) == 4 then
  27. AddConversationOption(con, "Use the skull and star keys.", "UseSkullAndStarKeys")
  28. end
  29. StartDialogConversation(con, 1, NPC, Spawn, "This book is extremely thick and must have more pages than a gnomish tinker's design document! You attempt to slide it out, but instead the binding slides down to expose the false book as a secret vault. There are two keyholes on the lock. Above each is a small image. One image is a skull and the other is a star.")
  30. end
  31. function UseSkullAndStarKeys(NPC, Spawn)
  32. SetStepComplete(Spawn, TheHiddenRiddle, 4)
  33. local con = CreateConversation()
  34. AddConversationOption(con, "Close the secret vault.")
  35. StartDialogConversation(con, 1, NPC, Spawn, "You unlock the vault and it opens with a rush of cold air. You must be crazy because you thought you heard indecipherable whispers coming from the dark recess. You reach in and discover the puzzle box called 'The Riddle of Saryrn.' You take it.")
  36. end
  37. function respawn(NPC)
  38. spawn(NPC)
  39. end