9
3

PaulaMarx133770926.lua 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/PaulaMarx133770926.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, 3.64, -6.45, 199.01, 2, 4)
  12. MovementLoopAddLocation(NPC, 6.62, -6.81, 202.53, 2, 0)
  13. MovementLoopAddLocation(NPC, 10.55, -6.89, 204.86, 2, 9, "InitialPause")
  14. MovementLoopAddLocation(NPC, 18.74, -6.86, 204.71, 2, 0)
  15. MovementLoopAddLocation(NPC, 22.69, -6.8, 201.84, 2, 9, "InitialPause")
  16. MovementLoopAddLocation(NPC, 18.09, -6.86, 200.92, 2, 9, "InitialPause")
  17. MovementLoopAddLocation(NPC, 11.89, -6.9, 199.77, 2, 9, "InitialPause")
  18. MovementLoopAddLocation(NPC, 5.76, -6.83, 199.71, 2, 9, "InitialPause")
  19. MovementLoopAddLocation(NPC, 18.49, -6.86, 195.18, 2, 9, "InitialPause")
  20. MovementLoopAddLocation(NPC, 27.11, -6.86, 191.62, 2, 0)
  21. MovementLoopAddLocation(NPC, 32.16, -6.28, 190.58, 2, 9, "InitialPause")
  22. MovementLoopAddLocation(NPC, 29.39, -6.84, 191.92, 2, 9, "InitialPause")
  23. MovementLoopAddLocation(NPC, 13.91, -6.9, 195.83, 2, 9, "InitialPause")
  24. MovementLoopAddLocation(NPC, 5.89, -6.88, 198.05, 2, 9, "InitialPause")
  25. end
  26. function respawn(NPC)
  27. spawn(NPC)
  28. end
  29. function hailed(NPC, Spawn)
  30. FaceTarget(NPC, Spawn)
  31. conversation = CreateConversation()
  32. --if (player has a collection then add a conversation option to hand in a collection
  33. --end
  34. math.randomseed(os.time())
  35. local choice = math.random (1, 3)
  36. str = tostring(choice)
  37. if choice == 1 then
  38. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1003.mp3", "", "hello", 0, 0, Spawn)
  39. AddConversationOption(conversation, "What Collections?","WhatCollections")
  40. elseif choice == 2 then
  41. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1003.mp3", "", "hello", 0, 0, Spawn)
  42. AddConversationOption(conversation, "What Collections?","WhatCollections")
  43. else
  44. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1003.mp3", "", "hello", 0, 0, Spawn)
  45. AddConversationOption(conversation, "What Collections?","WhatCollections")
  46. end
  47. if HasCollectionsToHandIn(Spawn) then
  48. AddConversationOption(conversation, "I have a collection for you", "TurnIn")
  49. end
  50. AddConversationOption(conversation, "Goodbye!")
  51. 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.")
  52. end
  53. function InitialPause(NPC)
  54. local GatherSpawn = GetSpawn(NPC, 2530009) -- Get Paula Marx
  55. math.randomseed(os.time())
  56. local pause = math.random (1, 4)
  57. if pause == 1 then
  58. AddTimer(NPC, 100, "stop_gathering")
  59. else
  60. AddTimer(NPC, 1000, "Gather")
  61. end
  62. end
  63. function Gather(NPC)
  64. local GatherSpawn = GetSpawn(NPC, 2530009) -- Get Paula Marx
  65. SpawnSet(NPC, "visual_state", "2809") -- Start gathering
  66. AddTimer(NPC, 5000, "Collect") -- for 5 seconds, then stop
  67. end
  68. function Collect(NPC)
  69. local GatherSpawn = GetSpawn(NPC, 2530009) -- Get Paula Marx
  70. SpawnSet(NPC, "visual_state", "2810") -- Start gathering
  71. AddTimer(NPC, 2000, "stop_gathering") -- for 5 seconds, then stop
  72. end
  73. function stop_gathering(NPC)
  74. local GatherSpawn = GetSpawn(NPC, 2530009) -- get Paula Marx
  75. SpawnSet(NPC, "visual_state", "0") -- Stop her from gathering
  76. end
  77. function WhatCollections(NPC, Spawn)
  78. FaceTarget(NPC, Spawn)
  79. conversation = CreateConversation()
  80. AddConversationOption(conversation, "I'll keep that in mind.")
  81. 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!")
  82. end
  83. function TurnIn(NPC, Spawn)
  84. FaceTarget(NPC, Spawn)
  85. HandInCollections(Spawn)
  86. conversation = CreateConversation()
  87. AddConversationOption(conversation, "Okay, bye!")
  88. StartConversation(conversation, NPC, Spawn, "This is a magnificent find! Here, take this for all your hard work.")
  89. end