what I meant to say about the custom box is initially the same as the one you have stated as "OBB".
what I did was.
Added the line in const.txt, item_group_db.txt, added a file named item_hatbox.txt, I even have tried the item_flag.txt (which is a worthless effort since it didn't change anything) and ofcourse item_db.txt
on const.txt
IG_HatBox 453
item_group_db
import: db/pre-re/item_hatbox.txt
item_hatbox.txt
IG_HatBox,20206,1
IG_HatBox,20000,1
IG_HatBox,20001,1
IG_HatBox,20004,1
.... and so on
item_db.txt
20279,Hat_Box,Hat Box,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{getrandgroupitem(IG_HatBox),1;}.{},{}
Thank you for replying Mr. Kurofly
EDIT: I tried to use the script method. it works like a charm. but I wanted this option rather than the script one.