バランス変数がバッチファイルが正しく
「バル」である私はそれを失う/各勝利で更新したいが、それは私ができるように、別のファイルに設定された値を持っている100 に滞在し続けるのバランスを更新しませんuは%bal%
のベース開始値があるべき100
@echo off
cls
:menu
echo hello and welcome to Gamble bot 2000!
echo you start off with 100 credits and as you climb
echo you can start to place larger and better bets!
echo do your best to not run out of money or you will
echo have to start over
echo have fun :)
echo .
echo Version alpha 0.2.1
echo .
echo To start type "start" and hit enter
set /p menu=
if %menu% == start (
goto start)
goto sry1
:sry1
cls
echo you typed an invalid response please try agian.
pause
goto menu
:start
cls
set /p bal=<value.txt
echo the game is simple guess a number between 0 and 9
echo for 3 instance for example 123, 456, 789, 111 and so on
echo a dice will roll and if you guess the number you get a
echo winning based on the amount of numbers you guessed correct
echo .
echo 1 numbers gives you a 2x win
echo 2 numbers gives you a 3x win
echo 3 numbers gives you a 4x win
echo and of course no numbers means u lost
pause
goto g1
:g1
cls
set g1=nul
set g2=nul
set g3=nul
Echo please make your 1st number selection!!!
set /p g1=
goto g2
:g2
cls
Echo please make your 2nd number selection!!!
set /p g2=
goto g3
:g3
cls
Echo please make your 3rd number selection!!!
set /p g3=
goto bet
:bet
cls
echo place your bet.
echo your current balance is %bal%c
set /p bet=
if %bet% GTR %bal% (
goto inf)
goto num1
:inf
cls
echo you dont have enough credits for that bet, please choose another bet!
pause
goto bet
:num1
cls
echo Getting results, please wait.
set /a g11=%random% %% 10
goto num2
:num2
cls
echo Getting results, please wait..
set /a g22=%random% %% 10
goto num3
:num3
cls
echo Getting results, please wait...
set /a g33=%random% %% 10
goto results
:results
if %g1%==%g11% if %g2%==%g22% if %g3%==%g33% goto w3
if not %g1%==%g11% if %g2%==%g22% if %g3%==%g33% goto w2
if %g1%==%g11% if not %g2%==%g22% if %g3%==%g33% goto w2
if %g1%==%g11% if %g2%==%g22% if not %g3%==%g33% goto w2
if not %g1%==%g11% if not %g2%==%g22% if %g3%==%g33% goto w1
if not %g1%==%g11% if %g2%==%g22% if not %g3%==%g33% goto w1
if %g1%==%g11% if not %g2%==%g22% if not %g3%==%g33% goto w1
if not %g1%==%g11% if not %g2%==%g22% if not %g3%==%g33% goto Lose
:w3
cls
set /p win=%bet%*4
set /p %bal%+%win%
echo Congratulations you have guessed all three numbers correctly!
echo the numbers were: %g1%%g2%%g3%!
echo .
echo You have won "%win%" credits!
echo .
echo Your new credit balance is %bal%C
echo .
echo would you like to make another bet?
echo (Y/N)
set /p ha=
if %ha% == y goto g1
if %ha% == n goto save
:w2
cls
set /p win=%bet%*3
set /p %bal%+%win%
echo Congratulations you have guessed two numbers correctly!
echo the numbers were: %g1%%g2%%g3%!
echo .
echo You have won "%win%" credits!
echo .
echo Your new credit balance is %bal%C
echo .
echo would you like to make another bet?
echo (Y/N)
set /p ha=
if %ha% == y goto g1
if %ha% == n goto save
:w1
cls
set /p win=%bet%*2
set /p %bal%+%win%
echo Congratulations you have guessed one correctly!
echo the numbers were: %g1%%g2%%g3%!
echo .
echo You have won "%win%" credits!
echo .
echo Your new credit balance is %bal%C
echo .
echo would you like to make another bet?
echo (Y/N)
set /p ha=
if %ha% == y goto g1
if %ha% == n goto save
:lose
cls
set /p %bal%-%bet%
echo Im sorry but you did not guess any of the numbers correclty.
echo .
echo you have lost %bet% credits
echo .
echo your new credit balance is %bal%C
echo would you like to make another bet?
echo (Y/N)
set /p ha=
if %ha% == y goto g1
if %ha% == n goto save
:save
cls
echo Im sorry but the save mechanic is not yet set up it will be coming
echo in a future update, anyway thanks for playing I hope you had fun!
pause
end
ありがとうございます。今すぐ完全に動作します:D – Heyo13579