add this in your item_db2
30002,Random_Box,Random Box,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "itemcalc"; },{},{}
create a function npc
function script itemcalc {
set .@quantity,1;// quantity of the item you wanna give change 1 to your choice
setarray .@item[0],30003,30004,30005,30006,30007,30008,30009;//modify these numbers to your item number of choice
getitem .@item[rand(getarraysize(.@item))],1;
end;
}
then
add this in your iteminfo.lub or cskroption.lub
[30002] = {
unidentifiedDisplayName = "Random Box",
unidentifiedResourceName = "¿À·¡µÈÆÄ¶õ»óÀÚ",
unidentifiedDescriptionName = {
"A mysterious blue box that seems to hold something inside, but you'll have to open it to find out.",
"^ffffff_^000000",
"Weight :^777777 20^000000",
},
identifiedDisplayName = "Random Box",
identifiedResourceName = "¿À·¡µÈÆÄ¶õ»óÀÚ",
identifiedDescriptionName = {
"A mysterious blue box that seems to hold something inside, but you'll have to open it to find out.",
"^ffffff_^000000",
"Weight : ^77777720^000000",
},
slotCount = 0,
ClassNum = 0
},