PaulaMarx133770929.lua 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/PaulaMarx133770929.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, 19.19, -6.86, 199.88, 2, 4)
  12. MovementLoopAddLocation(NPC, 18.8, -6.86, 202.68, 2, 9, "InitialPause")
  13. MovementLoopAddLocation(NPC, 18.76, -6.89, 209.54, 2, 9, "InitialPause")
  14. MovementLoopAddLocation(NPC, 2.85, -6.24, 206.6, 2, 9, "InitialPause")
  15. MovementLoopAddLocation(NPC, 0.78, -5.82, 206.45, 2, 9, "InitialPause")
  16. MovementLoopAddLocation(NPC, -3.2, -5.01, 205.94, 2, 9, "InitialPause")
  17. MovementLoopAddLocation(NPC, -4.35, -4.97, 210.97, 2, 9, "InitialPause")
  18. MovementLoopAddLocation(NPC, 9.88, -6.81, 209.45, 2, 9, "InitialPause")
  19. MovementLoopAddLocation(NPC, 6.81, -6.79, 206.88, 2, 9, "InitialPause")
  20. MovementLoopAddLocation(NPC, 4.84, -6.63, 200.38, 2, 9, "InitialPause")
  21. MovementLoopAddLocation(NPC, 16.16, -6.85, 208.5, 2, 9, "InitialPause")
  22. MovementLoopAddLocation(NPC, 20.72, -6.87, 211.66, 2, 9, "InitialPause")
  23. MovementLoopAddLocation(NPC, 21.83, -6.82, 205.97, 2, 0)
  24. MovementLoopAddLocation(NPC, 23.65, -6.78, 201.55, 2, 9, "InitialPause")
  25. MovementLoopAddLocation(NPC, 20.47, -6.88, 186.76, 2, 9, "InitialPause")
  26. MovementLoopAddLocation(NPC, 19.86, -6.86, 193.32, 2, 9, "InitialPause")
  27. MovementLoopAddLocation(NPC, 18.24, -6.93, 210.12, 2, 9, "InitialPause")
  28. MovementLoopAddLocation(NPC, 14.96, -6.86, 208.99, 2, 9, "InitialPause")
  29. MovementLoopAddLocation(NPC, 10.51, -6.81, 207.52, 2, 0)
  30. MovementLoopAddLocation(NPC, 2.89, -6.24, 206.63, 2, 9, "InitialPause")
  31. MovementLoopAddLocation(NPC, -3.57, -4.97, 205.77, 2, 9, "InitialPause")
  32. MovementLoopAddLocation(NPC, -4.16, -4.97, 211.55, 2, 9, "InitialPause")
  33. MovementLoopAddLocation(NPC, 6.37, -6.37, 210, 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