widget_book_fgquest.lua 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. --[[
  2. Script Name : SpawnScripts/Freeport/widget_book_fgquest.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.07.12 09:07:28
  5. Script Purpose : books on the table in Academy needed for "Searching the Depths of Fallen Gate" quest
  6. :
  7. --]]
  8. local SearchingTheDepthsOfFallenGate = 5307
  9. function spawn(NPC)
  10. end
  11. function casted_on(NPC, Spawn, SpellName)
  12. if SpellName == "Thexian Incantations: circa Neriak's Fall" then
  13. conversation = CreateConversation()
  14. AddConversationOption(conversation, "[flip ahead to further notes]", "book2")
  15. AddConversationOption(conversation, "[put the book back on the shelf]")
  16. StartDialogConversation(conversation, 1, NPC, Spawn, "Section 1, paragraph 4 - The time has come for us to unseal the barrier! My research shows that there is a book hidden deep in what we now call Fallen Gate that details the spell required to unseal the barrier. - Tundis N'oxyle, Thexian archaeologist.")
  17. end
  18. end
  19. function book2(NPC, Spawn)
  20. conversation = CreateConversation()
  21. AddConversationOption(conversation, "[try the next book]", "book3")
  22. AddConversationOption(conversation, "[put the book away]")
  23. StartDialogConversation(conversation, 1, NPC, Spawn, "Section 2, paragraph 6 - Our research will be in vain, should we not find the component for the spell N'oxyle has been searching for. I have been poring over some older references, and it seems that the essences of dragoons has been used somehow to seal the barrier. Perhaps the same could be used to unlock it. - Jhos T'sein, Thexian scholar.")
  24. end
  25. function book3(NPC, Spawn)
  26. if GetQuestStep(Spawn, SearchingTheDepthsOfFallenGate) == 1 then
  27. SetStepComplete(Spawn, SearchingTheDepthsOfFallenGate, 1)
  28. end
  29. conversation = CreateConversation()
  30. AddConversationOption(conversation, "[close the book]")
  31. StartDialogConversation(conversation, 1, NPC, Spawn, "Section 3, paragraph 5 - The fools. They don't know what they have. I shall raise her to her former glory, and together, my undead queen and I shall descend upon the false queen of Neriak and rule forever! I'll hide the bangle in a chest in the Bull Pit! No one will ever look there! - anonymous Teir'Dal")
  32. end
  33. function respawn(NPC)
  34. spawn(NPC)
  35. end