I want to create something like this:
Code: Select all
@echo off && cls && title Guess the number [MP]
Setlocal EnableDelayedExpansion
:first
if %user1%==%username% goto login
if %user2%==%username% goto login
if else echo %username%>>gusers.txt
Pause
(
set /p user1=
set /p user2=
)<gusers.txt
Pause
:login
if not %user1%==%username% set player2=%user1%
if not %user2%==%username% set player2=%user2%
cls
Pause
:begin
cls
set usr=
set /p usr=Enter your username:
if {%usr%}=={} goto :begin
set authenticated=
for /f "tokens=*" %%a in (programdata.dll) do (
if {%%a}=={%usr%} set authenticated=true
)
if not defined authenticated (echo Invalid Username & goto :begin)
Pause
:passwo
echo %time% - %date% Username verified>>log.bak
set pass=
set /p pass=Enter your password:
if {%pass%}=={} goto :begin
set authenticated=
for /f "tokens=*" %%a in (programbase.dll) do (
if {%%a}=={%pass%} set authenticated=true
)
if not defined authenticated (echo Invalid password & goto :begin)
set current=%usr%
echo %time% - %date% Password verified>>log.bak
Pause
:game
echo Round 1: You \VS/ %player2%
echo.
echo Choose a number between 0 and 11 (so 1 to 10)
echo.
Pause
set /p C=Number1:
echo %C% >number%username%.txt
(
set /p number2=
)<number%player2%.txt
set number1=%C%
ping localhost -n 2 >NUL
cls
echo You draw %number1%
echo %player2% draw %number2%
if %number1%==%number2% set result=draw
if not %number1%==%number2% set result=no one wins
echo.
echo the result: %result%
pause>NUL
This ain't yet finished though, but that's because when i tested it at this stage, it doesn't seem to work.
I sort of guessed some stuff wich i aint sure of it would work.
Anyone a idea how to get this to work?
Thanks in advance!