@echo off setlocal enabledelayedexpansion title Stocks and Bonds color 0f if not exist %USERPROFILE%\Documents\StocksAndBonds\Saves md %USERPROFILE%\Documents\StocksAndBonds\Saves if not exist %USERPROFILE%\Documents\StocksAndBonds\Highscores.bat ( echo set /a score1=0 > %USERPROFILE%\Documents\StocksAndBonds\Highscores.bat echo set /a score2=0 >> %USERPROFILE%\Documents\StocksAndBonds\Highscores.bat echo set /a score3=0 >> %USERPROFILE%\Documents\StocksAndBonds\Highscores.bat echo set /a score4=0 >> %USERPROFILE%\Documents\StocksAndBonds\Highscores.bat echo set /a score5=0 >> %USERPROFILE%\Documents\StocksAndBonds\Highscores.bat ) set "MarketReview=Welcome to Stocks and Bonds!" set /a GrowthPrice=100 set /a MetroPrice=100 set /a PioneerPrice=100 set /a ShadyPrice=100 set /a StrykerPrice=100 set /a TransportPrice=100 set /a UnitedPrice=100 set /a UraniumPrice=100 set /a ValleyPrice=100 set /a GrowthChange=0 set /a MetroChange=0 set /a PioneerChange=0 set /a ShadyChange=0 set /a StrykerChange=0 set /a TransportChange=0 set /a UnitedChange=0 set /a UraniumChange=0 set /a ValleyChange=0 set /a Cash=5000 set /a Dividends=0 set /a BearBull=1 set /a PlayerCentral=0 set /a PlayerGrowth=0 set /a PlayerMetro=0 set /a PlayerPioneer=0 set /a PlayerShady=0 set /a PlayerStryker=0 set /a PlayerTransport=0 set /a PlayerUnited=0 set /a PlayerUranium=0 set /a PlayerValley=0 set /a CentralPrice=100 set /a Year=0 set GrowthSplit=N set MetroSplit=N set PioneerSplit=N set ShadySplit=N set StrykerSplit=N set TransportSplit=N set UnitedSplit=N set UraniumSplit=N set ValleySplit=N set GrowthBank=N set MetroBank=N set PioneerBank=N set ShadyBank=N set StrykerBank=N set TransportBank=N set UnitedBank=N set UraniumBank=N set ValleyBank=N set /a MarginBalance=0 set /a paymentquantity=0 set /a bankruptcy=0 set /a MarginInterest=0 :MainScreen set /a bankruptcy=1 if %Cash% GTR 0 ( set /a bankruptcy=0 ) if %PlayerCentral% GTR 0 ( set /a bankruptcy=0 ) if %PlayerGrowth% GTR 0 ( set /a bankruptcy=0 ) if %PlayerMetro% GTR 0 ( set /a bankruptcy=0 ) if %PlayerPioneer% GTR 0 ( set /a bankruptcy=0 ) if %PlayerShady% GTR 0 ( set /a bankruptcy=0 ) if %PlayerStryker% GTR 0 ( set /a bankruptcy=0 ) if %PlayerTransport% GTR 0 ( set /a bankruptcy=0 ) if %PlayerUnited% GTR 0 ( set /a bankruptcy=0 ) if %PlayerUranium% GTR 0 ( set /a bankruptcy=0 ) if %PlayerValley% GTR 0 ( set /a bankruptcy=0 ) cls set /a NetWorth=%Cash%+%PlayerGrowth%*%GrowthPrice%+%PlayerCentral%*100+%PlayerMetro%*%MetroPrice%+%PlayerPioneer%*%PioneerPrice%+%ShadyPrice%*%PlayerShady%+%StrykerPrice%*%PlayerStryker%+%PlayerTransport%*%TransportPrice%+%PlayerUnited%*%UnitedPrice%+%UraniumPrice%*%PlayerUranium%+%PlayerValley%*%ValleyPrice%-%MarginBalance% if %bankruptcy%==1 goto Bankruptcy echo Year: %Year% echo Market Review: %MarketReview% echo ---------- echo Company Yield Split? Bankruptcy? Price and Change echo [Central] City Municipal Bonds.............$5 100 echo [Growth] Corporation of America............$1 %GrowthSplit% %GrowthBank% %GrowthPrice% (%GrowthChange%) echo [Metro] Properties, Inc....................$0 %MetroSplit% %MetroBank% %MetroPrice% (%MetroChange%) echo [Pioneer] Mutual Fund......................$4 %PioneerSplit% %PioneerBank% %PioneerPrice% (%PioneerChange%) echo [Shady] Brooks Development.................$7 %ShadySplit% %ShadyBank% %ShadyPrice% (%ShadyChange%) echo [Stryker] Drilling Company.................$0 %StrykerSplit% %StrykerBank% %StrykerPrice% (%StrykerChange%) echo Tri-City [Transport] Company...............$0 %TransportSplit% %TransportBank% %TransportPrice% (%TransportChange%) echo [United] Auto Company......................$2 %UnitedSplit% %UnitedBank% %UnitedPrice% (%UnitedChange%) echo [Uranium] Enterprises, Inc.................$6 %UraniumSplit% %UraniumBank% %UraniumPrice% (%UraniumChange%) echo [Valley] Power and Light Company...........$3 %ValleySplit% %ValleyBank% %ValleyPrice% (%ValleyChange%) echo ---------- echo Your Holdings: echo Net Worth: %NetWorth% echo Cash: $%Cash% (If balance is less than 0, a security MUST be sold to proceed) echo Margin Balance: $%MarginBalance% echo Interest Payment: $%MarginInterest% echo Period Dividends: $%Dividends% echo Central City Municipal Bonds:..............%PlayerCentral% echo Growth Corporation of America:.............%PlayerGrowth% echo Metro Properties, Inc.:....................%PlayerMetro% echo Pioneer Mutual Fund:.......................%PlayerPioneer% echo Shady Brooks Development:..................%PlayerShady% echo Stryker Drilling Company:..................%PlayerStryker% echo Tri-City Transport Company:................%PlayerTransport% echo United Auto Company:.......................%PlayerUnited% echo Uranium Enterprises, Inc.:.................%PlayerUranium% echo Valley Power and Light Company:............%PlayerValley% echo ---------- echo Actions: echo [B]uy echo [M]argin Purchase echo [S]ell echo [F]inish Year echo [I]nformation on Securities echo [P]ay Margin Balance echo [E]xport data echo [L]oad data set /p input= if %input%==B goto Buy if %input%==S goto Sell if %input%==I goto Information if %input%==P goto Payment if %input%==E goto SaveGame if %input%==L goto LoadGame if %input%==M goto Margin if %Cash% LSS 0 goto MainScreen if %input%==F goto MarketCalculator goto MainScreen :MarketCalculator if %Year%==12 goto :EndGame set /a Dividends=0 set ValleySplit=N set UraniumSplit=N set UnitedSplit=N set TransportSplit=N set StrykerSplit=N set ShadySplit=N set PioneerSplit=N set MetroSplit=N set GrowthSplit=N set ValleyBank=N set UraniumBank=N set UnitedBank=N set TransportBank=N set StrykerBank=N set ShadyBank=N set PioneerBank=N set MetroBank=N set GrowthBank=N set /a Year+=1 set /a "BearBull=%random%%%2" set /a MarketRoll=%random%%%11 + 2 set /a Event=%random%%%36 if %BearBull% == 1 goto BearCalculator if %BearBull% == 0 goto BullCalculator :BearCalculator if %MarketRoll%==2 ( set /a GrowthChange=12 set /a MetroChange=14 set /a PioneerChange=13 set /a ShadyChange=10 set /a StrykerChange=10 set /a TransportChange=20 set /a UnitedChange=21 set /a UraniumChange=25 set /a ValleyChange=8 ) if %MarketRoll%==3 ( set /a GrowthChange=7 set /a MetroChange=-6 set /a PioneerChange=10 set /a ShadyChange=-10 set /a StrykerChange=30 set /a TransportChange=6 set /a UnitedChange=-19 set /a UraniumChange=22 set /a ValleyChange=-2 ) if %MarketRoll%==4 ( set /a GrowthChange=9 set /a MetroChange=10 set /a PioneerChange=7 set /a ShadyChange=-5 set /a StrykerChange=-20 set /a TransportChange=12 set /a UnitedChange=21 set /a UraniumChange=18 set /a ValleyChange=7 ) if %MarketRoll%==5 ( set /a GrowthChange=7 set /a MetroChange=8 set /a PioneerChange=5 set /a ShadyChange=-6 set /a StrykerChange=-40 set /a TransportChange=3 set /a UnitedChange=16 set /a UraniumChange=-14 set /a ValleyChange=4 ) if %MarketRoll%==6 ( set /a GrowthChange=8 set /a MetroChange=6 set /a PioneerChange=4 set /a ShadyChange=-4 set /a StrykerChange=40 set /a TransportChange=8 set /a UnitedChange=4 set /a UraniumChange=-12 set /a ValleyChange=3 ) if %MarketRoll%==7 ( set /a GrowthChange=6 set /a MetroChange=4 set /a PioneerChange=3 set /a ShadyChange=3 set /a StrykerChange=-15 set /a TransportChange=5 set /a UnitedChange=8 set /a UraniumChange=-8 set /a ValleyChange=8 ) if %MarketRoll%==8 ( set /a GrowthChange=5 set /a MetroChange=7 set /a PioneerChange=-1 set /a ShadyChange=-3 set /a StrykerChange=45 set /a TransportChange=6 set /a UnitedChange=-10 set /a UraniumChange=10 set /a ValleyChange=4 ) if %MarketRoll%==9 ( set /a GrowthChange=-2 set /a MetroChange=6 set /a PioneerChange=-3 set /a ShadyChange=-8 set /a StrykerChange=-20 set /a TransportChange=7 set /a UnitedChange=10 set /a UraniumChange=14 set /a ValleyChange=6 ) if %MarketRoll%==10 ( set /a GrowthChange=11 set /a MetroChange=11 set /a PioneerChange=-5 set /a ShadyChange=-7 set /a StrykerChange=30 set /a TransportChange=10 set /a UnitedChange=-11 set /a UraniumChange=-18 set /a ValleyChange=-4 ) if %MarketRoll%==11 ( set /a GrowthChange=-5 set /a MetroChange=13 set /a PioneerChange=-8 set /a ShadyChange=6 set /a StrykerChange=25 set /a TransportChange=4 set /a UnitedChange=18 set /a UraniumChange=-22 set /a ValleyChange=-4 ) if %MarketRoll%==12 ( set /a GrowthChange=-8 set /a MetroChange=-10 set /a PioneerChange=-10 set /a ShadyChange=-15 set /a StrykerChange=-20 set /a TransportChange=-20 set /a UnitedChange=-23 set /a UraniumChange=-25 set /a ValleyChange=-7 ) goto Event :BullCalculator if %MarketRoll%==2 ( set /a GrowthChange=-2 set /a MetroChange=-10 set /a PioneerChange=-7 set /a ShadyChange=-9 set /a StrykerChange=-2 set /a TransportChange=-9 set /a UnitedChange=-7 set /a UraniumChange=-16 set /a ValleyChange=-4 ) if %MarketRoll%==3 ( set /a GrowthChange=26 set /a MetroChange=16 set /a PioneerChange=25 set /a ShadyChange=8 set /a StrykerChange=-14 set /a TransportChange=21 set /a UnitedChange=14 set /a UraniumChange=-4 set /a ValleyChange=17 ) if %MarketRoll%==4 ( set /a GrowthChange=18 set /a MetroChange=23 set /a PioneerChange=11 set /a ShadyChange=12 set /a StrykerChange=46 set /a TransportChange=18 set /a UnitedChange=-5 set /a UraniumChange=34 set /a ValleyChange=15 ) if %MarketRoll%==5 ( set /a GrowthChange=23 set /a MetroChange=28 set /a PioneerChange=-2 set /a ShadyChange=11 set /a StrykerChange=56 set /a TransportChange=19 set /a UnitedChange=30 set /a UraniumChange=29 set /a ValleyChange=14 ) if %MarketRoll%==6 ( set /a GrowthChange=20 set /a MetroChange=15 set /a PioneerChange=15 set /a ShadyChange=7 set /a StrykerChange=-20 set /a TransportChange=15 set /a UnitedChange=13 set /a UraniumChange=-10 set /a ValleyChange=12 ) if %MarketRoll%==7 ( set /a GrowthChange=17 set /a MetroChange=21 set /a PioneerChange=13 set /a ShadyChange=-2 set /a StrykerChange=37 set /a TransportChange=23 set /a UnitedChange=23 set /a UraniumChange=19 set /a ValleyChange=14 ) if %MarketRoll%==8 ( set /a GrowthChange=19 set /a MetroChange=24 set /a PioneerChange=17 set /a ShadyChange=9 set /a StrykerChange=-5 set /a TransportChange=26 set /a UnitedChange=13 set /a UraniumChange=-7 set /a ValleyChange=15 ) if %MarketRoll%==9 ( set /a GrowthChange=11 set /a MetroChange=18 set /a PioneerChange=14 set /a ShadyChange=11 set /a StrykerChange=67 set /a TransportChange=15 set /a UnitedChange=22 set /a UraniumChange=18 set /a ValleyChange=13 ) if %MarketRoll%==10 ( set /a GrowthChange=13 set /a MetroChange=31 set /a PioneerChange=1 set /a ShadyChange=14 set /a StrykerChange=-11 set /a TransportChange=18 set /a UnitedChange=18 set /a UraniumChange=-14 set /a ValleyChange=10 ) if %MarketRoll%==11 ( set /a GrowthChange=14 set /a MetroChange=-8 set /a PioneerChange=19 set /a ShadyChange=-1 set /a StrykerChange=-9 set /a TransportChange=25 set /a UnitedChange=-10 set /a UraniumChange=13 set /a ValleyChange=19 ) if %MarketRoll%==12 ( set /a GrowthChange=24 set /a MetroChange=24 set /a PioneerChange=23 set /a ShadyChange=20 set /a StrykerChange=51 set /a TransportChange=27 set /a UnitedChange=38 set /a UraniumChange=33 set /a ValleyChange=18 ) goto Event :Event if %Event%==0 ( set MarketReview="United Auto Company competitor invents a new economical automatic transmission" set /a UnitedChange-=5 ) if %Event%==1 ( set MarketReview="Growth Corporation of America three-for-one split rumored." set /a GrowthChange+=10 ) if %Event%==2 ( set MarketReview="Intensive advertising campaign gains Tri-City Transport Company three major, long-term contracts" set /a TransportChange+=10 ) if %Event%==3 ( set MarketReview="Uranium Enterprises Inc. prospectors find huge, new high-grade ore deposits" set /a UraniumChange+=10 ) if %Event%==4 ( set MarketReview="City Council considers the Metro Properties Inc.'s choicest property for large industrial fair." set /a MetroChange+=10 ) if %Event%==5 ( set MarketReview="Buying wave raises the market." set /a PioneerChange+=3 set /a ValleyChange+=4 ) if %Event%==6 ( set MarketReview="Strikes half production in all eight United Auto plants as UAW and Company official fail to reach agreement on labor contract." set /a UnitedChange-=15 ) if %Event%==7 ( set MarketReview="Large terminal destroyed by fire; insufficient company insurance on building due to Tri-City Transport Company's delayed move to new location." set /a TransportChange-=25 ) if %Event%==8 ( set MarketReview="Tri-City Trannsport Company moves to a new excellent location." set /a TransportChange+=5 ) if %Event%==9 ( set MarketReview="Experimental nuclear power station proves more economical than anticipated. Three electrical power companies announce plans to build large-scale nuclear power plants." set /a UraniumChange+=10 ) if %Event%==10 ( set MarketReview="Community steadily deteriorates. Shady Brooks Development management is forced to lower rental rates to attract tenants." set /a ShadyChange-=5 ) if %Event%==11 ( set MarketReview="Public Utility Commission rejects Valley Power and Light Company's request for a rate hike." set /a ValleyChange-=14 ) if %Event%==12 ( set MarketReview="War scare promotes mixed activity on Wall Street." set /a PioneerChange-=8 set /a StrykerChange+=8 set /a UraniumChange+=5 ) if %Event%==13 ( set MarketReview="Surge of profit-taking drops stock market." set /a GrowthChange-=8 set /a MetroChange-=5 set /a UnitedChange-=7 ) if %Event%==14 ( set MarketReview="Influx of personnel of new company in nearby town creates a severe housing shortage." set /a ShadyChange+=5 ) if %Event%==15 ( set MarketReview="United Auto announces new advanced-design auto entry in the mini-car field." set /a UnitedChange+=10 ) if %Event%==16 ( set MarketReview="Growth Corporation of America unexpectedly relinquishes its monopoly on its major product after a lengthy anti-trust suit." set /a GrowthChange-=10 ) if %Event%==17 ( set MarketReview="General market rise over the last two months." set /a GrowthChange+=8 set /a MetroChange+=5 set /a PioneerChange+=5 set /a UnitedChange+=7 ) if %Event%==18 ( set MarketReview="President, Vice-President and Chief Counsel of Growth Corporation of America reach retirement age." set /a GrowthChange-=10 ) if %Event%==19 ( set MarketReview="Internal Revenue depletion allowance reduced 50%." set /a StrykerChange-=15 ) if %Event%==20 ( set MarketReview="Urban Renewal Program delayed by indecision of City Planning Commission." set /a MetroChange-=10 ) if %Event%==21 ( set MarketReview="Extra year-end dividend of $2 per share declared by the Board of Directors of Growth Corporation of America." set /a GrowthChange+=10 set /a Dividends+=%PlayerGrowth%*2 ) if %Event%==22 ( set MarketReview="United Auto Company President announces expansion plans to increase productive capacity 30 percent." set /a UnitedChange+=15 ) if %Event%==23 ( set MarketReview="Foreign car rage hits the buying public. Big cars in slow demand." set /a UnitedChange-=15 ) if %Event%==24 ( set MarketReview="Government suddenly announces it will no longer support ore prices, since it has large stockpiles." set /a UraniumChange-=25 ) if %Event%==25 ( set MarketReview="Tri-City Transport Company President hospitalized in sanitorium for an indefinite period." set /a TransportChange-=5 ) if %Event%==26 ( set MarketReview="Metro Properties Inc. Annual Report shows net earnings off during fourth quarter." set /a MetroChange-=5 ) if %Event%==27 ( set MarketReview="Two founders and major stockholders of the Growth Corporation of America disagree on policy. One sells out his entire stockholdings." set /a GrowthChange-=8 ) if %Event%==28 ( set MarketReview="Major coal company announces reduced coal prices to electric power utilities." set /a ValleyChange+=5 ) if %Event%==29 ( set MarketReview="Growth Corporation of America announces new metal forming process which it claims will revolutionize all metal-working industries covered by U.S. and foreign patents." set /a GrowthChange+=10 ) if %Event%==30 ( set MarketReview="Land rights litigation holds up progress for Stryker Drilling Company." set /a StrykerChange-=10 ) if %Event%==31 ( set MarketReview="Growth Corporation of America releases high profit and sales financial report and announces plans to invest an additional $2 million on special research projects next year." set /a GrowthChange+=8 ) if %Event%==32 ( set MarketReview="Large petroleum corporation offers to buy all Stryker Drilling Company's assets for cash. Offer is well above book value. Directors approve and will submit recommendation to stockholders." set /a StrykerChange+=17 ) if %Event%==33 ( set MarketReview="Tri-City Transport Company lands ten-year contract with large industrial equipment corporation." set /a TransportChange+=15 ) if %Event%==34 ( set MarketReview="National firm leases Metro Properties Inc.'s largest office building." set /a MetroChange+=5 ) if %Event%==35 ( set MarketReview="Commission grants permission to construct a new nuclear generating plant of great capacity and efficiency to Valley Power and Light Company." set /a ValleyChange+=5 ) goto MarketAddition :MarketAddition set /a GrowthPrice+=%GrowthChange% if %GrowthPrice% GTR 150 ( set /a GrowthPrice=%GrowthPrice%/2 set /a PlayerGrowth=%PlayerGrowth%*2 set GrowthSplit=Y ) set /a MetroPrice+=%MetroChange% if %MetroPrice% GTR 150 ( set /a MetroPrice=%MetroPrice%/2 set /a PlayerMetro=%PlayerMetro%*2 set MetroSplit=Y ) set /a PioneerPrice+=%PioneerChange% if %PioneerPrice% GTR 150 ( set /a PioneerPrice=%PioneerPrice%/2 set /a PlayerPioneer=%PlayerPioneer%*2 set PioneerSplit=Y ) set /a ShadyPrice+=%ShadyChange% if %ShadyPrice% GTR 150 ( set /a ShadyPrice=%ShadyPrice%/2 set /a PlayerShady=%PlayerShady%*2 set ShadySplit=Y ) set /a StrykerPrice+=%StrykerChange% if %StrykerPrice% GTR 150 ( set /a StrykerPrice=%StrykerPrice%/2 set /a PlayerStryker=%PlayerStryker%*2 set StrykerSplit=Y ) set /a TransportPrice+=%TransportChange% if %TransportPrice% GTR 150 ( set /a TransportPrice=%TransportPrice%/2 set /a PlayerTransport=%PlayerTransport%*2 set TransportSplit=Y ) set /a UnitedPrice+=%UnitedChange% if %UnitedPrice% GTR 150 ( set /a UnitedPrice=%UnitedPrice%/2 set /a PlayerUnited=%PlayerUnited%*2 set UnitedSplit=Y ) set /a UraniumPrice+=%UraniumChange% if %UraniumPrice% GTR 150 ( set /a UraniumPrice=%UraniumPrice%/2 set /a PlayerUranium=%PlayerUranium%*2 set UraniumSplit=Y ) set /a ValleyPrice+=%ValleyChange% if %ValleyPrice% GTR 150 ( set /a ValleyPrice=%ValleyPrice%/2 set /a PlayerValley=%PlayerValley%*2 set ValleySplit=Y ) if %GrowthPrice% LSS 1 ( set /a PlayerGrowth=0 set /a GrowthPrice=100 set GrowthBank=Y ) if %MetroPrice% LSS 1 ( set /a PlayerMetro=0 set /a MetroPrice=100 set MetroBank=Y ) if %PioneerPrice% LSS 1 ( set /a PlayerPioneer=0 set /a PioneerPrice=100 set PioneerBank=Y ) if %ShadyPrice% LSS 1 ( set /a PlayerShady=0 set /a ShadyPrice=100 set ShadyBank=Y ) if %StrykerPrice% LSS 1 ( set /a PlayerStryker=0 set /a StrykerPrice=100 set StrykerBank=Y ) if %TransportPrice% LSS 1 ( set /a PlayerTransport=0 set /a TransportPrice=100 set TransportBank=Y ) if %UnitedPrice% LSS 1 ( set /a PlayerUnited=0 set /a UnitedPrice=100 set UnitedBank=Y ) if %UraniumPrice% LSS 1 ( set /a PlayerUranium=0 set /a UraniumPrice=100 set UraniumBank=Y ) if %ValleyPrice% LSS 1 ( set /a PlayerValley=0 set /a ValleyPrice=100 set ValleyBank=Y ) goto Dividends :Dividends set /a Dividends+=%PlayerCentral%*5 set /a Dividends+=%PlayerGrowth%*1 if %GrowthPrice% LSS 50 ( set /a Dividends-=%PlayerGrowth%*1 ) set /a Dividends+=%PlayerPioneer%*4 if %PioneerPrice% LSS 50 ( set /a Dividends-=%PlayerPioneer%*4 ) set /a Dividends+=%PlayerShady%*7 if %ShadyPrice% LSS 50 ( set /a Dividends-=%PlayerShady%*7 ) set /a Dividends+=%PlayerUnited%*2 if %UnitedPrice% LSS 50 ( set /a Dividends-=%PlayerUnited%*2 ) set /a Dividends+=%PlayerUranium%*6 if %UraniumPrice% LSS 50 ( set /a Dividends-=%PlayerUranium%*6 ) set /a Dividends+=%PlayerValley%*3 if %ValleyPrice% LSS 50 ( set /a Dividends-=%PlayerValley%*3 ) set /a Cash+=%Dividends% set /a MarginInterest=%MarginBalance%*5/100 set /a Cash-=%MarginInterest% goto MainScreen :Buy echo What security? set /p inputsecurity= set /a valid=0 if %inputsecurity%==Central set /a valid=1 if %inputsecurity%==Growth set /a valid=1 if %inputsecurity%==Metro set /a valid=1 if %inputsecurity%==Pioneer set /a valid=1 if %inputsecurity%==Shady set /a valid=1 if %inputsecurity%==Stryker set /a valid=1 if %inputsecurity%==Transport set /a valid=1 if %inputsecurity%==United set /a valid=1 if %inputsecurity%==Uranium set /a valid=1 if %inputsecurity%==Valley set /a valid=1 if %valid%==0 goto MainScreen echo Quantity? (Will be multiplied by 10) set /p input= REM some way to ensure that this won't crash if a non-number is put in? Some sort of verification or something. CHECK IN FUTURE set /a confirmquant=%input%*10 set /a priceoftransaction=%inputsecurity%Price*%confirmquant% echo Buy %confirmquant% shares of %inputsecurity%. This will cost $%priceoftransaction%. Is this OK? (Y/N) set /p input= set /a valid=0 if %input%==Y set /a valid=1 if %input%==N set goto MainScreen if %valid%==0 goto MainScreen if %Cash% LSS %priceoftransaction% goto MainScreen set /a Cash-=%priceoftransaction% set /a Player%inputsecurity%+=%confirmquant% goto MainScreen :Margin echo What security? set /p inputsecurity= set /a valid=0 if %inputsecurity%==Central set /a valid=1 if %inputsecurity%==Growth set /a valid=1 if %inputsecurity%==Metro set /a valid=1 if %inputsecurity%==Pioneer set /a valid=1 if %inputsecurity%==Shady set /a valid=1 if %inputsecurity%==Stryker set /a valid=1 if %inputsecurity%==Transport set /a valid=1 if %inputsecurity%==United set /a valid=1 if %inputsecurity%==Uranium set /a valid=1 if %inputsecurity%==Valley set /a valid=1 if %valid%==0 goto MainScreen echo Quantity? (Will be multiplied by 10) set /p input= set /a confirmquant=%input%*10 set /a priceoftransaction=%inputsecurity%Price*%confirmquant% set /a marginpriceoftransaction=%priceoftransaction%/2 echo Buy %confirmquant% shares of %inputsecurity%. This will cost $%marginpriceoftransaction%. Is this OK? (Y/N) set /p input= set /a valid=0 if %input%==Y set /a valid=1 if %input%==N set goto MainScreen if %valid%==0 goto MainScreen if %Cash% LSS %marginriceoftransaction% goto MainScreen set /a Cash-=%priceoftransaction%/2 set /a MarginBalance+=%priceoftransaction%/2 set /a Player%inputsecurity%+=%confirmquant% goto MainScreen :Payment echo How much? set /p paymentquantity= if %paymentquantity% GTR %Cash% goto MainScreen set /a Cash-=%paymentquantity% set /a MarginBalance-=%paymentquantity% if %MarginBalance% LSS 0 ( set /a Cash-=%MarginBalance% set /a MarginBalance=0 ) goto MainScreen :Sell echo What security? set /p inputsecurity= set /a valid=0 if %inputsecurity%==Central set /a valid=1 if %inputsecurity%==Growth set /a valid=1 if %inputsecurity%==Metro set /a valid=1 if %inputsecurity%==Pioneer set /a valid=1 if %inputsecurity%==Shady set /a valid=1 if %inputsecurity%==Stryker set /a valid=1 if %inputsecurity%==Transport set /a valid=1 if %inputsecurity%==United set /a valid=1 if %inputsecurity%==Uranium set /a valid=1 if %inputsecurity%==Valley set /a valid=1 if %valid%==0 goto MainScreen echo Quantity? (Will be multiplied by 10) set /p input= REM some way to ensure that this won't crash if a non-number is put in? Some sort of verification or something. CHECK IN FUTURE set /a confirmquant=%input%*10 set /a priceoftransaction=!%inputsecurity%Price!*%confirmquant% echo Sell %confirmquant% shares of %inputsecurity%. This will give you $%priceoftransaction%. Is this OK? (Y/N) set /p input= set /a valid=0 if %input%==Y set /a valid=1 if %input%==N set goto MainScreen if %valid%==0 goto MainScreen if !Player%inputsecurity%! LSS %confirmquant% goto MainScreen set /a Cash+=%priceoftransaction% set /a Player%inputsecurity%-=%confirmquant% goto MainScreen :Information cls echo Securities Review echo -------------------- echo Central City Municipal Bonds echo An AAA bond with a good yield. This investment represents echo extreme security and good income, but, of course, no appreciation. echo -------------------- echo Growth Corporation of America echo A well established company with a phenomenal growth record. It is echo an expanding industry, spends a lot of money on research and is echo expected to continue its growth pattern. The Company's policy of echo reinvesting earnings causes low yield. The price-to-earnings ratio echo of this stock is extremely high. echo -------------------- echo Metro Properties, Inc. echo An investment representing good prospects of high appreciation. No echo dividends are expected in the immediate future. However, the City's echo proposed Urban Renewal Program could have great effect on earnings. echo -------------------- echo Pioneer Mutual Fund echo A common stock income mutual fund offered by a large mutual fund echo company. It has a good yield of 4%. Stock in this fund represents echo a good, steady income, but only a fair appreciation investment. echo -------------------- echo Shady Brooks Development echo A real estate investment representing extremely high income, but echo steadily depreciating capital assets. echo -------------------- echo Stryker Drilling Company echo A stock representing extremely speculative investment. Profits go echo toward drilling new oil wells, so no dividends are expected. This echo stock could be worth rags or riches. echo -------------------- echo Tri-City Transport Company echo A stock representing a high appreciation investment prospect with echo a good stable outlook depending on the administrative ability and echo ambition of its respected, ethical and energetic young president. echo As all profits go back into the Company, dividends are not expected echo to be declared inthe foreseeable future. echo -------------------- echo United Auto Company echo A medium large company in the large, oligopolistic automobile echo industry. United Auto, like others in the industry, is subject echo to whims of public fancy. Stock in this company represents a echo somewhat speculative investment with a good growth pattern. echo Because it is popular with the investing public, it has a fairly echo high price-to-earnings ratio and low yield. echo -------------------- echo Uranium Enterprises, Inc. echo A highly speculative, high income stock ideal for the short or echo medium term investor. Its long term prospects are fair to poor. echo -------------------- echo Valley Power and Light Company echo A stable, steadily growing public utility company located in a echo well established, healthy industrial area. Stock in this company echo represents a safe, medium yield, medium growth investment. echo -------------------- echo Margin Information echo Margin rate is set at 50% echo Interest is set at 5% pause goto MainScreen :Bankruptcy cls echo Sadly, you have gone bankrupt! pause exit :EndGame CLS call %USERPROFILE%\Documents\StocksAndBonds\Highscores.bat if %NetWorth% LSS %score5% goto FinalRead if %NetWorth% GEQ %score5% ( set /a score5=%NetWorth% ) if %NetWorth% GEQ %score4% ( set /a score5=%score4% set /a score4=%NetWorth% ) if %NetWorth% GEQ %score3% ( set /a score4=%score3% set /a score3=%NetWorth% ) if %NetWorth% GEQ %score2% ( set /a score3=%score2% set /a score2=%NetWorth% ) if %NetWorth% GEQ %score1% ( set /a score2=%score1% set /a score1=%NetWorth% ) echo set /a score1=%score1% > %USERPROFILE%\Documents\StocksAndBonds\Highscores.bat echo set /a score2=%score2% >> %USERPROFILE%\Documents\StocksAndBonds\Highscores.bat echo set /a score3=%score3% >> %USERPROFILE%\Documents\StocksAndBonds\Highscores.bat echo set /a score4=%score4% >> %USERPROFILE%\Documents\StocksAndBonds\Highscores.bat echo set /a score5=%score5% >> %USERPROFILE%\Documents\StocksAndBonds\Highscores.bat :FinalRead echo In twelve years, you have turned $5000 into %NetWorth% worth stocks, bonds, and cash echo High Scores: echo 1 - %score1% echo 2 - %score2% echo 3 - %score3% echo 4 - %score4% echo 5 - %score5% pause exit :SaveGame cls tree /F %USERPROFILE%\Documents\StocksAndBonds\Saves echo File Name? set /p filename= echo set /a GrowthPrice=%GrowthPrice% > %USERPROFILE%\Documents\StocksAndBonds\Saves\%filename%.bat echo set /a MetroPrice=%MetroPrice% >> %USERPROFILE%\Documents\StocksAndBonds\Saves\%filename%.bat echo set /a PioneerPrice=%PioneerPrice% >> %USERPROFILE%\Documents\StocksAndBonds\Saves\%filename%.bat echo set /a ShadyPrice=%ShadyPrice% >> %USERPROFILE%\Documents\StocksAndBonds\Saves\%filename%.bat echo set /a StrykerPrice=%StrykerPrice% >> %USERPROFILE%\Documents\StocksAndBonds\Saves\%filename%.bat echo set /a TransportPrice=%TransportPrice% >> %USERPROFILE%\Documents\StocksAndBonds\Saves\%filename%.bat echo set /a UnitedPrice=%UnitedPrice% >> %USERPROFILE%\Documents\StocksAndBonds\Saves\%filename%.bat echo set /a UraniumPrice=%UraniumPrice% >> %USERPROFILE%\Documents\StocksAndBonds\Saves\%filename%.bat echo set /a ValleyPrice=%ValleyPrice% >> %USERPROFILE%\Documents\StocksAndBonds\Saves\%filename%.bat echo set /a CentralPrice=%CentralPrice% >> %USERPROFILE%\Documents\StocksAndBonds\Saves\%filename%.bat echo set /a Year=%Year% >> %USERPROFILE%\Documents\StocksAndBonds\Saves\%filename%.bat echo set /a PlayerCentral=%PlayerCentral% >> %USERPROFILE%\Documents\StocksAndBonds\Saves\%filename%.bat echo set /a PlayerGrowth=%PlayerGrowth% >> %USERPROFILE%\Documents\StocksAndBonds\Saves\%filename%.bat echo set /a PlayerMetro=%PlayerMetro% >> %USERPROFILE%\Documents\StocksAndBonds\Saves\%filename%.bat echo set /a PlayerPioneer=%PlayerPioneer% >> %USERPROFILE%\Documents\StocksAndBonds\Saves\%filename%.bat echo set /a PlayerShady=%PlayerShady% >> %USERPROFILE%\Documents\StocksAndBonds\Saves\%filename%.bat echo set /a PlayerStryker=%PlayerStryker% >> %USERPROFILE%\Documents\StocksAndBonds\Saves\%filename%.bat echo set /a PlayerTransport=%PlayerTransport% >> %USERPROFILE%\Documents\StocksAndBonds\Saves\%filename%.bat echo set /a PlayerUnited=%PlayerUnited% >> %USERPROFILE%\Documents\StocksAndBonds\Saves\%filename%.bat echo set /a PlayerUranium=%PlayerUranium% >> %USERPROFILE%\Documents\StocksAndBonds\Saves\%filename%.bat echo set /a PlayerValley=%PlayerValley% >> %USERPROFILE%\Documents\StocksAndBonds\Saves\%filename%.bat echo set /a Cash=%Cash% >> %USERPROFILE%\Documents\StocksAndBonds\Saves\%filename%.bat echo set /a MarginBalance=%MarginBalance% >> %USERPROFILE%\Documents\StocksAndBonds\Saves\%filename%.bat goto MainScreen :LoadGame cls tree /F %USERPROFILE%\Documents\StocksAndBonds\Saves echo File Name? set /p filename= call %USERPROFILE%\Documents\StocksAndBonds\Saves\%filename%.bat goto MainScreen