9
3

PaulaMarx.lua 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/PaulaMarx.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
  7. Modified by : EmemJr,premierio015
  8. Notes : Added dialog and code for Turning in collections, Added animation and VoiceOvers.
  9. --]]
  10. function spawn(NPC)
  11. MovementLoopAddLocation(NPC, 5.65, -6.50, 208.26, 2, 10, "Gather")
  12. MovementLoopAddLocation(NPC, 0.71, -5.83, 198.18, 2, 10, "Gather")
  13. MovementLoopAddLocation(NPC, 10.66, -6.90, 200.55, 2, 10, "Gather")
  14. MovementLoopAddLocation(NPC, 18.65, -6.87, 194.36, 2, 10, "Gather")
  15. MovementLoopAddLocation(NPC, 26.80, -6.86, 187.05, 2, 10, "Gather")
  16. MovementLoopAddLocation(NPC, 31.08, -6.24, 197.45, 2, 10, "Gather")
  17. MovementLoopAddLocation(NPC, 9.11, -6.80, 206.29, 2, 10, "Gather")
  18. -- return to spawn point and hang out.
  19. MovementLoopAddLocation(NPC, -6.18, -4.96, 218.46, 2, 0)
  20. MovementLoopAddLocation(NPC, -5.91, -4.96, 218.24, 2, 30)
  21. end
  22. function respawn(NPC)
  23. spawn(NPC)
  24. end
  25. function hailed(NPC, Spawn)
  26. FaceTarget(NPC, Spawn)
  27. conversation = CreateConversation()
  28. --if (player has a collection then add a convesation option to hand in a collection
  29. --end
  30. math.randomseed(os.time())
  31. choice = math.random (1, 3)
  32. str = tostring(choice)
  33. if choice == 1 then
  34. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1003.mp3", "", "hello", 0, 0, Spawn)
  35. AddConversationOption(conversation, "What Collections?","WhatCollections")
  36. elseif choice == 2 then
  37. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1003.mp3", "", "hello", 0, 0, Spawn)
  38. AddConversationOption(conversation, "What Collections?","WhatCollections")
  39. else
  40. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1003.mp3", "", "hello", 0, 0, Spawn)
  41. AddConversationOption(conversation, "What Collections?","WhatCollections")
  42. end
  43. if HasCollectionsToHandIn(Spawn) then
  44. AddConversationOption(conversation, "I have a collection for you", "TurnIn")
  45. end
  46. AddConversationOption(conversation, "Goodbye!")
  47. 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.")
  48. end
  49. function Gather(NPC)
  50. GatherSpawn = GetSpawn(NPC, 2530009) -- Get Paula Marx
  51. SpawnSet(NPC, "visual_state", "2809") -- Start gathering
  52. AddTimer(NPC, 5000, "stop_gathering") -- for 5 seconds, then stop
  53. end
  54. function stop_gathering(NPC)
  55. GatherSpawn = GetSpawn(NPC, 2530009) -- get Paula Marx
  56. SpawnSet(NPC, "visual_state", "0") -- Stop her from gathering
  57. end
  58. function WhatCollections(NPC, Spawn)
  59. FaceTarget(NPC, Spawn)
  60. conversation = CreateConversation()
  61. AddConversationOption(conversation, "I'll keep that in mind.")
  62. 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!")
  63. end
  64. function TurnIn(NPC, Spawn)
  65. FaceTarget(NPC, Spawn)
  66. HandInCollections(Spawn)
  67. conversation = CreateConversation()
  68. AddConversationOption(conversation, "Okay,bye!")
  69. StartConversation(conversation, NPC, Spawn, "This is a magnificent find! Here, take this for all your hard work.")
  70. end