Item Box problem. Array just read 2 Item from my list.
function script ROMYAngelScroll {
setarray .i1[0],13758,12221,7621; // Common Items
set .i1rand,rand(0,1);
setarray .i2[0],12259,12437,12412; // Rare Items 11-15%
set .i2rand,rand(0,1);
setarray .i3[0],18526,5660; // Rare Items 16-40%
set .i3rand,rand(0,1);
setarray .i4[0],19859,20500,5505; // Super Rare Items
set .i4rand,rand(0,1);
set .chance, rand(100);
// Super Rare Item 1-10%
if (.chance >= 1 && .chance <= 10){
getitem .i4[ .i4rand ],1;
announce "["+strcharinfo(0)+"] has just obtained a ["+getitemname(.i4[ .i4rand ])+"] from the Angel Scroll.",0;
end;
}
// Rare Item 11-15%
else if (.chance >= 11 && .chance <= 15){
getitem .i3[ .i3rand ],1;
end;
}
// Rare Item 16-35%
else if (.chance >= 16 && .chance <= 35){
getitem .i2[ .i2rand ],3;
end;
}
// Common Items
else if (.chance >= 36 && .chance <= 100) {
getitem .i1[ .i1rand ],1;
end; }
}
Above is script that I'm using for my custom box. I got problem with this script. setarray just read only 2 item from my list.
setarray .i1[0],13758,12221,7621; // <=---- example this line, i put 3 item, but only 2 item 13758 and 12221 i can get from my box. Even I tried 200 times, still not got item 7621.
Hope someone can help me about this. Thank you.