DuniDiiun.lua 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/DuniDiiun.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.22 01:06:15
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  9. function spawn(NPC)
  10. waypoints(NPC)
  11. SetPlayerProximityFunction(NPC, 5, "InRange", "LeaveRange")
  12. end
  13. function InRange(NPC, Spawn)
  14. if GetFactionAmount(Spawn,11)<0 then
  15. FactionCheckingCallout(NPC, Spawn, faction)
  16. else
  17. GenericDrunkCallout(NPC, Spawn, faction)
  18. end
  19. end
  20. function hailed(NPC, Spawn)
  21. FaceTarget(NPC, Spawn)
  22. if GetFactionAmount(Spawn,11)<0 then
  23. FactionChecking(NPC, Spawn, faction)
  24. else
  25. GenericDrunkHail(NPC, Spawn, faction)
  26. end
  27. end
  28. function waypoints(NPC)
  29. MovementLoopAddLocation(NPC, 663.26, -24.48, 368.72, 2, 8)
  30. MovementLoopAddLocation(NPC, 663.26, -24.48, 368.72, 2, 33,"Drink")
  31. MovementLoopAddLocation(NPC, 663.26, -24.48, 368.72, 2, 32,"Drink")
  32. MovementLoopAddLocation(NPC, 663.26, -24.48, 368.72, 2, 35,"Drink")
  33. MovementLoopAddLocation(NPC, 664.16, -24.49, 368.61, 2, 0)
  34. MovementLoopAddLocation(NPC, 660.95, -24.49, 369.02, 2, 0)
  35. MovementLoopAddLocation(NPC, 657.5, -24.58, 372.57, 2, 1)
  36. MovementLoopAddLocation(NPC, 657.5, -24.58, 372.57, 2, 35,"Drink")
  37. MovementLoopAddLocation(NPC, 657.5, -24.58, 372.57, 2, 35,"Drink")
  38. MovementLoopAddLocation(NPC, 657.5, -24.58, 372.57, 2, 35,"Drink")
  39. MovementLoopAddLocation(NPC, 656.78, -24.6, 373.31, 2, 0)
  40. MovementLoopAddLocation(NPC, 658.99, -24.52, 371.03, 2, 0)
  41. MovementLoopAddLocation(NPC, 663.4, -24.43, 373.29, 2, 0)
  42. MovementLoopAddLocation(NPC, 665.49, -24.52, 373.04, 2, 0)
  43. MovementLoopAddLocation(NPC, 667.08, -24.55, 372.37, 2, 0)
  44. MovementLoopAddLocation(NPC, 672.4, -24.7, 369.82, 2, 0)
  45. MovementLoopAddLocation(NPC, 674.28, -24.74, 368.21, 2, 0)
  46. MovementLoopAddLocation(NPC, 673.38, -24.71, 367.07, 2, 0)
  47. MovementLoopAddLocation(NPC, 671.32, -24.65, 366.31, 2, 1)
  48. MovementLoopAddLocation(NPC, 671.32, -24.65, 366.31, 2, 35,"Drink")
  49. MovementLoopAddLocation(NPC, 671.32, -24.65, 366.31, 2, 35,"Drink")
  50. MovementLoopAddLocation(NPC, 671.32, -24.65, 366.31, 2, 35,"Drink")
  51. MovementLoopAddLocation(NPC, 670.35, -24.63, 366.46, 2, 0)
  52. MovementLoopAddLocation(NPC, 669.65, -24.61, 366.58, 2, 0)
  53. MovementLoopAddLocation(NPC, 669.74, -24.62, 364.82, 2, 0)
  54. MovementLoopAddLocation(NPC, 669.79, -24.64, 363.81, 2, 0)
  55. MovementLoopAddLocation(NPC, 668.98, -24.68, 362, 2, 0)
  56. MovementLoopAddLocation(NPC, 665.12, -24.8, 347.99, 2, 1)
  57. MovementLoopAddLocation(NPC, 665.12, -24.8, 347.99, 2, 35,"Drink")
  58. MovementLoopAddLocation(NPC, 665.12, -24.8, 347.99, 2, 35,"Drink")
  59. MovementLoopAddLocation(NPC, 665.12, -24.8, 347.99, 2, 35,"Drink")
  60. MovementLoopAddLocation(NPC, 665.03, -24.81, 349.8, 2, 0)
  61. MovementLoopAddLocation(NPC, 660.41, -24.83, 358.48, 2, 0)
  62. MovementLoopAddLocation(NPC, 660.88, -24.52, 368.02, 2, 0)
  63. end
  64. function Drink(NPC)
  65. PlayAnimation(NPC,11422)
  66. AddTimer(NPC,8000, "Drink2")
  67. end
  68. function Drink2(NPC)
  69. choice = math.random(1,4)
  70. if choice == 1 then
  71. PlayAnimation(NPC,891)
  72. elseif choice == 2 then
  73. PlayAnimation(NPC,11422)
  74. elseif choice == 3 then
  75. PlayFlavor(NPC,"","","hungry",0,0)
  76. else
  77. PlayAnimation(NPC,11668)
  78. end
  79. AddTimer(NPC,6000, "Drink3")
  80. end
  81. function Drink3(NPC)
  82. PlayAnimation(NPC,11422)
  83. end