Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- Set Bank=100000000
- GOTO STAKE
- :rand
- set /a ret = %random% %% %2
- if %ret% LSS %1 set /a ret += %1
- If %ret% == 0 GOTO WIN
- If %ret% == 1 GOTO LOSE
- :TOOHIGH
- Echo Please enter a value under %Bank%gp.
- Echo:
- GOTO STAKE
- :CLEANED
- Echo:
- Echo You have been cleaned.
- Echo Press any key to exit
- pause > null
- exit
- :WIN
- set /a Bank=%CurrentBet%+%Bank%
- Echo You have won %CurrentBet%gp.
- If %Bank% LSS 1 GOTO CLEANED
- Echo:
- GOTO STAKE
- :LOSE
- set /a Bank=%Bank%-%CurrentBet%
- Echo You have lost %CurrentBet%gp.
- If %Bank% LSS 1 GOTO CLEANED
- Echo:
- GOTO STAKE
- :STAKE
- set CurrentBet=
- set /P CurrentBet=You have %Bank%gp left. How much would you like to stake?: %=%
- If %CurrentBet% GTR %Bank% GOTO TOOHIGH
- Call :rand 0 2
Add Comment
Please, Sign In to add comment