Skip to content
  • 0 Unread 0
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse

Plutonium

  1. Home
  2. BO2 Modding Releases & Resources
  3. [ZM] BO3's Three hit system and increased health for Juggernog as well! v3!

[ZM] BO3's Three hit system and increased health for Juggernog as well! v3!

Scheduled Pinned Locked Moved BO2 Modding Releases & Resources
1 Posts 1 Posters 1.0k 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.
  • Coronavirus-19undefined Offline
    Coronavirus-19undefined Offline
    Coronavirus-19
    wrote on last edited by Coronavirus-19
    #1

    To add this script first copy n' paste this code into Notepad++ then save it as a ".txt" after edit the change ".txt" to ".gsc" -- if you don't know how to do that open up a random folder look for "View" at the top and click it. A drop down menu should appear and you'll see "Show" at the bottom, click it and you'll see "File name extension" and should be able to change ".txt" to ".gsc"

    --You can name the file whatever you want, just make sure it ends with ".gsc"

    After the File name extension change add the ".gsc" to the Plutonium folders by:
    Win + R and Run "%localappdata%" then search for "Plutonium" and go the folders as shown: Local/Plutonium/storage/t6/scripts/zm

    GSC File Download

    Raw Code:

    #include common_scripts\utility;
    #include maps\mp\_utility;
    
    init()
    {
        level thread global_player_connect_handler();
    }
    
    // -------------------------
    // GLOBAL PLAYER CONNECT
    // -------------------------
    global_player_connect_handler()
    {
        for(;;)
        {
            level waittill("connected", player);
    
            // make sure EVERY client gets the code
            player thread player_spawn_handler();
        }
    }
    
    // -------------------------
    // PLAYER SPAWN HANDLER
    // -------------------------
    player_spawn_handler()
    {
        self endon("disconnect");
        level endon("game_ended");
    
        for(;;)
        {
            self waittill("spawned_player");
    
            // ensure each new spawn has these set
            self.jugActive = false;
            self.health_initialized = false;
    
            self thread enforce_health_system();
            self thread monitor_perks();
            self thread revive_handler();
        }
    }
    
    // -------------------------
    // ENFORCE HEALTH (RUNS EVERY 250ms)
    // -------------------------
    enforce_health_system()
    {
        self endon("disconnect");
        level endon("game_ended");
    
        for(;;)
        {
            wait 0.25;
    
            if (self.jugActive)
            {
                if (self.maxhealth != 300)
                {
                    self.maxhealth = 300;
                    self.health = self.maxhealth;
                }
            }
            else
            {
                if (self.maxhealth != 150)
                {
                    self.maxhealth = 150;
                    self.health = self.maxhealth;
                }
            }
        }
    }
    
    // -------------------------
    // PERK MONITOR
    // -------------------------
    monitor_perks()
    {
        self endon("disconnect");
        level endon("game_ended");
    
        for(;;)
        {
            wait 0.25;
    
            currentJug = self hasPerk("specialty_armorvest");
    
            if (!isDefined(self.jugActive) || currentJug != self.jugActive)
            {
                self.jugActive = currentJug;
    
                if (currentJug)
                {
                    self.maxhealth = 300;
                    self.health = self.maxhealth;
                    self IPrintLnBold("^2Juggernog: 300 HP");
                }
                else
                {
                    self.maxhealth = 150;
                    self.health = self.maxhealth;
                    self IPrintLnBold("^1Jug lost: 150 HP");
                }
            }
        }
    }
    
    // -------------------------
    // REVIVE HANDLER
    // -------------------------
    revive_handler()
    {
        self endon("disconnect");
        level endon("game_ended");
    
        for(;;)
        {
            self waittill("player_revived");
    
            // revive resets health → reapply our rules
            self.maxhealth = 150;
            self.health = self.maxhealth;
    
            self IPrintLnBold("^3Revived → HP reset to 150");
        }
    }
    
    
    
    1 Reply Last reply
    2
    • Coronavirus-19undefined Coronavirus-19 referenced this topic on

    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