Skip to content
  • 0 Unread 0
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
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 753 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 on 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

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    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
    • Unread 0
    • Recent
    • Tags
    • Popular
    • Users
    • Groups