Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FTT=[`Flips the table over and gets wrestled to the ground by security`,
- `Flips the table over and makes a run for the exit with a glass of champagne in hand`,
- `Flips the table over and flips off an old lady playing slots whilst being escorted out of the casino`,
- `Flips the table over and yells BINGO as loud as they can`,
- `Flips the table over after realizing this isn’t UNO`,
- `Flips the table over after getting caught with a deck of Pokemon cards up their sleeve`];
- Total=parseInt(Info[1]);
- AceCount=Info[2];
- AceUse=Info[3];
- Add1=parseInt(Info[4]);
- Add2=parseInt(Info[5]);
- Message=Info[6];
- MessageSub=Info[7];
- Dealer=parseInt(Info[8]);
- DealerLastCard=parseInt(Info[9]);
- Game=Info[10];
- DealerAceCount=Info[11];
- DealerAceUse=Info[12];
- WinTotal=0;
- LoseTotal=0;
- TieTotal=0;
- TotalStats=Data.filter(x=>x.split(` `)[10]!=`Null`);
- UserStats=TotalStats.filter(x=>x.split(` `)[0].toLowerCase()==Message.slice(5).toLowerCase());
- FaceCard=[`Ten`,`Jack`,`King`,`Queen`];
- CardSuit=[`Spades`,`Hearts`,`Clubs`,`Diamonds`];
- if(Add1==2)
- {Card1=`Two`}
- else
- if(Add1==3)
- {Card1=`Three`}
- else
- if(Add1==4)
- {Card1=`Four`}
- else
- if(Add1==5)
- {Card1=`Five`}
- else
- if(Add1==6)
- {Card1=`Six`}
- else
- if(Add1==7)
- {Card1=`Seven`}
- else
- if(Add1==8)
- {Card1=`Eight`}
- else
- if(Add1==9)
- {Card1=`Nine`}
- else
- if(Add1==10)
- {Card1=FaceCard[Math.floor(Math.random()*4)]}
- else
- if(Add1==11||Add1==1)
- {Card1=`Ace`};
- if(Add2==2)
- {Card2=`Two`}
- else
- if(Add2==3)
- {Card2=`Three`}
- else
- if(Add2==4)
- {Card2=`Four`}
- else
- if(Add2==5)
- {Card2=`Five`}
- else
- if(Add2==6)
- {Card2=`Six`}
- else
- if(Add2==7)
- {Card2=`Seven`}
- else
- if(Add2==8)
- {Card2=`Eight`}
- else
- if(Add2==9)
- {Card2=`Nine`}
- else
- if(Add2==10)
- {Card2=FaceCard[Math.floor(Math.random()*4)]}
- else
- if(Add2==11||Add2==1)
- {Card2=`Ace`};
- if(DealerLastCard==2)
- {DealerCard=`Two`}
- else
- if(DealerLastCard==3)
- {DealerCard=`Three`}
- else
- if(DealerLastCard==4)
- {DealerCard=`Four`}
- else
- if(DealerLastCard==5)
- {DealerCard=`Five`}
- else
- if(DealerLastCard==6)
- {DealerCard=`Six`}
- else
- if(DealerLastCard==7)
- {DealerCard=`Seven`}
- else
- if(DealerLastCard==8)
- {DealerCard=`Eight`}
- else
- if(DealerLastCard==9)
- {DealerCard=`Nine`}
- else
- if(DealerLastCard==10)
- {DealerCard=FaceCard[Math.floor(Math.random()*4)]}
- else
- if(DealerLastCard==11||DealerLastCard==1)
- {DealerCard=`Ace`};
- CardSuit1=CardSuit[Math.floor(Math.random()*4)];
- CardSuit2=CardSuit[Math.floor(Math.random()*4)];
- DealerCardSuit=CardSuit[Math.floor(Math.random()*4)];
- R=`If you are reading this please contact me on twitch @potatoeaterlove`;
- if(Message==`Help`)
- {R=`Please put one of the following after the command: (Help,Deal,Hit,Stay,Stats {@UserName,All,Total})`};
- if(Message==`Deal`)
- {if(Total==21)
- {if(Game==`Win`)
- {R=`You get dealt a ${Card1} of ${CardSuit1} and a ${Card2} of ${CardSuit2} getting 21 while the dealer got ${Dealer} Congratulations you won!!!`}
- else
- if(Game==`Tie`)
- {R=`You get dealt a ${Card1} of ${CardSuit1} and a ${Card2} of ${CardSuit2} getting 21 the dealer also got 21 you tied.`}}
- else
- if((Add1==Add2||Add2!=1)&&(Card1==Card2))
- {R=`You get dealt a pair of ${Card1}s bringing your total to ${Total}.`}
- else
- if(Add1==10&&Add2==10&&Card1!=Card2)
- {R=`You get dealt a ${Card1} of ${CardSuit1} and a ${Card2} of ${CardSuit2} bringing you to 20.`}
- else
- {R=`You get dealt a ${Card1} of ${CardSuit1} and a ${Card2} of ${CardSuit2} bringing you to ${Total}.`}};
- if(Message==`NoDeal`)
- {R=`You already have a game of cards going silly.`};
- if(Message==`Hit`||Message==`Check`)
- {if(Total==21)
- {if(Game==`Win`)
- {R=`You get dealt a ${Card1} of ${CardSuit1} getting you 21 while the dealer got ${Dealer} congratulations you won!!!`}
- else
- if(Game==`Tie`)
- {R=`You get dealt a ${Card1} of ${CardSuit1} getting 21 the dealer also got 21 you tied.`}}
- else
- if(Total>21)
- {R=`You get dealt a ${Card1} of ${CardSuit1} bringing you to ${Total} you lost.`}
- else
- if(Total<21)
- {R=`You get dealt a ${Card1} of ${CardSuit1} bringing you to ${Total}.`}};
- if(Message==`NoHit`)
- {R=`You don’t have a hand of cards yet try typing “deal” after the command`};
- if(Message==`Over`)
- {R=`You can’t hit your over 21 already.`};
- if(Message==`Stay`)
- {if(Game==`Win`)
- {if(DealerLastCard>11)
- {R=`The dealer has ${Dealer} you win with ${Total}!`}
- else
- if(DealerLastCard<=11)
- {R=`The dealer draws a ${DealerCard} of ${DealerCardSuit} bringing their total to ${Dealer} while you have ${Total} you win!`}}
- else
- if(Game==`Tie`)
- {if(DealerLastCard>11)
- {R=`The dealer has ${Dealer} you tie with ${Total}.`}
- else
- if(DealerLastCard<=11)
- {R=`The dealer draws a ${DealerCard} of ${DealerCardSuit} bringing their total to ${Dealer} you have ${Total} you tie.`}}
- else
- if(Game==`Lose`)
- {if(DealerLastCard>11)
- {R=`The dealer has ${Dealer} you lost with ${Total}!`}
- else
- if(DealerLastCard<=11)
- {R=`The dealer draws a ${DealerCard} of ${DealerCardSuit} bringing their total to ${Dealer} you have ${Total} you lost.`}}};
- if(Message==`NoStay`)
- {R=`You can't stay you don’t have any cards!`};
- if(Message.includes(`Stats`))
- {if(Message==`AllStats`)
- {for(i=0;i<TotalStats.length;i++)
- {GameCheck=TotalStats[i].split(` `)[10];
- if(GameCheck==`Win`)
- {WinTotal++}
- else
- if(GameCheck==`Lose`)
- {LoseTotal++}
- else
- if(GameCheck==`Tie`)
- {TieTotal++}};
- R=`${WinTotal} total game${WinTotal==1?``:`s`} won, ${TieTotal} total game${TieTotal==1?``:`s`} tied, and ${LoseTotal} total game${LoseTotal==1?``:`s`} lost to Nightbot.`}
- else
- if(UserStats.length>=1)
- {for(i=0;i<UserStats.length;i++)
- {GameCheck=UserStats[i].split(` `)[10];
- if(GameCheck==`Win`)
- {WinTotal++}
- else
- if(GameCheck==`Lose`)
- {LoseTotal++}
- else
- if(GameCheck==`Tie`)
- {TieTotal++}};
- R=`@${Message.slice(5,6).toUpperCase()+Message.slice(6,Message.length)} has ${WinTotal} win${WinTotal==1?``:`s`}, ${TieTotal} tie${TieTotal==1?``:`s`}, and ${LoseTotal} loss${LoseTotal==1?``:`es`} against nightbot.`}
- else
- {R=`@${Message.slice(5,6).toUpperCase()+Message.slice(6,Message.length)} has not played before or their name is typed incorrectly.`}};
- if(Message==`Flip`)
- {R=`${User} ${FTT[Math.floor(Math.random()*FTT.length)]}`};
- if(Message==`TooMuch`)
- {R=`Please only put up to 2 messages after “!bj”`};
- if(Message==`Error`)
- {R=`“${MessageSub}” is not an acceptable argument.`};
- R
Add Comment
Please, Sign In to add comment