apirateswabby.lua 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. --[[
  2. Script Name : SpawnScripts/FermentedGrape/apirateswabby.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.12.04 01:12:40
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/CombatModule"
  9. function spawn(NPC, Spawn)
  10. combatModule(NPC, Spawn)
  11. end
  12. function hailed(NPC, Spawn)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function aggro(NPC,Spawn)
  18. local zone = GetZone(NPC)
  19. local Pirate1 = GetSpawnByLocationID(zone, 133781037) --FIRSTMATE
  20. local Pirate2 = GetSpawnByLocationID(zone, 133781036) --CUTTER
  21. local Pirate3 = GetSpawnByLocationID(zone, 133781038)
  22. local Pirate4 = GetSpawnByLocationID(zone, 133781039)
  23. local Pirate5 = GetSpawnByLocationID(zone, 133781035)
  24. local Pirate6 = GetSpawnByLocationID(zone, 133781034)
  25. local Captain = GetSpawnByLocationID(zone, 133781033)
  26. Attack(Pirate1,Spawn)
  27. Attack(Pirate2,Spawn)
  28. Attack(Pirate3,Spawn)
  29. Attack(Pirate4,Spawn)
  30. Attack(Pirate5,Spawn)
  31. Attack(Pirate6,Spawn)
  32. Attack(Captain,Spawn)
  33. if GetRace(NPC)== 9 and GetGender(NPC)==1 then
  34. PlayFlavor(NPC, "voiceover/english/human_eco_farsea_1/ft/service/guard/human_guard_service_farsea_1_hail_gm_990c7e98.mp3", "What do you think you're looking at?", "", 2597948053, 2836713373, Spawn, 0)
  35. end
  36. end
  37. function death(NPC,Spawn)
  38. local zone = GetZone(NPC)
  39. local Pirate1 = GetSpawnByLocationID(zone, 133781037) --FIRSTMATE
  40. local Pirate2 = GetSpawnByLocationID(zone, 133781036) --CUTTER
  41. local Pirate3 = GetSpawnByLocationID(zone, 133781038)
  42. local Pirate4 = GetSpawnByLocationID(zone, 133781039)
  43. local Pirate5 = GetSpawnByLocationID(zone, 133781035)
  44. local Pirate6 = GetSpawnByLocationID(zone, 133781034)
  45. local Captain = GetSpawnByLocationID(zone, 133781033)
  46. local Bartender = GetSpawnByLocationID(zone, 133781031)
  47. local Bard = GetSpawnByLocationID(zone, 133781032)
  48. local Bobick = GetSpawnByLocationID(zone, 133781027)
  49. 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
  50. if HasQuest(Spawn,5784) then
  51. SetStepComplete(Spawn,5784,1)
  52. end
  53. SpawnSet(Bartender,"name","a relieved bartender")
  54. SpawnSet(Bartender,"mood_state",0)
  55. SpawnSet(Bartender,"action_state",11214)
  56. SpawnSet(Bard,"name","a thankful bard")
  57. SpawnSet(Bard,"mood_state",11854)
  58. SpawnSet(Bard,"action_state",0)
  59. SpawnSet(Bobick,"action_state",11422)
  60. SpawnSet(Bobick,"name","a satisfied patron")
  61. end
  62. end