acoweringbard.lua 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. --[[
  2. Script Name : SpawnScripts/FermentedGrape/acoweringbard.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.12.04 02:12:23
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/CombatModule"
  9. function spawn(NPC, Spawn)
  10. combatModule(NPC, Spawn)
  11. end
  12. local greetingsTable = { "voiceover/english/voice_emotes/greetings/greetings_1_1011.mp3",
  13. "voiceover/english/voice_emotes/greetings/greetings_2_1011.mp3",
  14. "voiceover/english/voice_emotes/greetings/greetings_3_1011.mp3"};
  15. function hailed(NPC, Spawn)
  16. local zone = GetZone(NPC)
  17. local Pirate1 = GetSpawnByLocationID(zone, 133781037) --FIRSTMATE
  18. local Pirate2 = GetSpawnByLocationID(zone, 133781036) --CUTTER
  19. local Pirate3 = GetSpawnByLocationID(zone, 133781038)
  20. local Pirate4 = GetSpawnByLocationID(zone, 133781039)
  21. local Pirate5 = GetSpawnByLocationID(zone, 133781035)
  22. local Pirate6 = GetSpawnByLocationID(zone, 133781034)
  23. local Captain = GetSpawnByLocationID(zone, 133781033)
  24. local Bartender = GetSpawnByLocationID(zone, 133781031)
  25. local Bard = GetSpawnByLocationID(zone, 133781032)
  26. local Bobick = GetSpawnByLocationID(zone, 133781027)
  27. if not IsAlive(Pirate1) and not IsAlive(Pirate2) and not IsAlive(Pirate3) and not IsAlive(Pirate4) and not IsAlive(Pirate5) and not IsAlive(Pirate6) and not IsAlive(Captain) then
  28. FaceTarget(NPC, Spawn)
  29. PlayFlavor(NPC,greetingsTable[math.random(#greetingsTable)]," Oh thank you so much! I was afraid they were going to kill me!","thanks",0,0,Spawn)
  30. else
  31. PlayFlavor(NPC, "voiceover/english/highelf_eco_good_1/ft/highelf/highelf_eco_good_1_notcitizen_gf_e0dfed5b.mp3", "P-p-please d-don't hurt me!", "beg", 623352569, 1914748091, Spawn, 0)
  32. end
  33. end
  34. function respawn(NPC)
  35. spawn(NPC)
  36. end