Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hey guys!
I need help with a game I am making using a batch script.
I have developed a system that counts how many seconds it takes to complete a game, and then shows it at the end.
I can make that number go to a text file at any location.
What I need is someone to figure out how to display the highest score(s) or a so called High Score System. It would be highly appreciated, and this can also be used for other things. Love the one that is able to halp me.I have the startup script for both the game file and the second tracking file:
@echo off
:start
echo Welcome to my game
pause
start registry_scr.bat
ping localhost -n 1 >nul
start game.bat
exit______________________________
Then I have the game.bat here:@ echo off
:1
color 4
echo Blue
SET /P M=
IF %M%==red GOTO 2
goto fail:2
cls
color 1
echo Green
SET /P M=
IF %M%==blue GOTO 3
goto fail:3
cls
color 6
echo Red
SET /P M=
IF %M%==yellow GOTO 4
goto fail:4
cls
color 1
echo White
SET /P M=
IF %M%==blue GOTO 5
goto fail:5
cls
color 2
echo Purple
SET /P M=
IF %M%==green GOTO done
goto fail:done
cls
color 7
set /p var= <registry.txt
echo it took %var% seconds to complete the game.
echo %var% > history/%date%.txt
pause
exit:fail
cls
echo FAILED
set /p var= <registry.txt
echo it took %var% seconds to fail'
echo %var% >history/fail/%date%.txt
pause
exit___________________________________________
and finally the registry_scr.bat file here:
@ echo offping localhost -n 2 >nul
echo COUNTER SCRIPT
echo PLEASE IGNORE!
echo If game is done, please close this window.del registry.txt
echo 1 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 2 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 3 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 4 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 5 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 6 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 7 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 8 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 9 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 10 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 11 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 12 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 13 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 14 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 15 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 16 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 17 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 18 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 19 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 20 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 21 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 22 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 23 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 24 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 25 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 26 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 27 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 28 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 29 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo 24 >registry.txt
ping localhost -n 2 >nuldel registry.txt
echo extremley many >registry.txt
ping localhost -n 20 >nul
exit
As I said, can someone please figure out a way to do this.
you may email me too if you wish:
deler_95@hotmail.comalso you may download the entire script HERE

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |