LaurelVivan.lua 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/LaurelVivan.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.22 01:06:41
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. waypoints(NPC)
  10. SetPlayerProximityFunction(NPC, 4, "InRange", "LeaveRange")
  11. end
  12. function InRange(NPC, Spawn)
  13. if math.random(1,100)<33 then
  14. Talk(NPC,Spawn)
  15. end
  16. end
  17. function hailed(NPC, Spawn)
  18. Talk(NPC,Spawn)
  19. end
  20. function Talk(NPC, Spawn)
  21. FaceTarget(NPC, Spawn)
  22. local choice = math.random(1,7)
  23. if choice == 1 then
  24. PlayFlavor(NPC, "voiceover/english/human_eco_evil_1/ft/human/human_eco_evil_1_hail_gf_216216bd.mp3", "The next time that guy leers at me, I'm gonna punch him in the throat.", "threaten", 3620511003, 1079805953, Spawn)
  25. elseif choice == 2 then
  26. PlayFlavor(NPC, "voiceover/english/human_eco_evil_1/ft/human/human_eco_evil_1_aoi_gf_603e4394.mp3", "Was it just me, or did I hear something jingling in your coin purse?", "listen", 2402158317, 1527601082, Spawn)
  27. elseif choice == 3 then
  28. PlayFlavor(NPC, "voiceover/english/human_eco_evil_1/ft/human/human_eco_evil_1_hail_gf_d2844e25.mp3", "You can avoid trouble around here as long as you don't make eye contact with anyone.", "lookaway", 2224595311, 1879007102, Spawn)
  29. elseif choice == 4 then
  30. PlayFlavor(NPC, "voiceover/english/human_eco_evil_1/ft/human/human_eco_evil_1_hail_gf_ed2258.mp3", "If you keep bothering me, I'll scream for help!!", "scream", 3517182304, 1940512214, Spawn)
  31. elseif choice == 5 then
  32. PlayFlavor(NPC, "voiceover/english/human_eco_evil_1/ft/human/human_eco_evil_1_hail_gf_e1648d49.mp3", "What made you think I wanted to talk to you?", "shrug", 739774986, 813162418, Spawn)
  33. elseif choice == 6 then
  34. PlayFlavor(NPC, "voiceover/english/human_eco_evil_1/ft/human/human_eco_evil_1_hail_gf_975b4774.mp3", "I wish those guards would just leave us alone.", "sulk", 453027671, 1457811660, Spawn, 0)
  35. elseif choice == 7 then
  36. PlayFlavor(NPC, "voiceover/english/human_eco_evil_1/ft/human/human_eco_evil_1_hail_gf_b0f7eb94.mp3", "Unless you know of a way to make some quick coin, we have no reason to talk.", "scold", 3652661564, 2025834564, Spawn)
  37. end
  38. end
  39. function respawn(NPC)
  40. spawn(NPC)
  41. end
  42. function waypoints(NPC)
  43. MovementLoopAddLocation(NPC, 629.99, -20.41, 286.08, 2, 2)
  44. MovementLoopAddLocation(NPC, 629.99, -20.41, 286.08, 2, 37,"Action")
  45. MovementLoopAddLocation(NPC, 629.99, -20.41, 286.08, 2, 37,"Action")
  46. MovementLoopAddLocation(NPC, 630.62, -20.39, 286.77, 2, 0)
  47. MovementLoopAddLocation(NPC, 630.1, -20.4, 283.87, 2, 0)
  48. MovementLoopAddLocation(NPC, 627.78, -20.38, 281.28, 2, 0)
  49. MovementLoopAddLocation(NPC, 624.56, -20.38, 281.53, 2, 0)
  50. MovementLoopAddLocation(NPC, 616.08, -20.32, 284.16, 2, 0)
  51. MovementLoopAddLocation(NPC, 607.81, -20.36, 287.05, 2, 0)
  52. MovementLoopAddLocation(NPC, 601.77, -20.31, 289.12, 2, 0)
  53. MovementLoopAddLocation(NPC, 601.77, -20.31, 289.12, 2, 1)
  54. MovementLoopAddLocation(NPC, 601.77, -20.31, 289.12, 2, 15,"Action")
  55. MovementLoopAddLocation(NPC, 600.68, -20.35, 289.94, 2, 0)
  56. MovementLoopAddLocation(NPC, 604.55, -20.34, 288.22, 2, 0)
  57. MovementLoopAddLocation(NPC, 620.13, -20.4, 282.82, 2, 0)
  58. MovementLoopAddLocation(NPC, 629.95, -20.39, 279.41, 2, 0)
  59. MovementLoopAddLocation(NPC, 642.03, -20.24, 274.87, 2, 1)
  60. MovementLoopAddLocation(NPC, 642.03, -20.24, 274.87, 2, 35,"Action")
  61. MovementLoopAddLocation(NPC, 642.03, -20.24, 274.87, 2, 35,"Action")
  62. MovementLoopAddLocation(NPC, 644.8, -20.31, 274.6, 2, 0)
  63. MovementLoopAddLocation(NPC, 633.45, -20.38, 278.19, 2, 0)
  64. MovementLoopAddLocation(NPC, 629.47, -20.33, 278.91, 2, 0)
  65. end
  66. function Action(NPC)
  67. local choice = MakeRandomInt(1, 4)
  68. if choice == 1 then
  69. PlayFlavor(NPC, "", "", "peer", 0, 0, Spawn)
  70. elseif choice == 2 then
  71. PlayFlavor(NPC, "", "", "listen", 0, 0, Spawn)
  72. elseif choice == 3 then
  73. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  74. elseif choice == 4 then
  75. PlayFlavor(NPC, "", "", "tapfoot", 0, 0, Spawn)
  76. end
  77. end