I have been trying to make a batch rpg for ever. I just got around to it but I can’t figure out how to make a working money system
Like you buy stuff and it takes money and When you sell stuff you get it or by leveling up.
Help? :S
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
::@echo off
::set /a money=100
::start
::presuming that a taco costs one unit of money
::echo Press 1 for a taco
::set /p item=
::if %money% lss 1 echo you do not have enough money && goto start
::set /a money=money-1
::show
::echo %money%
::pause
::another other choice would be to assign each item of food an amount and compare variables.
@echo off
set /a money=100
:start
::presuming that a taco costs one unit of money
echo you may select the following items: taco : sprite : chicken
set /a taco=1
set /a sprite=2
set /a chicken=3
set /p item=”please type what you want: ”
set /a item=%item%
set /a cost=item
if %money% lss %cost% echo you do not have enough money && goto start
set /a money=money-item
:show
echo %money%
pause
goto start
:: mike