Add random chests similar to magic boxes

Magic boxes are a chest of the zombies gamemode that picks an item out of a pool of items randomly and gives it to you. The only problem is that you can’t change the pool of items. But here’s a way you could.

The magic box’s cost also increases every round, but some people wouldn’t want that. By default, it won’t increase cost every round. To toggle this (to be specific 50% increase every round), run this command : /zchest setmb ["yes" for cost increasing and "no" for cost not increasing, in case you set it to yes before]

Adding Items :
/zchest additem [item name or ID] [class] 0 [cost] [amount]
The cost will be all of the costs added up.

Deleting Items :
/zchest delitem [item name or ID] [class] 0

Setting The Cost :
/zchest cost [cost] [class]

Listing The Items :
/zchest listitems

Modifying The Items :
/zchest moditem [item name] [class] 0 [type] [value]

The commands work just as normal, it’s just that the chest itself works differently.

For simplicity’s sake, I think you can merge this command with the existing /zchest. The cost of the chest could be the collective cost of the items. Like with armor, one item has the full price, and the rest is just free

Also, Magic Boxes’ price increase round by round. How would you change that?

3 Likes

A suggestion would be to divide the current price by 0.2 so if the chest is worth 2000, the next price would be 10000 and so on. Realizing now the price will jump extremely high every time you buy it… Or divide it by an interval of 0.4. So 2000 would become 5000 when bought, 12500 when bought at the 5000 price, 31250 when bought at 12500 and so on.

2 Likes