[Release] [Zombies] Set Mystery Box Hits Before Teddy

Topic created · 2 Posts · 349 Views
  • This script allows you to set the amount of times the box can be used before getting a teddy bear that moves the box. If you set it high it will basically just be a permanent box location but I would not recommend that because you might get a shitty box location. I'm working on a way to set up the first box spawn location for each map so that will release soon if I can get that working.

    Here is the code. Put this in AppData\Local\Plutonium\storage\t5\scripts\sp\zom

    #include maps\_utility;
    #include common_scripts\utility;
    #include maps\_zombiemode_utility;
    
    init()
    {
    	if( GetDvar( #"zombiemode" ) == "1" )
    		level thread onPlayerConnect();
    }
    
    onPlayerConnect()
    {
    	level endon("end_game");
    	for (;;)
    	{
    		level waittill("connected", player);
    		player thread onPlayerSpawned();
    	}
    }
    
    onPlayerSpawned()
    {
    	self endon("disconnect");
    	self waittill("spawned_player");
    	level thread boxhits();
            wait 6;
            self iprintln("^1Box Hits Set to: ^4" +level.chest_min_move_usage);
    }
    
    boxhits()
    {
    	if(!isdefined(level.chest_min_move_usage))
    	{
    		level.chest_min_move_usage = 10; //change number to whatever you want.
    	}
    	if(level.chest_accessed < level.chest_min_move_usage)
    	{
    		chance_of_joker = -1;
    	}
    	else
    	{
    		chance_of_joker = 100; //change this to -1 if you want a permanent box 
    	}
    }
    
  • This post is deleted!
Log in to reply