PaulaMarx133770927.lua 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/PaulaMarx133770927.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, 24.61, -6.86, 189.72, 2, 4)
  12. MovementLoopAddLocation(NPC, 27.1, -6.86, 188.37, 2, 9, "InitialPause")
  13. MovementLoopAddLocation(NPC, 20.14, -6.86, 198.61, 2, 9, "InitialPause")
  14. MovementLoopAddLocation(NPC, 18.14, -6.86, 201.7, 2, 0)
  15. MovementLoopAddLocation(NPC, 15.83, -6.86, 202.99, 2, 9, "InitialPause")
  16. MovementLoopAddLocation(NPC, 10.2, -6.82, 206.04, 2, 9, "InitialPause")
  17. MovementLoopAddLocation(NPC, 7.12, -6.79, 207.43, 2, 9, "InitialPause")
  18. MovementLoopAddLocation(NPC, 6.85, -5.69, 190.36, 2, 9, "InitialPause")
  19. MovementLoopAddLocation(NPC, 5.65, -6.52, 195.48, 2, 9, "InitialPause")
  20. MovementLoopAddLocation(NPC, 3.52, -6.4, 202.95, 2, 9, "InitialPause")
  21. MovementLoopAddLocation(NPC, 2.49, -6.17, 206.08, 2, 9, "InitialPause")
  22. MovementLoopAddLocation(NPC, 0.51, -5.94, 200.45, 2, 0)
  23. MovementLoopAddLocation(NPC, 0.66, -5.75, 197.3, 2, 9, "InitialPause")
  24. MovementLoopAddLocation(NPC, 12.62, -6.9, 195.45, 2, 9, "InitialPause")
  25. MovementLoopAddLocation(NPC, 22.06, -6.86, 193.71, 2, 9, "InitialPause")
  26. MovementLoopAddLocation(NPC, 31.93, -6.2, 192.05, 2, 9, "InitialPause")
  27. MovementLoopAddLocation(NPC, 31.13, -6.59, 190.29, 2, 9, "InitialPause")
  28. MovementLoopAddLocation(NPC, 27.48, -6.77, 182.7, 2, 9, "InitialPause")
  29. MovementLoopAddLocation(NPC, 17.69, -6.9, 192.91, 2, 9, "InitialPause")
  30. MovementLoopAddLocation(NPC, 11.02, -6.9, 200, 2, 9, "InitialPause")
  31. MovementLoopAddLocation(NPC, 4.45, -6.5, 207.14, 2, 9, "InitialPause")
  32. MovementLoopAddLocation(NPC, 4.68, -6.61, 204.23, 2, 9, "InitialPause")
  33. MovementLoopAddLocation(NPC, 4.9, -6.63, 200.69, 2, 9, "InitialPause")
  34. MovementLoopAddLocation(NPC, 9.1, -6.9, 198.35, 2, 9, "InitialPause")
  35. MovementLoopAddLocation(NPC, 11.82, -6.9, 196.84, 2, 9, "InitialPause")
  36. end
  37. function respawn(NPC)
  38. spawn(NPC)
  39. end
  40. function hailed(NPC, Spawn)
  41. FaceTarget(NPC, Spawn)
  42. conversation = CreateConversation()
  43. --if (player has a collection then add a conversation option to hand in a collection
  44. --end
  45. math.randomseed(os.time())
  46. local choice = math.random (1, 3)
  47. str = tostring(choice)
  48. if choice == 1 then
  49. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1003.mp3", "", "hello", 0, 0, Spawn)
  50. AddConversationOption(conversation, "What Collections?","WhatCollections")
  51. elseif choice == 2 then
  52. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1003.mp3", "", "hello", 0, 0, Spawn)
  53. AddConversationOption(conversation, "What Collections?","WhatCollections")
  54. else
  55. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1003.mp3", "", "hello", 0, 0, Spawn)
  56. AddConversationOption(conversation, "What Collections?","WhatCollections")
  57. end
  58. if HasCollectionsToHandIn(Spawn) then
  59. AddConversationOption(conversation, "I have a collection for you", "TurnIn")
  60. end
  61. AddConversationOption(conversation, "Goodbye!")
  62. 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.")
  63. end
  64. function InitialPause(NPC)
  65. local GatherSpawn = GetSpawn(NPC, 2530009) -- Get Paula Marx
  66. math.randomseed(os.time())
  67. local pause = math.random (1, 4)
  68. if pause == 1 then
  69. AddTimer(NPC, 100, "stop_gathering")
  70. else
  71. AddTimer(NPC, 1000, "Gather")
  72. end
  73. end
  74. function Gather(NPC)
  75. local GatherSpawn = GetSpawn(NPC, 2530009) -- Get Paula Marx
  76. SpawnSet(NPC, "visual_state", "2809") -- Start gathering
  77. AddTimer(NPC, 5000, "Collect") -- for 5 seconds, then stop
  78. end
  79. function Collect(NPC)
  80. local GatherSpawn = GetSpawn(NPC, 2530009) -- Get Paula Marx
  81. SpawnSet(NPC, "visual_state", "2810") -- Start gathering
  82. AddTimer(NPC, 2000, "stop_gathering") -- for 5 seconds, then stop
  83. end
  84. function stop_gathering(NPC)
  85. local GatherSpawn = GetSpawn(NPC, 2530009) -- get Paula Marx
  86. SpawnSet(NPC, "visual_state", "0") -- Stop her from gathering
  87. end
  88. function WhatCollections(NPC, Spawn)
  89. FaceTarget(NPC, Spawn)
  90. conversation = CreateConversation()
  91. AddConversationOption(conversation, "I'll keep that in mind.")
  92. 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!")
  93. end
  94. function TurnIn(NPC, Spawn)
  95. FaceTarget(NPC, Spawn)
  96. HandInCollections(Spawn)
  97. conversation = CreateConversation()
  98. AddConversationOption(conversation, "Okay, bye!")
  99. StartConversation(conversation, NPC, Spawn, "This is a magnificent find! Here, take this for all your hard work.")
  100. end