Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO2 Modding Releases & Resources
  3. [ZM-BO2-SCRIPT] Dynamic Hardcore Health System

[ZM-BO2-SCRIPT] Dynamic Hardcore Health System

Scheduled Pinned Locked Moved BO2 Modding Releases & Resources
1 Posts 1 Posters 198 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • AndreTOQU3undefined Offline
    AndreTOQU3undefined Offline
    AndreTOQU3
    wrote last edited by
    #1

    This script replaces the default BO2 health with a dynamic perk-based health system.

    Base Health: 60

    Max Health Cap: 250

    Health is recalculated every 0.5 seconds based on perks the player owns.

    Health Bonuses:

    Juggernog / Armor Vest: +70 HP

    Quick Revive: +60 HP

    Tombstone: +60 HP

    The script automatically updates the player's max health, clamps it to 250, and adjusts current health if needed.

    Script:

    #include maps\mp\zombies\_zm_utility;
    #include common_scripts\utility;
    #include maps\mp\_utility;
    
    main()
    {
        level thread onPlayerConnect();
    }
    
    onPlayerConnect()
    {
        for(;;)
        {
            level waittill("connected", player);
            player thread player_health_system();
        }
    }
    
    player_health_system()
    {
        self endon("disconnect");
    
        const BASE_HEALTH = 60;
        const MAX_HEALTH_CAP = 250;
    
        self.maxhealth = BASE_HEALTH;
        self.health = self.maxhealth;
    
        for (;;)
        {
            wait 0.5;
    
            health = BASE_HEALTH;
    
            
            if ( self HasPerk( "specialty_juggernaut_zombies" ) 
            ||   self HasPerk( "specialty_armorvest" ) )
            {
                health += 70;
            }
    
           
            if ( self HasPerk( "specialty_quickrevive_zombies" ) 
            ||   self HasPerk( "specialty_quickrevive" ) )
            {
                health += 60;
            }
    
            
            if ( self.tombstone_legit && self HasPerk( "specialty_scavenger" ) )
            {
                health += 60;
            }
    
            
            if (health > MAX_HEALTH_CAP)
                health = MAX_HEALTH_CAP;
    
           
            if (health != self.maxhealth)
            {
                self.maxhealth = health;
    
                if (self.health > self.maxhealth)
                    self.health = self.maxhealth;
            }
        }
    }
    
    
    1 Reply Last reply
    2
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Donate