CaptainRockbelly.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. --[[
  2. Script Name : SpawnScripts/IsleRefuge1/CaptainRockbelly.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.09.04 12:09:35
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/NPCModule"
  9. function spawn(NPC)
  10. local dmgMod = GetStr(NPC)/10
  11. Named(NPC)
  12. SetInfoStructUInt(NPC, "override_primary_weapon", 1)
  13. SetInfoStructUInt(NPC, "primary_weapon_damage_low", 5 + dmgMod)
  14. SetInfoStructUInt(NPC, "primary_weapon_damage_high", 11 + dmgMod)
  15. SetInfoStructUInt(NPC, "hp_regen_override", 1)
  16. SetInfoStructSInt(NPC, "hp_regen", 0)
  17. SetInfoStructUInt(NPC, "pw_regen_override", 1)
  18. SetInfoStructSInt(NPC, "pw_regen", 0)
  19. AddTimer(NPC,5000,"Callout")
  20. AddTimer(NPC,6000,"AliveCheck")
  21. end
  22. function hailed(NPC, Spawn)
  23. end
  24. function respawn(NPC)
  25. spawn(NPC)
  26. end
  27. function aggro(NPC)
  28. PlayFlavor(NPC, "voiceover/english/captain_rockbelly/tutorial_island02_fvo_ghostshout.mp3", "Get youz away from meez treasures! Dis meez loots!", "", 3040387050, 4243014787)
  29. end
  30. function Callout(NPC)
  31. PlayFlavor(NPC, "voiceover/english/captain_rockbelly/tutorial_island02_fvo_ghostshout.mp3", "Get youz away from meez treasures! Dis meez loots!", "", 3040387050, 4243014787)
  32. end
  33. function AliveCheck(NPC)
  34. if not IsInCombat(NPC) then
  35. Despawn(NPC)
  36. else
  37. AddTimer(NPC,9000,"AliveCheck")
  38. end
  39. end