Code: Select all
:ItemBandage
cls
Echo.
echo Are you sure you would like to craft a bandage?
echo.
echo 1) Yes
echo.
echo 2) No
set /p input=
if %input% == 1 goto ItemBandageCheck
if %input% == 2 goto Craft
:ItemBandageCheck
cls
echo.
if %flesh% GEQ 2 goto ItemBandageCraft
if %flesh% LSS 2 goto ItemBandageError
:ItemBandageCraft
cls
echo.
set /a flesh-= 2
set /a bandages+= 1
echo You have succesfully crafted a bandage!
pause >nul
goto Craft
:ItemBandageError
cls
echo.
echo You do not have the required materials to craft this item
pause >nul
goto Craft
My problem arises when I want something crafted from 1x bandage and 1x teeth. These values are stored in two different variables so I'm unsure how to compare it to a number. I tried to do:
Code: Select all
:CraftHealth5
cls
echo.
echo Are you sure you would like to craft a health potion(+5)?
echo -----------------------------------------------------------
echo 1) Yes
echo.
echo 2) No
set /p input=
if %input% == 1 goto CraftHealth5Check
if %input% == 2 goto Craft
:CraftHealth5Check
cls
if %bandages% && %flesh% GEQ 1 goto CraftHealth5Complete
if %bandages% && %flesh% LSS 1 goto CraftHealth5Error
:CraftHealth5Complete
cls
set /a potion1= HealthPotion(+5)
echo You have succesfully crafted a health potion (+5)
pause >nul
goto Craft
:CraftHealth5Error
cls
echo.
echo Error in crafting item, check you have the right amount of materials!
pause >nul
goto craft
Code: Select all
:CraftHealth5
cls
echo.
echo Are you sure you would like to craft a health potion(+5)?
echo -----------------------------------------------------------
echo 1) Yes
echo.
echo 2) No
set /p input=
if %input% == 1 goto CraftHealth5Check
if %input% == 2 goto Craft
:CraftHealth5Check
cls
if %bandages% GEQ 1 goto CraftHealth5Complete.1
if %bandages% LSS 1 goto CraftHealth5Error
:CraftHealthComplete.1
cls
echo.
if %teeth% GEQ 1 goto CraftHealth5Complete
:CraftHealth5Complete
cls
set /a potion1= HealthPotion(+5)
echo You have succesfully crafted a health potion (+5)
pause >nul
goto Craft
:CraftHealth5Error
cls
echo.
echo Error in crafting item, check you have the right amount of materials!
pause >nul
goto craft