Try below
prontera,150,150,6 script Zeny Roulette 4_F_KAFRA1,{
function Roll;
cutin "1s_1", 3;
mes .npc$;
mes "Hi " + strcharinfo(0) + ", So do you want to play zeny roulette?";
next;
if (select("~ Yes:~ No") & 2) {
mes .npc$;
mes "Alright!";
close2;
cutin "", 255;
end;
}
mes .npc$;
mes "Let's go!";
next;
@level = 1;
while(1) {
switch(select("~ Play:~ Exit")) {
case 1:
.@str$ = Roll(@level);
if (.@str$ == "NZ") {
mes .npc$;
mes "You need " + callfunc("F_InsertComma", .zeny_amt_need) + " in order to participate in the roulette.";
.@a = 1;
break;
}
if (.@str$ == "NA") {
mes .npc$;
mes "Seems not your lucky day " + strcharinfo(0);
if (@level > 1)
@level--;
next;
break;
}
.@index = inarray(.item_cutin$, .@str$);
mes .npc$;
mes "Congratulations! You won ^FF8000" + getitemname(.item_reward[.@index]) + "^000000!";
getitem .item_reward[.@index], 1;
specialeffect 10;
// Jackpot
if (.@str$ == "7s_2") {
announce strcharinfo(0) + " just won the jackpot prize " + getitemname(.item_reward[.@index]) + " at Zeny Roulette, get yours now!", 0;
@level = 1;
.@a = 1;
break;
}
@level++;
next;
break;
case 2:
default:
.@a = 1;
break;
}
if (.@a) { .@a = 0; break; }
}
close2;
cutin "", 255;
end;
function Roll {
if (.zeny_required && .zeny_amt_need > Zeny)
return "NZ";
Zeny -= .zeny_amt_need;
.@i = getarg(0, 1);
while(1) {
.@done = 0;
for (.@j = 1; .@j <= (10 - .@i); .@j++) {
cutin .@i + "s_" + .@j, 3;
if (5 > rand(100)) {
.@done = 1;
.@award_cutin$ = .@i + "s_" + .@j;
if (.@j == 1 || .@j == (10 - .@i))
.@award_cutin$ = "NA";
break;
}
sleep2 100;
}
if (.@done)
break;
}
return .@award_cutin$;
}
OnInit:
.npc$ = "[^808080 " + strnpcinfo(1) + " ^000000]";
.zeny_required = 1; // 1 = yes / 0 = no
.zeny_amt_need = 100000; // zeny amount needed
setarray .item_cutin$[0], "1s_2", "1s_3", "1s_4", "1s_5", "1s_6", "1s_7", "1s_8", "2s_2", "2s_3", "2s_4", "2s_5", "2s_6", "2s_7", "3s_2", "3s_3", "3s_4", "3s_5", "3s_6", "4s_2", "4s_3", "4s_4", "4s_5", "5s_2", "5s_3", "5s_4", "6s_2", "6s_3", "7s_2";
setarray .item_reward[0], 501, 502, 503, 504, 505, 506, 507, 501, 502, 503, 504, 505, 506, 507, 501, 502, 503, 504, 505, 506, 507, 501, 502, 503, 504, 505, 506, 507;
end;
}
You have to set the rewards properly
setarray .item_cutin$[0], "1s_2", "1s_3", "1s_4", "1s_5", "1s_6", "1s_7", "1s_8", "2s_2", "2s_3", "2s_4", "2s_5", "2s_6", "2s_7", "3s_2", "3s_3", "3s_4", "3s_5", "3s_6", "4s_2", "4s_3", "4s_4", "4s_5", "5s_2", "5s_3", "5s_4", "6s_2", "6s_3", "7s_2";
setarray .item_reward[0], 501, 502, 503, 504, 505, 506, 507, 501, 502, 503, 504, 505, 506, 507, 501, 502, 503, 504, 505, 506, 507, 501, 502, 503, 504, 505, 506, 507;