Request requesting script for mystery box

danewb

New Member
Messages
1
Reaction score
0
Points
1
Is it possible to make a script that gives monkeys bombs the first time the mystery box is hit?
I did this in bo1 by removing everything else from the box so it's the only possible thing to get. I would imagine it's possible to do the same for bo2, I don't know how tho which is why I come here for help :x
 
Last edited:

Xeirh

Veteran
Messages
16
Reaction score
2
Points
793
This is created by candy
if you want to use presets like only certain weapons in box then just call for box_preset or make your own preset or just a single weapon call for only_weap

When playing on maps with perma perks if you get the box perma perk it will break this, no idea how to fix tho

Code:
box_preset()
{
    weap = strTok( "weapon1_zm;weapon2_zm", ";" );
    thread place_in_box( weap );
}
place_in_box( weap )
{
    level.moddedBox = 1;
    for(c=0;c<weap.size;c++)
    {
        level.zombie_weapons[ weap[c] ].is_in_box = 1;
        level.limited_weapons[ weap[c] ] = undefined;
        level.chest_box_weapons = [];
        level.chest_box_weapons[0] = weap[0];
        level.chest_box_weapons[1] = weap[1];
        level.chest_box_weapons[2] = weap[2];
        level.chest_box_weapons[3] = weap[3];
        level.chest_box_weapons[4] = weap[4];
        level.chest_box_weapons[5] = weap[5];
        level.chest_box_weapons[6] = weap[6];
        level.chest_box_weapons[7] = weap[7];
        level.chest_box_weapons[8] = weap[8];
        level.chest_box_weapons[9] = weap[9];
        level.chest_box_weapons[10] = weap[10];
        level.chest_box_weapons[11] = weap[11];
        level.chest_box_weapons[12] = weap[12];
        level.chest_box_weapons[13] = weap[13];
        level.chest_box_weapons[14] = weap[14];
        level.chest_box_weapons[15] = weap[15];
        level.chest_box_weapons[16] = weap[16];
        level.chest_box_weapons[17] = weap[17];
        level.chest_box_weapons[18] = weap[18];
        level.chest_box_weapons[19] = weap[19];
        level.chest_box_weapons[20] = weap[20];
        level.chest_box_weapons[21] = weap[21];
        level.chest_box_weapons[22] = weap[22];
        level.chest_box_weapons[23] = weap[23];
        level.chest_box_weapons[24] = weap[24];
        level.chest_box_weapons[25] = weap[25];
    }
}
only_weap( weap )
{
    if(!isDefined(level.moddedBox))
    {
        all_weapons();
    }
    level.zombie_weapons[weap].is_in_box = 1;
    level.limited_weapons[weap] = undefined;
    level.chest_box_weapons = [];
    level.chest_box_weapons[0] = weap;
}
all_weapons()
{
    level.moddedBox = 1;
    if(isDefined(level.custom_magic_box_selection_logic))
    {
        level.custom_magic_box_selection_logic = undefined;
    }
    if(isDefined(level.special_weapon_magicbox_check))
    {
        level.special_weapon_magicbox_check = undefined;
    }
    if(isDefined(level.content_weapon))
    {
        level.content_weapon = undefined;
    }
    foreach(weapon in level.zombie_weapons)
    {
        weapon.is_in_box = 1;
    }
    level.limited_weapons           = [];
    level.chest_box_weapons         = [];
    level.chest_box_weapons         = array_copy(level.zombie_weapons);
    level.customRandomWeaponWeights = ::randomizeweaponsarray;
}
randomizeweaponsarray( player )
{
    level.chest_box_weapons = array_randomize(level.chest_box_weapons);
    return level.chest_box_weapons;
}
 
Top