CaptainRockbelly.lua 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. function spawn(NPC)
  9. local dmgMod = GetStr(NPC)/10
  10. SetInfoStructUInt(NPC, "override_primary_weapon", 1)
  11. SetInfoStructUInt(NPC, "primary_weapon_damage_low", 5 + dmgMod)
  12. SetInfoStructUInt(NPC, "primary_weapon_damage_high", 11 + dmgMod)
  13. SetInfoStructUInt(NPC, "hp_regen_override", 1)
  14. SetInfoStructSInt(NPC, "hp_regen", 0)
  15. SetInfoStructUInt(NPC, "pw_regen_override", 1)
  16. SetInfoStructSInt(NPC, "pw_regen", 0)
  17. AddTimer(NPC,5000,"Callout")
  18. AddTimer(NPC,6000,"AliveCheck")
  19. end
  20. function hailed(NPC, Spawn)
  21. end
  22. function respawn(NPC)
  23. spawn(NPC)
  24. end
  25. function aggro(NPC)
  26. PlayFlavor(NPC, "voiceover/english/captain_rockbelly/tutorial_island02_fvo_ghostshout.mp3", "Get youz away from meez treasures! Dis meez loots!", "", 3040387050, 4243014787)
  27. end
  28. function Callout(NPC)
  29. PlayFlavor(NPC, "voiceover/english/captain_rockbelly/tutorial_island02_fvo_ghostshout.mp3", "Get youz away from meez treasures! Dis meez loots!", "", 3040387050, 4243014787)
  30. end
  31. function AliveCheck(NPC)
  32. if not IsInCombat(NPC) then
  33. Despawn(NPC)
  34. else
  35. AddTimer(NPC,9000,"AliveCheck")
  36. end
  37. end