I'm making a batch file game (I know it's not really for games). I need to run set /p
to ask the user to choose which option to do while it adds a certain amount to their in game money every second, but I can't figure out how to run it at the same time.
I've tried using it in a for loop, but I can't get it to work.
Here is an example:
:do
::echo choices and ask user which option to do
echo choice 1
echo choice 2
echo choice 3
set /p choice= what to do:
if "%choice%" == "1" goto c1
if "%choice%" == "2" goto c2
if "%choice%" == "3" goto c3
::add money
set /a "money=%money%+10"
::wait one second
ping localhost -n 2 >NUL
::do it all again
goto do
I want it to give them money even if they don't choose an option, so they get their money every second.