ElisesDiary.lua 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. --[[
  2. Script Name : SpawnScripts/Nektropos1/ElisesDiary.lua
  3. Script Author : smash
  4. Script Date : 2016.02.06 04:02:12
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. end
  10. function casted_on(NPC, Spawn, Message)
  11. Dialog1(NPC, Spawn)
  12. end
  13. function EndConvo(NPC)
  14. SpawnSet(NPC, "heading", "80")
  15. end
  16. function TryPickupBook(NPC, Spawn)
  17. SendMessage(Spawn, "As you put the book in your pack, it flies from your hand and returns to rest on the dresser.")
  18. EndConvo(NPC)
  19. end
  20. function Dialog1(NPC, Spawn)
  21. FaceTarget(NPC, Spawn)
  22. local conversation = CreateConversation()
  23. AddConversationOption(conversation, "Read what you can from the book.", "Dialog1_1")
  24. AddConversationOption(conversation, "Put the book down.", "EndConvo")
  25. StartConversation(conversation, NPC, Spawn, "You pick the book up and begin to read it, most of the pages from the book have been torn out but a few are still legible.")
  26. end
  27. function Dialog1_1(NPC, Spawn)
  28. FaceTarget(NPC, Spawn)
  29. local conversation = CreateConversation()
  30. AddConversationOption(conversation, "Keep reading.", "Dialog2_1")
  31. AddConversationOption(conversation, "Stop reading and put the book down.", "EndConvo")
  32. AddConversationOption(conversation, "Stop reading, but take the book with you.", "TryPickupBook")
  33. StartConversation(conversation, NPC, Spawn, ".... was nearly seen last night.")
  34. end
  35. function Dialog2_1(NPC, Spawn)
  36. FaceTarget(NPC, Spawn)
  37. local conversation = CreateConversation()
  38. AddConversationOption(conversation, "Continue reading.", "Dialog3_1")
  39. AddConversationOption(conversation, "Stop reading and put the book down.", "EndConvo")
  40. AddConversationOption(conversation, "Stop reading, but take the book with you.", "TryPickupBook")
  41. StartConversation(conversation, NPC, Spawn, "..Sheila nearly killed me when she heard the guards talking about someone walking the ramparts last night.....")
  42. end
  43. function Dialog3_1(NPC, Spawn)
  44. FaceTarget(NPC, Spawn)
  45. local conversation = CreateConversation()
  46. AddConversationOption(conversation, "Put the book down.", "EndConvo")
  47. AddConversationOption(conversation, "Take the book with you.", "TryPickupBook")
  48. StartConversation(conversation, NPC, Spawn, "With my new cloak, it should be easier for me to sneak out at night...Nothing else in the book appears to be legible. ")
  49. SpawnElise(NPC)
  50. end
  51. function SpawnElise(NPC)
  52. if GetTempVariable(NPC, "elise_spawned") ~= "true" then
  53. SetTempVariable(NPC, "elise_spawned", "true")
  54. SpawnByLocationID(GetZone(NPC), 616586)
  55. end
  56. end