HobertDawsim.lua 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. --[[
  2. Script Name : SpawnScripts/Starcrest/HobertDawsim.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.29 11:06:57
  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 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, 710.88, -19.96, 281.28, 2, 1)
  30. MovementLoopAddLocation(NPC, 710.88, -19.96, 281.28, 2, 35,"Drink")
  31. MovementLoopAddLocation(NPC, 710.88, -19.96, 281.28, 2, 35,"Drink")
  32. MovementLoopAddLocation(NPC, 711.13, -19.97, 281.67, 2, 0)
  33. MovementLoopAddLocation(NPC, 711.82, -19.94, 280.92, 2, 0)
  34. MovementLoopAddLocation(NPC, 707.26, -19.99, 277.68, 2, 1)
  35. MovementLoopAddLocation(NPC, 707.26, -19.99, 277.68, 2, 35,"Drink")
  36. MovementLoopAddLocation(NPC, 707.84, -20.01, 276.83, 2, 0)
  37. MovementLoopAddLocation(NPC, 718.21, -20.35, 264.27, 2, 1)
  38. MovementLoopAddLocation(NPC, 718.21, -20.35, 264.27, 2, 35,"Drink")
  39. MovementLoopAddLocation(NPC, 718.21, -20.35, 264.27, 2, 35,"Drink")
  40. MovementLoopAddLocation(NPC, 716.15, -20.26, 268.5, 2, 0)
  41. MovementLoopAddLocation(NPC, 706.29, -20.06, 276.1, 2, 1)
  42. MovementLoopAddLocation(NPC, 706.29, -20.06, 276.1, 2, 35,"Drink")
  43. MovementLoopAddLocation(NPC, 706.29, -20.06, 276.1, 2, 35,"Drink")
  44. MovementLoopAddLocation(NPC, 708.17, -20, 276.71, 2, 0)
  45. MovementLoopAddLocation(NPC, 710.82, -19.97, 281.51, 2, 1)
  46. MovementLoopAddLocation(NPC, 710.82, -19.97, 281.51, 2, 35,"Drink")
  47. MovementLoopAddLocation(NPC, 710.82, -19.97, 281.51, 2, 35,"Drink")
  48. MovementLoopAddLocation(NPC, 711.21, -19.98, 282.07, 2, 0)
  49. MovementLoopAddLocation(NPC, 710.54, -19.93, 278.29, 2, 0)
  50. MovementLoopAddLocation(NPC, 718.62, -20.31, 267.87, 2, 1)
  51. MovementLoopAddLocation(NPC, 718.62, -20.31, 267.87, 2, 35,"Drink")
  52. MovementLoopAddLocation(NPC, 718.62, -20.31, 267.87, 2, 35,"Drink")
  53. MovementLoopAddLocation(NPC, 717.12, -20.27, 268.8, 2, 0)
  54. MovementLoopAddLocation(NPC, 710.21, -20.25, 268.68, 2, 0)
  55. MovementLoopAddLocation(NPC, 709.16, -20.24, 269.13, 2, 1)
  56. MovementLoopAddLocation(NPC, 709.16, -20.24, 269.13, 2, 12,"GuardCallout")
  57. MovementLoopAddLocation(NPC, 709.16, -20.24, 269.13, 2, 1)
  58. MovementLoopAddLocation(NPC, 707.97, -20, 276.83, 2, 0)
  59. MovementLoopAddLocation(NPC, 710.03, -19.92, 279.83, 2, 0)
  60. end
  61. function Drink(NPC)
  62. PlayAnimation(NPC,11422)
  63. AddTimer(NPC,8000, "Drink2")
  64. end
  65. function Drink2(NPC)
  66. choice = math.random(1,4)
  67. if choice == 1 then
  68. PlayAnimation(NPC,891)
  69. elseif choice == 2 then
  70. PlayAnimation(NPC,11422)
  71. elseif choice == 3 then
  72. PlayFlavor(NPC,"","","hungry",0,0)
  73. else
  74. PlayAnimation(NPC,11668)
  75. end
  76. AddTimer(NPC,6000, "Drink3")
  77. end
  78. function Drink3(NPC)
  79. PlayAnimation(NPC,11422)
  80. end
  81. function GuardCallout(NPC,Spawn)
  82. local Trino = GetSpawn(NPC, 2340015)
  83. if not HasCompletedQuest(Spawn,246) then
  84. if Trino ~= nil then
  85. choice = math.random(1,3)
  86. if choice == 1 then
  87. PlayFlavor(NPC,"voiceover/english/human_eco_evil_drunk/ft/eco/evil/human_eco_evil_drunk_guard_gm_c874c635.mp3","I know..I shoul'n drink... Forgive me sir!","gut",1370911065,1198399974,Spawn)
  88. PlayFlavor(Trino,"","","shame",0,0)
  89. elseif choice == 2 then
  90. PlayFlavor(NPC,"voiceover/english/human_eco_evil_drunk/ft/eco/evil/human_eco_evil_drunk_guard_gm_b5bfa487.mp3","Look sir. I just had'one ale n' hour ago withh dinner.","no",1705294225,1483651602,Spawn)
  91. PlayFlavor(Trino)
  92. elseif choice == 3 then
  93. PlayFlavor(NPC,"voiceover/english/human_eco_evil_drunk/ft/eco/evil/human_eco_evil_drunk_guard_gm_153d5a3.mp3","Let's have a drink and forget we ever met!","agree",2964980286,4014491635,Spawn)
  94. PlayFlavor(Trino,"","","sniff",0,0)
  95. end
  96. end
  97. end
  98. end