L_Play:
mes "[Dealer]";
mes "Please place your bets...";
next;
menu "10Tickets",M_1a, "50Tickets",M_1b, "100Tickets",M_1c, "500Tickets",M_1d, "Too rich for my blood....",M_End;
M_1a:
if(countitem(19252)<10) goto sL_NotEnuf;
[color=#ff0000]set @bet, 10;[/color]
goto L_Cont0;
M_1b:
if(countitem(19252)<50) goto sL_NotEnuf;
[color=#ff0000]set @bet, 50;[/color]
goto L_Cont0;
M_1c:
if(countitem(19252)<100) goto sL_NotEnuf;
[color=#ff0000]set @bet, 100;[/color]
goto L_Cont0;
M_1d:
if(countitem(19252)<500) goto sL_NotEnuf;
[color=#ff0000]set @bet, 500;[/color]
goto L_Cont0;
sL_NotEnuf:
mes "[Dealer]";
mes "I'm sorry but you don't have enough zeny to make that bet.";
close;
L_Cont0:
mes "(the cards are being dealt)";
next;
deletearray $@card[0],13;
set @dealerTurn, 0;
set @numP, 0;
set @numD, 0;
set @pAce, 0;
set @dAce, 0;
callsub sF_GetCards, @numP, @playCard[@numP], @playCard$[@numP], @pAce;
callsub sF_GetCards, @numP, @playCard[@numP], @playCard$[@numP], @pAce;
callsub sF_GetCards, @numD, @dealCard[@numD], @dealCard$[@numD], @dAce;
callsub sF_GetCards, @numD, @dealCard[@numD], @dealCard$[@numD], @dAce;
//==============
L_Start:
callsub sF_GetTot;
mes "- Here are the ^FF5533DEALER'S^000000 cards:";
if (@numD==2) callsub sF_D2cards;
if (@numD==3) callsub sF_D3cards;
if (@numD==4) callsub sF_D4cards;
if (@numD==5) callsub sF_D5cards;
mes " The DEALER has: ^FF5533"+@dealTot+"^000000";
mes " ";
mes "- Here are ^5533FFYOUR^000000 cards:";
if (@numP==2) callsub sF_P2cards;
if (@numP==3) callsub sF_P3cards;
if (@numP==4) callsub sF_P4cards;
if (@numP==5) callsub sF_P5cards;
if(@pAce != 1 || @playTot == 21) mes " YOU have: ^5533FF" +@playTot+ "^000000";
if(@pAce == 1 && @playTot != 21) mes " You have: ^5533FF" +@playTot+ "^000000, or ^5533FF" +(@playTot-10)+ "^000000";
next;
if(@playTot==21 && @dealTot==21) goto sL_Push;
if(@numP==2 && @playTot == 21) goto sL_Win;
if(@numD==2 && @dealTot == 21) goto sL_Lose;
if(@playTot > 21) goto sL_Lose;
if(@dealTot > 21) goto sL_Win;
if(@numP==2 && @dealerTurn==0) menu "Hit me(pull)",M_Hit, "Stay",M_Stay, "Double Down",M_Double;
if(@dealerTurn == 0) menu "Hit me(pull)",M_Hit, "Stay",M_Stay;
M_Stay:
mes "[Dealer]";
if(@playTot < 13) goto sL_PlayToLow;
if(@dealTot > 16) mes "The Dealer stays.";
if(@dealTot > 16 || @numD == 5) goto L_Check;
mes "The Dealer is going to pull";
next;
callsub sF_GetCards, @numD, @dealCard[@numD], @dealCard$[@numD], @dAce;
set @dealerTurn, 1;
goto L_Start;
sL_PlayToLow:
mes "I'm sorry but you do not have a high enough total to stay. You must pull.";
next;
goto M_Hit;
M_Hit:
if(@numP == 5) goto M_Stay;
callsub sF_GetCards, @numP, @playCard[@numP], @playCard$[@numP], @pAce;
goto L_Start;
M_Double:
mes "[Dealer]";
mes "Player has chosen to Double Down. You're current bet will be";
mes "doubled, and you will only be able to pull 1 extra card.";
next;
set @dealerTurn, 1;
set @bet, @bet*2;
callsub sF_GetCards, @numP, @playCard[@numP], @playCard$[@numP], @pAce;
goto L_Start;
//=============
L_Check:
next;
if(@playTot < @dealTot) goto sL_Lose;
if(@playTot == @dealTot) goto sL_Push;
sL_Win:
mes "[Dealer]";
mes "Congratulations, you've won!";
next;
[color=#ff0000]getitem 7227, + @bet;[/color]
goto L_Play;
sL_Lose:
mes "[Dealer]";
mes "I'm sorry but you've lost.";
[color=#ff0000]delitem 7227, - @bet;[/color]
next;
goto L_Play;
sL_Push:
mes "[Dealer]";
mes "Its a push. You tied with the Dealer.";
next;
goto L_Play;
please help me i think those in color red are my error
im win but. the items i bet doesn't multiply and deleting
Question
PewN
please help me i think those in color red are my error
im win but. the items i bet doesn't multiply and deleting
Edited by ArcencielCodeboxed
Link to comment
Share on other sites
6 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.