9
3

CaptainPaullus.lua 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. --[[
  2. Script Name : SpawnScripts/BeggarsCourt/CaptainPaullus.lua
  3. Script Purpose : Captain Paullus
  4. Script Author : Dorbin
  5. Script Date : 2022.07.18
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericGuardVoiceOvers.lua")
  9. function spawn(NPC)
  10. SetTempVariable(NPC,"DrunkCallout","false")
  11. AddTimer(NPC,2000,"waypoints")
  12. --waypoints(NPC)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function hailed(NPC, Spawn)
  18. if GetFactionAmount(Spawn,12)<0 then
  19. else
  20. FaceTarget(NPC, Spawn)
  21. GenericGuardHail(NPC,Spawn)
  22. end
  23. end
  24. function DrunkCall(NPC,Spawn)
  25. local zone = GetZone(NPC)
  26. local Drunk = GetSpawnByLocationID(zone, 403002)
  27. SetTarget(Drunk,NPC)
  28. FaceTarget(Drunk,NPC)
  29. FaceTarget(NPC,Drunk)
  30. local choice = MakeRandomInt(1,3)
  31. if choice==1 then
  32. PlayFlavor(Drunk, "voiceover/english/human_eco_evil_drunk/ft/eco/evil/human_eco_evil_drunk_guard_gm_153d5a3.mp3", "Let's have a drink together and forget that we ever met.", "hello", 2964980286, 4014491635)
  33. elseif choice == 2 then
  34. PlayFlavor(Drunk, "voiceover/english/human_eco_evil_drunk/ft/eco/evil/human_eco_evil_drunk_bartender_gm_e4fde966.mp3", "I haven't that much to drink yet, I got here when... bah I forgot.", "no", 612325975, 4257910058)
  35. else
  36. PlayFlavor(Drunk,"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)
  37. end
  38. end
  39. function Turn(NPC,Spawn)
  40. if GetTempVariable(NPC,"DrunkCallout")== "false" then
  41. SetTempVariable(NPC,"DrunkCallout","true")
  42. local zone = GetZone(NPC)
  43. local Drunk = GetSpawnByLocationID(zone, 403002)
  44. SetTarget(NPC,Drunk)
  45. FaceTarget(NPC,Drunk)
  46. SetTarget(Drunk,NPC)
  47. FaceTarget(Drunk,NPC)
  48. local choice = MakeRandomInt(1, 2)
  49. if choice == 1 then
  50. PlayFlavor(NPC, "", "", "glare", 0, 0)
  51. elseif choice == 2 then
  52. PlayFlavor(NPC, "", "", "shakefist", 0, 0)
  53. end
  54. AddTimer(NPC,1500,"DrunkCall")
  55. AddTimer(NPC,5000,"Reset")
  56. else
  57. SetTempVariable(NPC,"DrunkCallout","false")
  58. SetHeading(NPC,20)
  59. end
  60. end
  61. function Reset(NPC,Spawn)
  62. local zone = GetZone(NPC)
  63. local Drunk = GetSpawnByLocationID(zone, 403002)
  64. SetTarget(NPC,nil)
  65. SetTarget(Drunk,nil)
  66. end
  67. function waypoints(NPC)
  68. MovementLoopAddLocation(NPC, 70.47, -7.08, 94.74, 2, 0)
  69. MovementLoopAddLocation(NPC, 73.88, -7.08, 99.74, 2, 0)
  70. MovementLoopAddLocation(NPC, 75.64, -7.08, 103.04, 2, 1)
  71. MovementLoopAddLocation(NPC, 75.64, -7.08, 103.04, 2, 10,"Turn")
  72. MovementLoopAddLocation(NPC, 75.64, -7.08, 103.04, 2, 0)
  73. MovementLoopAddLocation(NPC, 72.18, -7.08, 98.09, 2, 0)
  74. MovementLoopAddLocation(NPC, 67.44, -7.08, 94.13, 2, 0)
  75. MovementLoopAddLocation(NPC, 61.6, -7.08, 94.84, 2, 0)
  76. MovementLoopAddLocation(NPC, 57.64, -7.08, 97.9, 2, 0)
  77. MovementLoopAddLocation(NPC, 55.38, -7.08, 102.21, 2, 0)
  78. MovementLoopAddLocation(NPC, 53.98, -7.08, 108.71, 2, 8)
  79. MovementLoopAddLocation(NPC, 55.71, -7.08, 101.37, 2, 0)
  80. MovementLoopAddLocation(NPC, 58.92, -7.08, 96.99, 2, 0)
  81. MovementLoopAddLocation(NPC, 61.75, -7.08, 94.79, 2, 0)
  82. MovementLoopAddLocation(NPC, 63.69, -7.08, 92.53, 2, 0)
  83. MovementLoopAddLocation(NPC, 62.13, -7.02, 84.47, 2, 22)
  84. MovementLoopAddLocation(NPC, 62.36, -7.07, 86.6, 2, 0)
  85. MovementLoopAddLocation(NPC, 62.64, -7.08, 91.06, 2, 0)
  86. end