@miaodiao Try not tested
lasagna,142,271,3 script Homi 4_ep18_imril,{
mes "[Homi]";
mes "hello";
next;
menu " - ^E63946yeah^000000",caihonghj," - no",caihongfj;
caihonghj:
set .@hasAll, 1;
for (.@i = 0; .@i < getarraysize($@Chzhili); .@i++) {
if (countitem($@Chzhili[.@i]) <= 0) {
.@hasAll = 0;
break;
}
}
if (.@hasAll) {
mes "[Homi]";
mes "Sorry, you cannot draw anymore because you already have all the items!";
close;
end;
}
set .@i, rand(0, (getarraysize($@Chzhili) - 1));
while (countitem($@Chzhili[.@i]) > 0) {
.@i = rand(0, (getarraysize($@Chzhili) - 1));
}
if (countitem(12384) < 1) {
mes "[Homi]";
mes "oh no!";
close;
end;
}
mes "[Homi]";
mes "haha!";
next;
getitem $@Chzhili[.@i], 1;
mes "[Homi]";
mes "you get "+getitemname($@Chzhili[.@i])+" x 1";
close;
end;
caihongfj:
delitem 12384, 1;
getitem 12385, 1;
close;
end;
OnInit:
setarray $@Chzhili[0], 10000, 10001, 10002, 10003, 10004, 10005, 10006, 10007;
end;
}