Limestone Posted June 27, 2012 Posted June 27, 2012 can i request this npc for example: i'll bet for 100k z, then i will get random zennies and items like, 4 elunium, 4 oridecon, 250k z, 500k, and the jackpot prize is 1 million zeny. then the npc will announce if the player gets the jackpot prize.. thank you. Quote
deathscythe13 Posted June 27, 2012 Posted June 27, 2012 (edited) prontera,156,180,4 script Event NPC 100,{ mes "Would you like to play ? "; next; if(select("Yes:No") == 2) close; if(Zeny < 100000) { mes "Your zeny is not enough"; close; } set Zeny, Zeny-100000; next; mes "...."; next; set .@rand, rand(1,100); if(.@rand < 2 ) { // Jackpot Prize 1% win mes "Congratulations you won the jackpot!!!"; set Zeny, Zeny+1000000; } else if(.@rand < 5) { Other Prize 5% win mes "Congratulations you won consolation prize!!"; switch(rand(4)) { case 0: getitem 985,4; break; case 1: getitem 984,4; break; case 2: set Zeny,Zeny+250000; break; case 3: set Zeny,Zeny+500000; break; } } else { mes "Too bad you didn't win anything!!"; } close; } Edited June 27, 2012 by deathscythe13 Quote
Limestone Posted June 28, 2012 Author Posted June 28, 2012 @deathscythe13 thanks! btw.. how can i change the rate of the jackpot prize? Quote
Euphy Posted June 28, 2012 Posted June 28, 2012 set .@rand, rand(1,100); if(.@rand < 2 ) { // Jackpot Prize 1% win Quote
Limestone Posted June 28, 2012 Author Posted June 28, 2012 ok it fixed.. but i want to make the prize like this: 60% = 2 Ori and 2 Elu 40% = 5 Ori and 5 Elu 30% = 100k z, 25% = 200k z 15% = 300k z 5% = 1m z Quote
Rikimaru Posted June 28, 2012 Posted June 28, 2012 Then you'll have to edit this part of the Script : if(.@rand < 2 ) { // Jackpot Prize 1% win mes "Congratulations you won the jackpot!!!"; set Zeny, Zeny+1000000; } else if(.@rand < 5) { Other Prize 5% win mes "Congratulations you won consolation prize!!"; switch(rand(4)) { case 0: getitem 985,4; break; case 1: getitem 984,4; break; case 2: set Zeny,Zeny+250000; break; case 3: set Zeny,Zeny+500000; break; } } else { mes "Too bad you didn't win anything!!"; } close; } to this part: if(.@rand < 61) { if(.@rand < 41) { if(.@rand < 31) { if(.@rand < 26) { if(.@rand < 16) { if(.@rand < 6) { mes "Congratulations you won the Jackpot!!"; set Zeny, Zeny+1000000; close; } mes "Congratulations you won consolation prize!!"; set Zeny, Zeny+300000; close; } mes "Congratulations you won consolation prize!!"; set Zeny, Zeny+200000; close; } mes "Congratulations you won consolation prize!!"; set Zeny, Zeny+100000; close; } mes "Congratulations you won consolation prize!!"; getitem 984,5; getitem 985,5; close; } mes "Congratulations you won consolation prize!!"; getitem 984,2; getitem 985,2; close; } else { mes "Too bad,you didn't win anything!!"; close; } Quote
Question
Limestone
can i request this npc for example:
i'll bet for 100k z, then i will get random zennies and items like, 4 elunium, 4 oridecon, 250k z, 500k, and the jackpot prize is 1 million zeny.
then the npc will announce if the player gets the jackpot prize.. thank you.
5 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.