Computing Staff
  • 0

How Do I Make A Money System For A Batch RPG?

  • 0

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

Share

1 Answer

  1. ::@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

    • 0