apiratecutter.lua 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. --[[
  2. Script Name : SpawnScripts/FermentedGrape/apiratecutter.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.12.04 05:12:23
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/CombatModule"
  9. function spawn(NPC, Spawn)
  10. combatModule(NPC, Spawn)
  11. AddTimer(NPC,MakeRandomInt(2000,5000),"EmoteLoop")
  12. end
  13. function EmoteLoop(NPC)
  14. if not IsInCombat(NPC) then
  15. SpawnSet(NPC,"mood_state",11852)
  16. choice = MakeRandomInt(1,5)
  17. if choice ==1 then
  18. PlayFlavor(NPC,"","","threaten",0,0)
  19. elseif choice ==2 then
  20. PlayFlavor(NPC,"","","taunt",0,0)
  21. elseif choice ==3 then
  22. PlayFlavor(NPC,"","","neener",0,0)
  23. elseif choice ==4 then
  24. PlayFlavor(NPC,"","","swear",0,0)
  25. elseif choice ==5 then
  26. PlayFlavor(NPC,"","","violin",0,0)
  27. end
  28. end
  29. AddTimer(NPC,5000,"EmoteLoop")
  30. end
  31. function respawn(NPC)
  32. spawn(NPC)
  33. end
  34. function aggro(NPC,Spawn)
  35. PlayFlavor(NPC, "voiceover/english/halfelf_eco_evil_1/ft/halfelf/halfelf_eco_evil_1_hail_gm_7344f21b.mp3", "I'm in the mood to kick someone in the teeth.", "kick", 620861878, 995351111, Spawn, 0)
  36. local zone = GetZone(NPC)
  37. local Pirate1 = GetSpawnByLocationID(zone, 133781037) --FIRSTMATE
  38. local Pirate2 = GetSpawnByLocationID(zone, 133781036) --CUTTER
  39. local Pirate3 = GetSpawnByLocationID(zone, 133781038)
  40. local Pirate4 = GetSpawnByLocationID(zone, 133781039)
  41. local Pirate5 = GetSpawnByLocationID(zone, 133781035)
  42. local Pirate6 = GetSpawnByLocationID(zone, 133781034)
  43. local Captain = GetSpawnByLocationID(zone, 133781033)
  44. Attack(Pirate1,Spawn)
  45. Attack(Pirate2,Spawn)
  46. Attack(Pirate3,Spawn)
  47. Attack(Pirate4,Spawn)
  48. Attack(Pirate5,Spawn)
  49. Attack(Pirate6,Spawn)
  50. Attack(Captain,Spawn)
  51. end
  52. function death(NPC,Spawn)
  53. local zone = GetZone(NPC)
  54. local Pirate1 = GetSpawnByLocationID(zone, 133781037) --FIRSTMATE
  55. local Pirate2 = GetSpawnByLocationID(zone, 133781036) --CUTTER
  56. local Pirate3 = GetSpawnByLocationID(zone, 133781038)
  57. local Pirate4 = GetSpawnByLocationID(zone, 133781039)
  58. local Pirate5 = GetSpawnByLocationID(zone, 133781035)
  59. local Pirate6 = GetSpawnByLocationID(zone, 133781034)
  60. local Captain = GetSpawnByLocationID(zone, 133781033)
  61. local Bartender = GetSpawnByLocationID(zone, 133781031)
  62. local Bard = GetSpawnByLocationID(zone, 133781032)
  63. local Bobick = GetSpawnByLocationID(zone, 133781027)
  64. 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
  65. if HasQuest(Spawn,5784) then
  66. SetStepComplete(Spawn,5784,1)
  67. end
  68. SpawnSet(Bartender,"name","a relieved bartender")
  69. SpawnSet(Bartender,"mood_state",0)
  70. SpawnSet(Bartender,"action_state",11214)
  71. SpawnSet(Bard,"name","a thankful bard")
  72. SpawnSet(Bard,"mood_state",11854)
  73. SpawnSet(Bard,"action_state",0)
  74. SpawnSet(Bobick,"action_state",11422)
  75. SpawnSet(Bobick,"name","a satisfied patron")
  76. end
  77. end