set .@Total,12;
setarray .@P1[0],1,1230,1; //Ice Pick
setarray .@P2[0],1,5135,1; //Cyclops
setarray .@P3[0],1,4365,1; // HW Card
setarray .@P4[0],1,4451,1; // Crothen Card
setarray .@P5[0],1,18885,1; // Jejecap
setarray .@P6[0],1,20036,1; // Sword Master Crown
setarray .@P7[0],1,4357,1; // LK Card
setarray .@P8[0],1,4403,1; // kiel card
setarray .@P9[0],20,12210,20; // BGUM
setarray .@P10[0],30,7227,20; // TCG
setarray .@P11[0],100,7227,2; // TCG
setarray .@P12[0],100,7227,2; // TCG
do{
set .@i, rand(1,.@Total);
}while( rand(1,100) > getd(".@P"+.@i+"[0]") );
for(set .@j,1; .@j<getarraysize(getd(".@P"+.@i)); set .@j,.@j+2)
{
getitem getd(".@P"+.@i+"["+.@j+"]"), getd(".@P"+.@i+"["+(.@j+1)+"]");
if (!.@k[0])
{
set .@gz,.@i;
setarray .@k[0], getd(".@P"+.@i+"["+.@j+"]"), getd(".@P"+.@i+"["+(.@j+1)+"]");
break;
}
}
if( .@gz && .@gz <= 10 ) // 10% equal or below will announce
announce "Congratulations! "+strcharinfo(0)+" just received "+getitemname(.@k[0])+" x "+.@k[1]+" from Lotti Girl",0;
specialeffect2 248;
close;