PaulaMarx133770924.lua 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/PaulaMarx133770924.lua
  3. Script Author : Zcoretri
  4. Script Date : 2015.07.30
  5. Script Purpose : Paula Marx dialog
  6. Modified Date : 2017.04.13, 2020.04.03, 2020.09.03
  7. Modified by : EmemJr,premierio015, Rylec
  8. Notes : Added dialog and code for Turning in collections, Added animation and VoiceOvers.
  9. --]]
  10. function spawn(NPC)
  11. MovementLoopAddLocation(NPC, 13.42, -6.9, 206.23, 2, 9)
  12. MovementLoopAddLocation(NPC, 20.33, -6.85, 205.8, 2, 0)
  13. MovementLoopAddLocation(NPC, 23.37, -6.78, 201.81, 2, 9, "InitialPause")
  14. MovementLoopAddLocation(NPC, 25.52, -6.67, 199.61, 2, 0)
  15. MovementLoopAddLocation(NPC, 28.14, -6.57, 198.44, 2, 0)
  16. MovementLoopAddLocation(NPC, 29.83, -6.62, 193.47, 2, 9, "InitialPause")
  17. MovementLoopAddLocation(NPC, 26.07, -6.86, 195.78, 2, 0)
  18. MovementLoopAddLocation(NPC, 21.63, -6.86, 200.14, 2, 9, "InitialPause")
  19. MovementLoopAddLocation(NPC, 13.9, -6.83, 209.56, 2, 9, "InitialPause")
  20. MovementLoopAddLocation(NPC, 12.34, -6.82, 208.34, 2, 9, "InitialPause")
  21. MovementLoopAddLocation(NPC, 6.84, -6.79, 206.99, 2, 9, "InitialPause")
  22. MovementLoopAddLocation(NPC, 6.91, -6.87, 197.24, 2, 9, "InitialPause")
  23. MovementLoopAddLocation(NPC, 10.76, -6.9, 196.81, 2, 9, "InitialPause")
  24. MovementLoopAddLocation(NPC, 20.31, -6.86, 196.93, 2, 9, "InitialPause")
  25. MovementLoopAddLocation(NPC, 23.05, -6.77, 204.59, 2, 9, "InitialPause")
  26. MovementLoopAddLocation(NPC, 26.83, -6.45, 201.6, 2, 0)
  27. MovementLoopAddLocation(NPC, 28.33, -6.51, 199.07, 2, 9, "InitialPause")
  28. MovementLoopAddLocation(NPC, 32.06, -6.18, 191.89, 2, 9, "InitialPause")
  29. MovementLoopAddLocation(NPC, 29.2, -6.86, 191.97, 2, 9, "InitialPause")
  30. MovementLoopAddLocation(NPC, 1.62, -6.07, 200.9, 2, 9, "InitialPause")
  31. MovementLoopAddLocation(NPC, -1.07, -5.74, 201.79, 2, 9, "InitialPause")
  32. MovementLoopAddLocation(NPC, 3.69, -6.4, 206.07, 2, 0)
  33. MovementLoopAddLocation(NPC, 7.61, -6.8, 206.52, 2, 9, "InitialPause")
  34. end
  35. function respawn(NPC)
  36. spawn(NPC)
  37. end
  38. function hailed(NPC, Spawn)
  39. FaceTarget(NPC, Spawn)
  40. conversation = CreateConversation()
  41. --if (player has a collection then add a conversation option to hand in a collection
  42. --end
  43. math.randomseed(os.time())
  44. local choice = math.random (1, 3)
  45. str = tostring(choice)
  46. if choice == 1 then
  47. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1003.mp3", "", "hello", 0, 0, Spawn)
  48. AddConversationOption(conversation, "What Collections?","WhatCollections")
  49. elseif choice == 2 then
  50. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1003.mp3", "", "hello", 0, 0, Spawn)
  51. AddConversationOption(conversation, "What Collections?","WhatCollections")
  52. else
  53. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1003.mp3", "", "hello", 0, 0, Spawn)
  54. AddConversationOption(conversation, "What Collections?","WhatCollections")
  55. end
  56. if HasCollectionsToHandIn(Spawn) then
  57. AddConversationOption(conversation, "I have a collection for you", "TurnIn")
  58. end
  59. AddConversationOption(conversation, "Goodbye!")
  60. StartConversation(conversation, NPC, Spawn, "Hello, traveler! How I envy you. What I wouldn't give to journey the world as I did in my youth. Alas, my days of adventuring are long past, but at least I can occupy myself with my various trinkets and collections that I picked up in my travels.")
  61. end
  62. function InitialPause(NPC)
  63. local GatherSpawn = GetSpawn(NPC, 2530009) -- Get Paula Marx
  64. math.randomseed(os.time())
  65. local pause = math.random (1, 4)
  66. if pause == 1 then
  67. AddTimer(NPC, 100, "stop_gathering")
  68. else
  69. AddTimer(NPC, 1000, "Gather")
  70. end
  71. end
  72. function Gather(NPC)
  73. local GatherSpawn = GetSpawn(NPC, 2530009) -- Get Paula Marx
  74. SpawnSet(NPC, "visual_state", "2809") -- Start gathering
  75. AddTimer(NPC, 5000, "Collect") -- for 5 seconds, then stop
  76. end
  77. function Collect(NPC)
  78. local GatherSpawn = GetSpawn(NPC, 2530009) -- Get Paula Marx
  79. SpawnSet(NPC, "visual_state", "2810") -- Start gathering
  80. AddTimer(NPC, 2000, "stop_gathering") -- for 5 seconds, then stop
  81. end
  82. function stop_gathering(NPC)
  83. local GatherSpawn = GetSpawn(NPC, 2530009) -- get Paula Marx
  84. SpawnSet(NPC, "visual_state", "0") -- Stop her from gathering
  85. end
  86. function WhatCollections(NPC, Spawn)
  87. FaceTarget(NPC, Spawn)
  88. conversation = CreateConversation()
  89. AddConversationOption(conversation, "I'll keep that in mind.")
  90. StartConversation(conversation, NPC, Spawn, "Why, any sort of collection. There's so much out there to find! Just open your eyes and peek under the rocks. If you find anything interesting, let me have a look. Collecting is the only way I seem to relive my youth!")
  91. end
  92. function TurnIn(NPC, Spawn)
  93. FaceTarget(NPC, Spawn)
  94. HandInCollections(Spawn)
  95. conversation = CreateConversation()
  96. AddConversationOption(conversation, "Okay, bye!")
  97. StartConversation(conversation, NPC, Spawn, "This is a magnificent find! Here, take this for all your hard work.")
  98. end