// http://rathena.org/board/topic/83017-pro-lotti-girl-refine-master/
prontera,120,169,6 script Lotti Girl 714,{
mes "[Lotti Girl]";
mes "Greetings, ^008800"+strcharinfo(0)+"^000000! Ready for my exciting offer?";
next;
mes "[Lotti Girl]";
mes "I'm Lotti! I'll exchange cool";
mes "random prizes for every";
mes "^ff0000100 Poring Coins^000000 you give to me.";
next;
mes "[Lotti Girl]";
mes "Our Grand prize is:";
mes "^ff0000Flapping Angel Wing [0]^000000";
mes "Special prizes are:";
mes "^ff00005,000 SPECs^000000";
mes "^ff00001x Membership Card (3-day VIP)^000000";
mes "and ^ff000050 Yggdrasilberries^000000";
next;
mes "[Lotti Girl]";
mes "You can still get random item like ^008800Level 3, 5 or 7 Foods^000000 and ^008800Reset Certificates^000000 if you failed to get the grand prize and special prizes.";
mes " ";
mes "If you have enough ^ff0000Poring Coins^000000, you will be able to choose from two options.";
if (countitem(7539) < 100)
close;
next;
if(select("Deal me in!:No way...")==2)
close;
mes "[Lotti Girl]";
mes "Here we go...";
delitem 7539,100;
set .@Total,8;
//<%>,<ItemID>,<Amount>
setarray .@P1[0],(2/10),5210,1;
setarray .@P2[0],5,6153,5000;
setarray .@P3[0],10,14232,5;
setarray .@P4[0],60,12043,2;
setarray .@P5[0],70,12065,2;
setarray .@P6[0],60,12087,2;
setarray .@P7[0],10,7283,1;
setarray .@P8[0],10,7282,1;
setarray .@Default[0],608,3;
set .@i, rand(1,.@Total);
if (rand(1,100) > getd(".@P"+.@i+"[0]"))
{
for(set .@j,0; .@j<getarraysize(.@Default); set .@j,.@j+2)
{
getitem .@Default[.@j], .@Default[.@j+1];
if(!.@k[0])
setarray .@k[0], .@Default[.@j], .@Default[.@j+1];
}
}
else{
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(1<=.@gz&&.@gz<=4)
announce "Congratulations! "+strcharinfo(0)+" just received "+getitemname(.@k[0])+" x "+.@k[1]+" from Lotti Girl (prontera 139 173)!",0;
specialeffect2 248;
close;
}