Need some help with this script, credit to Peopleperson49 for the original script. I've edited abit so that it would give out coins instead of zeny.
What I can't seem to get is to make the jackpot amount more than 10mil zeny. and if it gets past 10.1mil it will reset to 0 zeny. There seems to be a limit to the jackpot amount but i cant seem to find it.
mall01,78,105,5 script Jackpot [1] 2_SLOT_MACHINE,{
set @mithrilcoincounter,0;
set @goldcoincounter,0;
set @silvercoincounter,0;
set @bronzecoincounter,0;
if($JackpotNumberOne<=0||!$JackpotNumberOne) { set $JackpotNumberOne,rand(1,100000); }
mes "[Jackpot]";
mes "Hi there, feeling lucky ?";
goto JackpotStart;
close;
JackpotStart:
next;
mes "[Jackpot]";
mes "A random number from ^FF00001^000000 to ^FF0000100,000^000000 has been generated, and first person to guess the correct number wins the total amount in the Jackpot!";
next;
mes "[Jackpot]";
mes "Each guess costs you ^FF000010,000^000000 zeny that will be put into the Jackpot.";
next;
mes "[Jackpot]";
mes "Total Jackpot : ^FF0000"+$JackpotAmount+"z^000000";
if(getgmlevel()>=99) { mes "I see you're a GM, the correct number is ^880000"+$JackpotNumberOne+"^000000.";
switch(prompt("Set Jackpot:Ignore")) {
case 1:
next;
mes "[Jackpot]";
mes "How much should the Jackpot be?";
input $JackpotAmount;
set $JackpotAmount,$JackpotAmount;
next;
mes "[Jackpot]";
mes "Wanna play a game?";
goto JackpotGame;
case 2:
next;
mes "[Jackpot]";
mes "Alright, carry on!";
next;
mes "[Jackpot]";
mes "Wanna play a game?";
goto JackpotGame;
case 255:
mes "[Jackpot]";
mes "Alright, carry on!";
close;
}
}
goto JackpotGame;
JackpotGame:
switch(prompt("Participate:Nevermind")) {
case 1:
next;
if(Zeny<10000) { mes "[Jackpot]"; mes "You do not have 10,000z"; close; }
set Zeny,Zeny-10000;
set $JackpotAmount,$JackpotAmount+10000;
mes "[Jackpot]";
mes "You have chipped ^00880010,000z^000000 into the Jackpot!";
mes "Total Jackpot : ^FF0000"+$JackpotAmount+"z^000000";
next;
mes "[Jackpot]";
mes "If your guess is not correct, you will lose the zeny you chipped in, and will need to try again!";
mes "However, the pot will be that much bigger the next time anyone plays!";
next;
mes "[Jackpot]";
mes "Please enter the number that you think will win the Jackpot!";
mes "It is between numbers ^FF00001^000000 and ^FF0000100,000^000000.";
next;
input .@JackpotPick;
if(.@JackpotPick<1||.@JackpotPick>100000) { next; mes "[Jackpot]"; mes "You must enter a number between ^FF00001^000000 and ^FF0000100,000^000000. I do not give refunds!"; goto JackpotStart; close; }
mes "["+strcharinfo(0)+"]";
mes "My number is ^880000"+.@JackpotPick+"^000000!";
next;
if(.@JackpotPick!=$JackpotNumberOne) { mes "[Jackpot]"; mes "You guessed the wrong number."; mes "You can always try again!"; goto JackpotStart; close; }
mes "[Jackpot]";
mes "You guessed the correct number!";
next;
mes "[Jackpot]";
mes "Congratulations! You have won the Jackpot of ^008800"+$JackpotAmount+" Zeny^000000!";
set @coinamount,$JackpotAmount;
next;
goto JackpotGenerator;
case 2:
next;
mes "[Jackpot]";
mes "Please come again!";
close;
case 255:
mes "[Jackpot]";
mes "Please come again!";
close;
}
JackpotGenerator:
if (@coinamount>=10000000) {
goto JackpotMithrilCounter;
}
else if (@coinamount>=1000000) {
goto JackpotGoldCounter;
}
else if (@coinamount>=100000) {
goto JackpotSilverCounter;
}
else if (@coinamount>=10000) {
goto JackpotBronzeCounter;
}
getitem 674,@mithrilcoincounter;
getitem 29999,@goldcoincounter;
getitem 29998,@silvercoincounter;
getitem 673,@bronzecoincounter;
goto JackpotAnnounce;
JackpotMithrilCounter:
if (@coinamount>=10000000) {
set @coinamount,(@coinamount)-10000000;
set @mithrilcoincounter,(@mithrilcoincounter)+1;
goto JackpotGenerator;
}
else { goto JackpotGenerator; }
JackpotGoldCounter:
if (@coinamount>=1000000) {
set @coinamount,(@coinamount)-1000000;
set @goldcoincounter,(@goldcoincounter)+1;
goto JackpotGenerator;
}
else { goto JackpotGenerator; }
JackpotSilverCounter:
if (@coinamount>=100000) {
set @coinamount,(@coinamount)-100000;
set @silvercoincounter,(@silvercoincounter)+1;
goto JackpotGenerator;
}
else { goto JackpotGenerator; }
JackpotBronzeCounter:
if (@coinamount>=10000) {
set @coinamount,(@coinamount)-10000;
set @bronzecoincounter,(@bronzecoincounter)+1;
goto JackpotGenerator;
}
else { goto JackpotGenerator; }
JackpotAnnounce:
announce "[ Jackpot ]: "+strcharinfo(0)+" has won the Jackpot of "+$JackpotAmount+" zeny !!",0x76EE00;
close2;
announce "[ Jackpot ]: Wanna be a winner like "+strcharinfo(0)+"?",0x76EE00;
set $JackpotNumberOne,0;
sleep2 5000;
announce "[ Jackpot ]: Come down to Clouds Casino at North of Ruheluft now!",0x76EE00;
set $JackpotAmount,0;
end;
}
Need some help with this script, credit to Peopleperson49 for the original script. I've edited abit so that it would give out coins instead of zeny.
What I can't seem to get is to make the jackpot amount more than 10mil zeny. and if it gets past 10.1mil it will reset to 0 zeny. There seems to be a limit to the jackpot amount but i cant seem to find it.
mall01,78,105,5 script Jackpot [1] 2_SLOT_MACHINE,{ set @mithrilcoincounter,0; set @goldcoincounter,0; set @silvercoincounter,0; set @bronzecoincounter,0; if($JackpotNumberOne<=0||!$JackpotNumberOne) { set $JackpotNumberOne,rand(1,100000); } mes "[Jackpot]"; mes "Hi there, feeling lucky ?"; goto JackpotStart; close; JackpotStart: next; mes "[Jackpot]"; mes "A random number from ^FF00001^000000 to ^FF0000100,000^000000 has been generated, and first person to guess the correct number wins the total amount in the Jackpot!"; next; mes "[Jackpot]"; mes "Each guess costs you ^FF000010,000^000000 zeny that will be put into the Jackpot."; next; mes "[Jackpot]"; mes "Total Jackpot : ^FF0000"+$JackpotAmount+"z^000000"; if(getgmlevel()>=99) { mes "I see you're a GM, the correct number is ^880000"+$JackpotNumberOne+"^000000."; switch(prompt("Set Jackpot:Ignore")) { case 1: next; mes "[Jackpot]"; mes "How much should the Jackpot be?"; input $JackpotAmount; set $JackpotAmount,$JackpotAmount; next; mes "[Jackpot]"; mes "Wanna play a game?"; goto JackpotGame; case 2: next; mes "[Jackpot]"; mes "Alright, carry on!"; next; mes "[Jackpot]"; mes "Wanna play a game?"; goto JackpotGame; case 255: mes "[Jackpot]"; mes "Alright, carry on!"; close; } } goto JackpotGame; JackpotGame: switch(prompt("Participate:Nevermind")) { case 1: next; if(Zeny<10000) { mes "[Jackpot]"; mes "You do not have 10,000z"; close; } set Zeny,Zeny-10000; set $JackpotAmount,$JackpotAmount+10000; mes "[Jackpot]"; mes "You have chipped ^00880010,000z^000000 into the Jackpot!"; mes "Total Jackpot : ^FF0000"+$JackpotAmount+"z^000000"; next; mes "[Jackpot]"; mes "If your guess is not correct, you will lose the zeny you chipped in, and will need to try again!"; mes "However, the pot will be that much bigger the next time anyone plays!"; next; mes "[Jackpot]"; mes "Please enter the number that you think will win the Jackpot!"; mes "It is between numbers ^FF00001^000000 and ^FF0000100,000^000000."; next; input .@JackpotPick; if(.@JackpotPick<1||.@JackpotPick>100000) { next; mes "[Jackpot]"; mes "You must enter a number between ^FF00001^000000 and ^FF0000100,000^000000. I do not give refunds!"; goto JackpotStart; close; } mes "["+strcharinfo(0)+"]"; mes "My number is ^880000"+.@JackpotPick+"^000000!"; next; if(.@JackpotPick!=$JackpotNumberOne) { mes "[Jackpot]"; mes "You guessed the wrong number."; mes "You can always try again!"; goto JackpotStart; close; } mes "[Jackpot]"; mes "You guessed the correct number!"; next; mes "[Jackpot]"; mes "Congratulations! You have won the Jackpot of ^008800"+$JackpotAmount+" Zeny^000000!"; set @coinamount,$JackpotAmount; next; goto JackpotGenerator; case 2: next; mes "[Jackpot]"; mes "Please come again!"; close; case 255: mes "[Jackpot]"; mes "Please come again!"; close; } JackpotGenerator: if (@coinamount>=10000000) { goto JackpotMithrilCounter; } else if (@coinamount>=1000000) { goto JackpotGoldCounter; } else if (@coinamount>=100000) { goto JackpotSilverCounter; } else if (@coinamount>=10000) { goto JackpotBronzeCounter; } getitem 674,@mithrilcoincounter; getitem 29999,@goldcoincounter; getitem 29998,@silvercoincounter; getitem 673,@bronzecoincounter; goto JackpotAnnounce; JackpotMithrilCounter: if (@coinamount>=10000000) { set @coinamount,(@coinamount)-10000000; set @mithrilcoincounter,(@mithrilcoincounter)+1; goto JackpotGenerator; } else { goto JackpotGenerator; } JackpotGoldCounter: if (@coinamount>=1000000) { set @coinamount,(@coinamount)-1000000; set @goldcoincounter,(@goldcoincounter)+1; goto JackpotGenerator; } else { goto JackpotGenerator; } JackpotSilverCounter: if (@coinamount>=100000) { set @coinamount,(@coinamount)-100000; set @silvercoincounter,(@silvercoincounter)+1; goto JackpotGenerator; } else { goto JackpotGenerator; } JackpotBronzeCounter: if (@coinamount>=10000) { set @coinamount,(@coinamount)-10000; set @bronzecoincounter,(@bronzecoincounter)+1; goto JackpotGenerator; } else { goto JackpotGenerator; } JackpotAnnounce: announce "[ Jackpot ]: "+strcharinfo(0)+" has won the Jackpot of "+$JackpotAmount+" zeny !!",0x76EE00; close2; announce "[ Jackpot ]: Wanna be a winner like "+strcharinfo(0)+"?",0x76EE00; set $JackpotNumberOne,0; sleep2 5000; announce "[ Jackpot ]: Come down to Clouds Casino at North of Ruheluft now!",0x76EE00; set $JackpotAmount,0; end; }Edited by canditwShare this post
Link to post
Share on other sites