Release (ZM) Editing The Mystery Box Price/Hiding It

CF4_99

Insane-Known Member
Messages
57
Points
443
Hello Everyone, today I have another release, and it is 2 things,
1. Changing The Price Of The Mystery Box To Whatever You Want.
2. Hiding/Taking Away The Mystery Box

I have been trying to find a way to change the price of the Mystery Box for a while and finally found it, I also stumbled across a code that hides the Mystery Box!
So Here It Is Enjoy! :grinning:

Make Sure To Use This #include
#include maps/mp/zombies/_zm_magicbox;
Hide/Take Away Mystery Box
Code:
SetBoxHidden()
{
    i = 0;
    while(i < level.chests.size)
    {
        level.chests[ i ] hide_chest();
        level.chests[ level.chest_index ].hidden = 1;
        i++;
    }
    self iPrintln("Mystery Box ^2Hidden");
}

Set Mystery Box Price
Code:
SetBoxCost()
{
    i = 0;
    while (i < level.chests.size)
    {
        level.chests[ i ].zombie_cost = 50;
        level.chests[ i ].old_cost = 50;
        i++;
    }
    self iPrintln("Mystery Box Cost Set To ^250");
}

Set Mystery Box Price To Custom(Easier/Faster Way)
Code:
SetBoxCostCustom(cost)
{
    i = 0;
    while (i < level.chests.size)
    {
        level.chests[ i ].zombie_cost = cost;
        level.chests[ i ].old_cost = cost;
        i++;
    }
    self iPrintln("Mystery Box Cost Set To ^2"+cost+"");
}
Example For The Custom Mystery Box Price
Code:
self add_option("MainMods", "Set Box Cost To 10", ::SetBoxCostCustom, 10);
Credits:
CabCon(Didn't Realize He Already Found The hide_chest/show_chest)​
 
Last edited:

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
4,201
Points
553
Hello Everyone, today I have another release, and it is 2 things,
1. Changing The Price Of The Mystery Box To Whatever You Want.
2. Hiding/Taking Away The Mystery Box

I have been trying to find a way to change the price of the Mystery Box for a while and finally found it, I also stumbled across a code that hides the Mystery Box!
So Here It Is Enjoy! :grinning:

Make Sure To Use This #include
#include maps/mp/zombies/_zm_magicbox;
Hide/Take Away Mystery Box
Code:
SetBoxHidden()
{
    i = 0;
    while(i < level.chests.size)
    {
        level.chests[ i ] hide_chest();
        level.chests[ level.chest_index ].hidden = 1;
        i++;
    }
    self iPrintln("Mystery Box ^2Hidden");
}

Set Mystery Box Price
Code:
SetBoxCost()
{
    i = 0;
    while (i < level.chests.size)
    {
        level.chests[ i ].zombie_cost = 50;
        level.chests[ i ].old_cost = 50;
        i++;
    }
    self iPrintln("Mystery Box Cost Set To ^250");
}

Set Mystery Box Price To Custom(Easier/Faster Way)
Code:
SetBoxCostCustom(cost)
{
    i = 0;
    while (i < level.chests.size)
    {
        level.chests[ i ].zombie_cost = cost;
        level.chests[ i ].old_cost = cost;
        i++;
    }
    self iPrintln("Mystery Box Cost Set To ^2"+cost+"");
}
Example For The Custom Mystery Box Price
Code:
self add_option("MainMods", "Set Box Cost To 10", ::SetBoxCostCustom, 10);
Good job! :grinning: Here is something similar for Black Ops 3:
Code:
#using scripts\zm\_zm_magicbox;

function func_boxcost(i){
    self S("Box Opening price set to ^2" +i);
     foreach(box in level.chests)
        box.zombie_cost = i;
}
function func_ShowBoxess() {
        self S("All Mystery Boxes ^2Spawned");
        foreach(box in level.chests)
            box thread zm_magicbox::show_chest();
}
function func_HideBoxess() {
    self S("All Mystery Boxes ^2Hidden");
    foreach(box in level.chests)
        box thread zm_magicbox::hide_chest(0);
}
function func_BoxesNeverMove() {
    self S("Unlimited Chest Rolls ^2Successful");
    level.chest_min_move_usage = 999;
}
 

CF4_99

Insane-Known Member
Messages
57
Points
443
Good job! :grinning: Here is something similar for Black Ops 3:
Code:
#using scripts\zm\_zm_magicbox;

function func_boxcost(i){
    self S("Box Opening price set to ^2" +i);
     foreach(box in level.chests)
        box.zombie_cost = i;
}
function func_ShowBoxess() {
        self S("All Mystery Boxes ^2Spawned");
        foreach(box in level.chests)
            box thread zm_magicbox::show_chest();
}
function func_HideBoxess() {
    self S("All Mystery Boxes ^2Hidden");
    foreach(box in level.chests)
        box thread zm_magicbox::hide_chest(0);
}
function func_BoxesNeverMove() {
    self S("Unlimited Chest Rolls ^2Successful");
    level.chest_min_move_usage = 999;
}
That is very similiar, I was about to edit the post and add the show box function, lol
 

LGK_Reversal

New Member
Messages
6
Points
3
This is amazing and very useful, I been seeing new menus with dope mystery box scripts like full control, Any of y'all can give an example on how I can give the box a rule to set only one gun in it? I buy you dinner :grinning:
 

candy

G59 Terrorist
Staff member
Donator
Messages
1,304
Points
548
This is amazing and very useful, I been seeing new menus with dope mystery box scripts like full control, Any of y'all can give an example on how I can give the box a rule to set only one gun in it? I buy you dinner :grinning:
Code:
oneWeaponInBox( weap )
{
    foreach(weapon in level.zombie_weapons)
        weapon.is_in_box = 0;
    wait .5; // need to wait for the above to complete;
    level.zombie_weapons[ weap ].is_in_box = 1;
    self iprintln(weap + " is now the only weapon in the mystery box.");
}
how to use
Code:
self addOpt("only HAMR in mystery box", ::oneWeaponInBox, "hamr_zm");
 

LGK_Reversal

New Member
Messages
6
Points
3
Code:
oneWeaponInBox( weap )
{
    foreach(weapon in level.zombie_weapons)
        weapon.is_in_box = 0;
    wait .5; // need to wait for the above to complete;
    level.zombie_weapons[ weap ].is_in_box = 1;
    self iprintln(weap + " is now the only weapon in the mystery box.");
}
how to use
Code:
self addOpt("only HAMR in mystery box", ::oneWeaponInBox, "hamr_zm");
Thank you so much @candy I have been looking for that for 3 day. Does road house sound good to you?
 

LGK_Reversal

New Member
Messages
6
Points
3
@candy Hmmmmmmmmm... It works and I get a nice boot, everything load smoothly, But once I go to the Mystery Box Menu and then my submenu it hits instant freeze mode. Does "
Screenshot (3).png
include maps zm magic box" work for that specific script, or is there a different one I need?
 
Top