Hi there, I've been trying to modify my lotti script into not have a default prize (If you lose you get this item).
I just want a Lotti / Gacha script that will take the payment, then randomly select a reward (items that I set) with their respective chances.
As my current lotti script goes (the one from rathena) when you roll and if you don't get any of the set rewards you will be rewarded with a DEFAULT prize. I don't want to get default prize, I just want to get the items that are set by how high the chance to get them.
Just roll me all the items, highest chance to lowest chance. Thank you for the help
This is the script
// http://rathena.org/board/topic/83017-pro-lotti-girl-refine-master/
turbo_room,135,97,3 script Lotti Girl 720,{
mes "[Lotti Girl]";
mes "I'm Lotti! I'll exchange";
mes "Random Prizes for every";
mes "^ff000050,000 zeny^000000.";
next;
mes "[Lotti Girl]";
mes "Our Grand prize is:";
mes "^ff0000 +4 Refine Ticket^000000";
mes "Consolations are:";
mes "^ff0000 x1 Silver Coin^000000";
mes "^ff0000 x1 Bronze Coin^000000";
mes "^ff0000 x?? War Badges^000000";
mes "And many more!!";
if (Zeny < 50000)
close;
next;
if(select("Let's Do This!!:No thanks...")==2) close;
mes "[Lotti Girl]";
mes "Here we go...";
set Zeny, Zeny - 50000;
set .@Total,5;
//<%>,<ItemID>,<Amount>
setarray .@P1[0],2,6456,1;
setarray .@P2[0],3,675,1;
setarray .@P3[0],4,673,1;
setarray .@P4[0],5,7773,rand(1,2);
setarray .@Default[0],11502,rand(1,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<=2)
announce "Hey! "+strcharinfo(0)+" just received "+getitemname(.@k[0])+" x "+.@k[1]+" from Lotti Girl!",0;
specialeffect2 248;
close;}
Question
Yami
Hi there, I've been trying to modify my lotti script into not have a default prize (If you lose you get this item).
I just want a Lotti / Gacha script that will take the payment, then randomly select a reward (items that I set) with their respective chances.
As my current lotti script goes (the one from rathena) when you roll and if you don't get any of the set rewards you will be rewarded with a DEFAULT prize. I don't want to get default prize, I just want to get the items that are set by how high the chance to get them.
Just roll me all the items, highest chance to lowest chance. Thank you for the help
This is the script
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.