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

Discussion in 'Call of Duty: Black Ops 2 Scripts' started by CF4_99, Apr 3, 2017.

  1. CF4_99

    CF4_99 Well-Known Member

    56
    50
    218
    Credits:
    532
    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: Apr 8, 2017
  2. Tusta

    Tusta Head Member Donator

    20
    10
    14
    Credits:
    3,249
    Cool Post!
     
    Xx-GIPPI-xX and CF4_99 like this.
  3. CF4_99

    CF4_99 Well-Known Member

    56
    50
    218
    Credits:
    532
    thanks bro :smile:
     
    Tusta likes this.
  4. Tusta

    Tusta Head Member Donator

    20
    10
    14
    Credits:
    3,249
    Np Bro :wink:
     
  5. Syndicate

    Syndicate Modder

    684
    613
    333
    Credits:
    2,217
    nice work! finally new scripts coming out
     
    CabCon likes this.
  6. CabCon

    CabCon Head Administrator Staff Member Head Staff Team

    4,101
    2,680
    403
    Credits:
    197,115
    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;
    }
     
    LGK_Reversal and CF4_99 like this.
  7. CF4_99

    CF4_99 Well-Known Member

    56
    50
    218
    Credits:
    532
    That is very similiar, I was about to edit the post and add the show box function, lol
     
    LGK_Reversal and CabCon like this.
  8. Unix

    Unix Known Member

    33
    11
    118
    Credits:
    178
    Very nice post!
     
    LGK_Reversal, CabCon and CF4_99 like this.
  9. LGK_Reversal

    LGK_Reversal New Member

    6
    2
    3
    Credits:
    56
    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:
     
  10. candy

    candy G59 Terrorist Donator

    1,265
    831
    398
    Credits:
    7,077
    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 likes this.
  11. LGK_Reversal

    LGK_Reversal New Member

    6
    2
    3
    Credits:
    56
    Thank you so much @candy I have been looking for that for 3 day. Does road house sound good to you?
     
  12. candy

    candy G59 Terrorist Donator

    1,265
    831
    398
    Credits:
    7,077
    Never heard of it.
     
  13. LGK_Reversal

    LGK_Reversal New Member

    6
    2
    3
    Credits:
    56
    @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?
     
  14. LGK_Reversal

    LGK_Reversal New Member

    6
    2
    3
    Credits:
    56
    I figured it out lmao. Capture.PNG
     
    candy likes this.
  15. candy

    candy G59 Terrorist Donator

    1,265
    831
    398
    Credits:
    7,077

Share This Page