Hi everyone, i got the script of @Haruka Mayumi Lotti npc it works fine just getting stuck on this part when you have enough zeny to play the lotti, i wish it would just tell the player that he/she doesn't have enough zeny or enough item to play the lotti game.
prontera,170,181,3 script Lotti Girl 714,{
mes "[Lotti Girl]";
mes "Hello Sir! Are you out";
mes "shopping in the city?!";
next;
mes "[Lotti Girl]";
mes "I'm Lotti! I'll exchange cool";
mes "random prizes for every";
if(.LottoID && .LottoAmt)
mes "^ff0000"+.LottoAmt+" "+getitemname(.LottoID)+"^000000.";
if(.ZenyPay)
mes "^ff0000"+callfunc("F_InsertComma",.ZenyPay)+"z";
next;
mes "[Lotti Girl]";
if(getarraysize(.P1)<4){
mes "Our Grand prize is:";
mes "^ff0000"+.P1[2]+" "+getitemname(.P1[1])+"^000000";
} else {
mes "Random Grand prize:";
for(.@i=1;.@i<getarraysize(.P1);.@i+=2)
mes "^ff0000"+.P1[.@i+1]+" "+getitemname(.P1[.@i])+"^000000";
}
if(getarraysize(.P2)<4){
mes "Special prize is:";
mes "^ff0000"+.P2[2]+" "+getitemname(.P2[1])+"^000000";
} else {
mes "Random Special prize:";
for(.@i=1;.@i<getarraysize(.P2);.@i+=2)
mes "^ff0000"+.P2[.@i+1]+" "+getitemname(.P2[.@i])+"^000000";
}
next;
mes "[Lotti Girl]";
mes "You can still get random item";
mes "if you failed to get the grand";
mes "prize and special prizes.";
if(.LottoID && .LottoAmt && (countitem(.LottoID) < .LottoAmt))
close;
if(.Zeny && Zeny < .Zeny)
close;
next;
if(select("Deal me in!:No way...")==2)
close;
L_Roll:
mes "[Lotti Girl]";
mes "Here we go...";
if(.LottoID && .LottoAmt)
delitem .LottoID,.LottoAmt;
if(.ZenyPay) Zeny -= .ZenyPay;
set .@i, rand(1,.Total);
set .@rand,rand(10000);
for(.@j=.Total;.@j>=1;.@j--)
if( getd(".P"+.@j+"[0]") >= .@rand)
.@i = .@j;
next;
if ( .@rand > getd(".P"+.@i+"[0]")){
.@iid = rand(getarraysize(.Default)/2);
setarray .@get,.Default[(.@iid*2)],.Default[((.@iid*2)+1)];
} else {
.@iid = rand(getarraysize(getd(".P"+.@i))/2);
setarray .@get,getd(".P"+.@i+"["+((.@iid*2)+1)+"]"),getd(".P"+.@i+"["+((.@iid*2)+2)+"]");
}
getitem .@get[0],.@get[1];
if(inarray(.AnnouncedID,.@get) >=0 )
announce "Congratulations! "+strcharinfo(0)+" just received "+getitemname(.@get[0])+" x "+.@get[1]+" from Lotti Girl ("+.map$+" "+.x+" "+.y+")!",0;
specialeffect2 248;
if(.LottoID && .LottoAmt && (countitem(.LottoID) < .LottoAmt))
close;
if(.Zeny && Zeny < .Zeny)
close;
next;
mes "[Lotti Girl]";
mes "Want to roll again?";
if(select("Roll again:Nope, No luck!")==1){
clear();
goto L_Roll;
}
close;
OnInit: //No need to edit the main script. all editable are here.
.ZenyPay = 100000; //Zeny to Pay [0 = Disable]
.LottoID = 0; //ItemID to Roll [0 = Disable]
.LottoAmt = 0; //Amount of LottoID Per Roll[0 = Disable]
set .Total,4;
setarray .AnnouncedID,501,502,512,513; //To reduce announcement. let's not announce common items.
//setarray .P#[0],<% chance(1-10000)>,<ItemID>,<Amount>
setarray .P1[0],100,501,1;//Grand Prize
setarray .P2[0],1000,502,1,512,2,513,3;//Special Prizes
setarray .P3[0],5000,503,1;
setarray .P4[0],7500,504,1,514,4;
setarray .Default[0],505,5,506,1;
getmapxy(.map$,.x,.y,BL_NPC);end;}
Question
LewL
Hi everyone, i got the script of @Haruka Mayumi Lotti npc it works fine just getting stuck on this part when you have enough zeny to play the lotti, i wish it would just tell the player that he/she doesn't have enough zeny or enough item to play the lotti game.
Link to comment
Share on other sites
1 answer 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.