JuniaCalvina.lua 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. --[[
  2. Script Name : SpawnScripts/BeggarsCourt/JuniaCalvina.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.11.28 05:11:10
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  9. function spawn(NPC)
  10. waypoints(NPC)
  11. SetPlayerProximityFunction(NPC, 6, "InRange", "LeaveRange")
  12. end
  13. function hailed(NPC, Spawn)
  14. FaceTarget(NPC, Spawn)
  15. GenericRaceCheckHail(NPC, Spawn)
  16. end
  17. function InRange(NPC,Spawn)
  18. GenericRaceCheckCallout(NPC, Spawn)
  19. end
  20. function respawn(NPC)
  21. spawn(NPC)
  22. end
  23. function Drink(NPC)
  24. PlayFlavor(NPC,"","","drinking_idle",0,0)
  25. AddTimer(NPC,8000, "Drink2")
  26. end
  27. function Drink2(NPC)
  28. choice = math.random(1,4)
  29. if choice == 1 then
  30. PlayFlavor(NPC,"","","yawn",0,0)
  31. elseif choice == 2 then
  32. PlayFlavor(NPC,"","","drinking_idle",0,0)
  33. elseif choice == 3 then
  34. PlayFlavor(NPC,"","","sniff",0,0)
  35. else
  36. PlayFlavor(NPC,"","","happy",0,0)
  37. end
  38. AddTimer(NPC,6000, "Drink3")
  39. end
  40. function Drink3(NPC)
  41. PlayFlavor(NPC,"","","drinking_idle",0,0)
  42. end
  43. function waypoints(NPC)
  44. MovementLoopAddLocation(NPC, -13.6, 4, -43, 2, 0)
  45. MovementLoopAddLocation(NPC, -17.5, 4, -45.15, 2, 0)
  46. MovementLoopAddLocation(NPC, -20.06, 4, -42.64, 2, 0)
  47. MovementLoopAddLocation(NPC, -22.21, 4, -39.74, 2, 1)
  48. MovementLoopAddLocation(NPC, -22.21, 4, -39.74, 2, 10,"Action")
  49. MovementLoopAddLocation(NPC, -21.46, 4, -38.12, 2, 0)
  50. MovementLoopAddLocation(NPC, -18.87, 4, -35.27, 2, 0)
  51. MovementLoopAddLocation(NPC, -19.17, 3.75, -32.9, 2, 0)
  52. MovementLoopAddLocation(NPC, -22.19, 3, -31.23, 2, 0)
  53. MovementLoopAddLocation(NPC, -25.31, 2.5, -27.22, 2, 0)
  54. MovementLoopAddLocation(NPC, -23.61, 2.5, -20.45, 2, 0)
  55. MovementLoopAddLocation(NPC, -19.28, 2.5, -16.28, 2, 0)
  56. MovementLoopAddLocation(NPC, -13.81, 3, -13.86, 2, 0)
  57. MovementLoopAddLocation(NPC, -9.56, 3, -14.45, 2, 0)
  58. MovementLoopAddLocation(NPC, -7.88, 3, -15.75, 2, 0)
  59. MovementLoopAddLocation(NPC, -8.7, 3, -18.45, 2, 0)
  60. MovementLoopAddLocation(NPC, -12.29, 3, -17.9, 2, 1)
  61. MovementLoopAddLocation(NPC, -12.29, 3, -17.9, 2, 30,"Action")
  62. MovementLoopAddLocation(NPC, -12.29, 3, -17.9, 2, 0)
  63. MovementLoopAddLocation(NPC, -11.32, 3, -20.1, 2, 0)
  64. MovementLoopAddLocation(NPC, -16.54, 3, -21.25, 2, 0)
  65. MovementLoopAddLocation(NPC, -17.88, 3, -20.04, 2, 0)
  66. MovementLoopAddLocation(NPC, -17.96, 2.75, -15.76, 2, 0)
  67. MovementLoopAddLocation(NPC, -16.67, 2.5, -10.4, 2, 0)
  68. MovementLoopAddLocation(NPC, -15.58, 2, -4.67, 2, 0)
  69. MovementLoopAddLocation(NPC, -17.52, 2.04, 1.75, 2, 0)
  70. MovementLoopAddLocation(NPC, -19.4, 1.92, 5.66, 2, 0)
  71. MovementLoopAddLocation(NPC, -20.84, 1.88, 5.26, 2, 0)
  72. MovementLoopAddLocation(NPC, -23.52, 0.82, 3.94, 2, 0)
  73. MovementLoopAddLocation(NPC, -26.6, -0.75, 2.91, 2, 0)
  74. MovementLoopAddLocation(NPC, -27.16, -0.75, 4.86, 2, 0)
  75. MovementLoopAddLocation(NPC, -26.06, -0.86, 5.82, 2, 0)
  76. MovementLoopAddLocation(NPC, -24.88, -1.38, 6.04, 2, 0)
  77. MovementLoopAddLocation(NPC, -19.29, -4.51, 8.76, 2, 0)
  78. MovementLoopAddLocation(NPC, -18.05, -5.04, 9.61, 2, 0)
  79. MovementLoopAddLocation(NPC, -14, -5, 13.48, 2, 0)
  80. MovementLoopAddLocation(NPC, -12.85, -5.25, 15.89, 2, 0)
  81. MovementLoopAddLocation(NPC, -10.25, -5.5, 20.95, 2, 0)
  82. MovementLoopAddLocation(NPC, -9.5, -6, 25.22, 2, 0)
  83. MovementLoopAddLocation(NPC, -6.97, -6, 28.64, 2, 1)
  84. MovementLoopAddLocation(NPC, -6.97, -6, 28.64, 2, 30,"Action")
  85. MovementLoopAddLocation(NPC, -6.97, -6, 28.64, 2, 0)
  86. MovementLoopAddLocation(NPC, -10.74, -6, 27.61, 2, 0)
  87. MovementLoopAddLocation(NPC, -20.47, -6.8, 27.46, 2, 0)
  88. MovementLoopAddLocation(NPC, -26.93, -5.75, 24.54, 2, 0)
  89. MovementLoopAddLocation(NPC, -28.51, -5.5, 20.83, 2, 0)
  90. MovementLoopAddLocation(NPC, -28.02, -5.21, 18.75, 2, 0)
  91. MovementLoopAddLocation(NPC, -25.75, -5, 17.26, 2, 0)
  92. MovementLoopAddLocation(NPC, -22.16, -5, 15.75, 2, 0)
  93. MovementLoopAddLocation(NPC, -21.54, -5, 14.68, 2, 1)
  94. MovementLoopAddLocation(NPC, -21.54, -5, 14.68, 2, 10,"Action")
  95. MovementLoopAddLocation(NPC, -18.92, -5, 11.18, 2, 0)
  96. MovementLoopAddLocation(NPC, -19.54, -4.72, 10.22, 2, 0)
  97. MovementLoopAddLocation(NPC, -22.18, -3.33, 9.17, 2, 0)
  98. MovementLoopAddLocation(NPC, -27.88, -0.75, 6.76, 2, 0)
  99. MovementLoopAddLocation(NPC, -28.03, -0.75, 4.63, 2, 0)
  100. MovementLoopAddLocation(NPC, -27.35, -0.75, 2.02, 2, 0)
  101. MovementLoopAddLocation(NPC, -24.68, -0.11, 1.93, 2, 0)
  102. MovementLoopAddLocation(NPC, -20.03, 1.83, 3.85, 2, 0)
  103. MovementLoopAddLocation(NPC, -18.65, 2.04, 1.71, 2, 0)
  104. MovementLoopAddLocation(NPC, -16.5, 2, -3.57, 2, 0)
  105. MovementLoopAddLocation(NPC, -16.95, 2, -5.81, 2, 0)
  106. MovementLoopAddLocation(NPC, -20.7, 2.5, -13.77, 2, 0)
  107. MovementLoopAddLocation(NPC, -22.29, 2.5, -21.23, 2, 0)
  108. MovementLoopAddLocation(NPC, -24.58, 2.5, -25.95, 2, 0)
  109. MovementLoopAddLocation(NPC, -21.01, 3, -28.74, 2, 0)
  110. MovementLoopAddLocation(NPC, -18.07, 3.75, -32.73, 2, 0)
  111. MovementLoopAddLocation(NPC, -20.68, 4, -38.3, 2, 0)
  112. MovementLoopAddLocation(NPC, -18.64, 4, -43.86, 2, 0)
  113. MovementLoopAddLocation(NPC, -17.16, 4, -44.9, 2, 1)
  114. MovementLoopAddLocation(NPC, -17.16, 4, -44.9, 2, 10,"Action")
  115. MovementLoopAddLocation(NPC, -15.36, 4, -44.36, 2, 0)
  116. MovementLoopAddLocation(NPC, -13.5, 4, -44.04, 2, 0)
  117. MovementLoopAddLocation(NPC, -1.68, 4.75, -46.14, 2, 0)
  118. MovementLoopAddLocation(NPC, 0.42, 4.75, -48.58, 2, 1)
  119. MovementLoopAddLocation(NPC, 0.42, 4.75, -48.58, 2, 30,"Drink")
  120. MovementLoopAddLocation(NPC, 0.42, 4.75, -48.58, 2, 30,"Drink")
  121. MovementLoopAddLocation(NPC, 0.42, 4.75, -48.58, 2, 0)
  122. MovementLoopAddLocation(NPC, -0.69, 4.75, -46.76, 2, 0)
  123. MovementLoopAddLocation(NPC, -6.93, 4, -43.67, 2, 0)
  124. MovementLoopAddLocation(NPC, -10.95, 4, -41.51, 2, 0)
  125. end
  126. function Action(NPC)
  127. local choice = MakeRandomInt(1, 4)
  128. if choice == 1 then
  129. PlayFlavor(NPC, "", "", "mood_angry", 0, 0)
  130. elseif choice == 2 then
  131. PlayFlavor(NPC, "", "", "ponder", 0, 0)
  132. elseif choice == 3 then
  133. PlayFlavor(NPC, "", "", "sniff", 0, 0)
  134. elseif choice == 4 then
  135. PlayFlavor(NPC, "", "", "tapfoot", 0, 0)
  136. end
  137. end