Guest User

Untitled

a guest
Mar 5th, 2018
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. @echo off
  3. Set Bank=100000000
  4. GOTO STAKE
  5.  
  6. :rand
  7. set /a ret = %random% %% %2
  8. if %ret% LSS %1 set /a ret += %1
  9. If %ret% == 0 GOTO WIN
  10. If %ret% == 1 GOTO LOSE
  11.  
  12. :TOOHIGH
  13. Echo Please enter a value under %Bank%gp.
  14. Echo:
  15. GOTO STAKE
  16.  
  17. :CLEANED
  18. Echo:
  19. Echo You have been cleaned.
  20. Echo Press any key to exit
  21. pause > null
  22. exit
  23.  
  24.  
  25. :WIN
  26. set /a Bank=%CurrentBet%+%Bank%
  27. Echo You have won %CurrentBet%gp.
  28. If %Bank% LSS 1 GOTO CLEANED
  29. Echo:
  30. GOTO STAKE
  31.  
  32. :LOSE
  33. set /a Bank=%Bank%-%CurrentBet%
  34. Echo You have lost %CurrentBet%gp.
  35. If %Bank% LSS 1 GOTO CLEANED
  36. Echo:
  37. GOTO STAKE
  38.  
  39. :STAKE
  40. set CurrentBet=
  41. set /P CurrentBet=You have %Bank%gp left. How much would you like to stake?: %=%
  42. If %CurrentBet% GTR %Bank% GOTO TOOHIGH
  43. Call :rand 0 2
Add Comment
Please, Sign In to add comment