NorvilleBurninghaunch.lua 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. --[[
  2. Script Name : SpawnScripts/Graystone/NorvilleBurninghaunch.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.07.07 07:07:55
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/UnknownLanguage.lua")
  9. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  10. function spawn(NPC)
  11. waypoints(NPC)
  12. SetPlayerProximityFunction(NPC, 5, "InRange", "LeaveRange")
  13. end
  14. function hailed(NPC, Spawn)
  15. FaceTarget(NPC, Spawn)
  16. if not HasLanguage(Spawn,1)then
  17. FaceTarget(NPC, Spawn)
  18. Garbled(NPC,Spawn)
  19. else
  20. if GetFactionAmount(Spawn,11)<0 then
  21. FactionCheckHail(NPC,Spawn,faction)
  22. else
  23. FaceTarget(NPC, Spawn)
  24. local choice = math.random(1, 6)
  25. if choice == 1 then
  26. PlayFlavor(NPC, "", "Well its not easy being the best looking guy in town, but I think I pull it off well.", "flirt", 1689589577, 4560189, Spawn)
  27. elseif choice == 2 then
  28. PlayFlavor(NPC, "", "I'm feeling stronger than usual today.", "charge", 1689589577, 4560189, Spawn)
  29. elseif choice == 3 then
  30. PlayFlavor(NPC, "", "Some of my friends tell me I'm weak. I think its true, I've only been able to lift two goblins and an orc lately.", "pout", 1689589577, 4560189, Spawn)
  31. elseif choice == 4 then
  32. PlayFlavor(NPC, "", "Funny, the wound didn't smell like that yesterday.", "stinky", 1689589577, 4560189, Spawn)
  33. elseif choice == 5 then
  34. PlayFlavor(NPC, "", "Strength isn't just the size of your muscles... It's, well... Yeah it is.", "confused", 1689589577, 4560189, Spawn)
  35. elseif choice == 6 then
  36. PlayFlavor(NPC, "", "Darn. I chugged that barrel much slower than I chugged the last three.", "gutcramp", 1689589577, 4560189, Spawn)
  37. end
  38. end
  39. end
  40. end
  41. function InRange(NPC, Spawn)
  42. if not HasLanguage(Spawn,1)then
  43. if math.random(1, 100) <= 25 then
  44. Garbled(NPC,Spawn)
  45. end
  46. else
  47. if GetFactionAmount(Spawn,11)<0 then
  48. FactionCheckHail(NPC,Spawn,faction)
  49. else
  50. GenericEcologyCallout(NPC, Spawn, faction)
  51. end
  52. end
  53. end
  54. function waypoints(NPC)
  55. MovementLoopAddLocation(NPC, 870.35, -8.06, -128.44, 2, 0)
  56. MovementLoopAddLocation(NPC, 867.4, -8.06, -131.87, 2, 1)
  57. MovementLoopAddLocation(NPC, 867.4, -8.06, -131.87, 2, 30,"Drink")
  58. MovementLoopAddLocation(NPC, 867.4, -8.06, -131.87, 2, 30,"Drink")
  59. MovementLoopAddLocation(NPC, 867.33, -8.06, -132.14, 2, 0)
  60. MovementLoopAddLocation(NPC, 870.92, -8.06, -131.67, 2, 0)
  61. MovementLoopAddLocation(NPC, 880.01, -8.48, -130.6, 2, 0)
  62. MovementLoopAddLocation(NPC, 886, -11.06, -129.2, 2, 0)
  63. MovementLoopAddLocation(NPC, 886.66, -11.06, -126.1, 2, 0)
  64. MovementLoopAddLocation(NPC, 885.3, -13.85, -120.18, 2, 0)
  65. MovementLoopAddLocation(NPC, 883.27, -14.06, -118.39, 2, 0)
  66. MovementLoopAddLocation(NPC, 878.37, -14.06, -118.86, 2, 0)
  67. MovementLoopAddLocation(NPC, 872.46, -14.06, -120.13, 2, 0)
  68. MovementLoopAddLocation(NPC, 866.85, -14.06, -121.54, 2, 1)
  69. MovementLoopAddLocation(NPC, 866.85, -14.06, -121.54, 2, 18,"EcologyEmotes")
  70. MovementLoopAddLocation(NPC, 866.53, -14.06, -123.24, 2, 0)
  71. MovementLoopAddLocation(NPC, 865.53, -14.06, -128.08, 2, 0)
  72. MovementLoopAddLocation(NPC, 859.09, -16.83, -129.35, 2, 0)
  73. MovementLoopAddLocation(NPC, 858.4, -17.06, -129.22, 2, 0)
  74. MovementLoopAddLocation(NPC, 857.68, -17.06, -128.33, 2, 0)
  75. MovementLoopAddLocation(NPC, 856.47, -20.06, -120.93, 2, 0)
  76. MovementLoopAddLocation(NPC, 856.35, -20.06, -118.38, 2, 1)
  77. MovementLoopAddLocation(NPC, 856.35, -20.06, -118.38, 2, 30,"Drink")
  78. MovementLoopAddLocation(NPC, 856.35, -20.06, -118.38, 2, 30,"Drink")
  79. MovementLoopAddLocation(NPC, 856.35, -20.06, -118.38, 2, 30,"Drink")
  80. MovementLoopAddLocation(NPC, 857.91, -20.06, -119.97, 2, 0)
  81. MovementLoopAddLocation(NPC, 854.64, -20.06, -121.51, 2, 0)
  82. MovementLoopAddLocation(NPC, 856.43, -17.06, -130.01, 2, 0)
  83. MovementLoopAddLocation(NPC, 859.48, -16.82, -130.97, 2, 0)
  84. MovementLoopAddLocation(NPC, 866.38, -14.06, -129.2, 2, 0)
  85. MovementLoopAddLocation(NPC, 869.75, -14.07, -125.45, 2, 0)
  86. MovementLoopAddLocation(NPC, 872.92, -14.06, -123.72, 2, 0)
  87. MovementLoopAddLocation(NPC, 876.78, -14.06, -119.83, 2, 0)
  88. MovementLoopAddLocation(NPC, 883.02, -14.06, -119.36, 2, 0)
  89. MovementLoopAddLocation(NPC, 884.11, -13.43, -121.28, 2, 0)
  90. MovementLoopAddLocation(NPC, 885.22, -11.06, -127.8, 2, 0)
  91. MovementLoopAddLocation(NPC, 877.26, -8.06, -129.52, 2, 0)
  92. MovementLoopAddLocation(NPC, 872.74, -8.06, -129.62, 2, 0)
  93. end
  94. function Drink(NPC)
  95. PlayFlavor(NPC,"","","drinking_idle",0,0)
  96. AddTimer(NPC,8000, "Drink2")
  97. end
  98. function Drink2(NPC)
  99. choice = math.random(1,2)
  100. if choice == 1 then
  101. PlayFlavor(NPC,"","","yawn",0,0)
  102. else
  103. PlayFlavor(NPC,"","","happy",0,0)
  104. end
  105. AddTimer(NPC,6000, "Drink3")
  106. end
  107. function Drink3(NPC)
  108. PlayFlavor(NPC,"","","drinking_idle",0,0)
  109. end