Solved Why? My batch files

April 25, 2020 at 06:20:21
Specs: Windows 10
Hello everyone!
I created some 'programs' / 'games' out of passion and to pass the time.
I want to tell you what you think about them and how I could improve them.
If you find bugs tell me.
Calculate: http://www.mediafire.com/file/5ted0...
Flag: http://www.mediafire.com/file/kcjsb... ile
Guess Number: http://www.mediafire.com/file/tf73y... er.bat
HackSimulator: http://www.mediafire.com/file/16tui... tor.bat/file
Loto: http://www.mediafire.com/file/pm3ws... ile
Lucky Number: http://www.mediafire.com/file/if767... er.bat
RandomGame: http://www.mediafire.com/file/p1b2b... .bat/file
StartPrograms: http://www.mediafire.com/file/ye85i... ams.bat/file
StartProgramsV2: http://www.mediafire.com/file/4ln8g... amsV2.bat/file
StartProgramsV3: http://www.mediafire.com/file/ao5n4... amsV3.bat/file
StartProgramsV4: http://www.mediafire.com/file/ia94o... amsV4.bat/file
Time: http://www.mediafire.com/file/hy42v... ile
TicTacToe: http://www.mediafire.com/file/s2kmb...
Clock Alarm: http://www.mediafire.com/file/rf2hk...
PingView:https://www.mediafire.com/file/q48cg6qhdtdlq88/PingView.bat/file
WebCreator:https://www.mediafire.com/file/xfx8ot9fm0xdjgr/WebCreator.bat/file
SlotMachine:https://www.mediafire.com/file/ewsl4p7ebq7gccb/SlotMachine.bat/file
Roulette: https://www.mediafire.com/file/54jj...
BlackJack: https://www.mediafire.com/file/fwi5...
TheWar: https://www.mediafire.com/file/3meb...

I want help with scripting + ideas for more Batch Files. Now I need ideas + helping at an update.
If you want to help me we will work in Codepile.
I wait you!


See More: Why? My batch files

Reply ↓  Report •

#1
April 27, 2020 at 08:21:16
✔ Best Answer
tictactoe doesnt check for a TIE :(

I was wokring on pokemon red/blue/yellow in batch for a few summers: https://pastebin.com/Rmf9t2Js
about 11,000 lines of code and 394KB saved with ANSI encoding.

here is a slotmachine with animation I made a while back for PokeBatch2(D).bat:

@echo off&setlocal enabledelayedexpansion
set coins=1000
set bet=50
set "ln=echo ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ"
set "p=&pause>nul"
set "v=set/p "
set "t1n=&timeout 1 /NOBREAK >nul"
:Bet
cls
echo.
echo Slot Machine - Coins: !coins!
echo.
echo [1] Bet (!bet!)
echo [2] Change bet
echo [3] Quit
choice /c 123 /n>nul
if !errorlevel!==1 if !coins! LSS !bet! cls&echo You dont have enough coins%p%&goto Bet
if !errorlevel!==2 goto Changebet
if !errorlevel!==3 goto RM
set S=0&set /a coins=!coins!-!bet!&goto S0
:Changebet
cls&echo Bet how much? - (coins: !coins!)
set/p bet=
if !bet! LSS 2 goto changebet
if !bet! GTR !coins! goto changebet
goto Bet
:S0
set sp=
set S=0
set loop=0
for /L %%a in (1,1,3) do (
set S%%a-1=ÛÛÛÛÛÛ
for /l %%A in (2,1,12) do set S%%a-%%A=%sp%
set S%%a-13=ÛÛÛÛÛÛ
)
goto Scoreboard
:S1
set/a loop+=1
set i=!random:~-1!
set S!S!=!i!
if !i!==0 goto 777
if !i!==1 goto BAR
if !i!==2 goto KOFFING
if !i!==3 goto VOLTORB
if !i!==4 goto CHERRY
goto S1
:Scoreboard
cls
echo.
echo Coins: !coins!
echo.
echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
for /l %%a in (2,1,12) do echo Û!S1-%%a!Û!S2-%%a!Û!S3-%%a!Û
echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ%t1n%
if !loop! LSS 20 set S=1&goto S1
if !loop! LSS 40 set S=2&goto S1
if !loop! LSS 60 set S=3&goto S1
goto Checkscore
:Checkscore
:: 4% chance to win (5/5*1/5*1/5) & 25x jackpot (its not even rigged like in the real game)
if !S1!==!S2! if !S2!==!S3! cls&echo Jackpot^^! %p%&set score=0&set /a coins+=25*!bet!&goto Bet
goto Bet
:777
set S!S!-2=%sp%
set S!S!-3=%sp%
set S!S!-4= ÛÛÛÛ
set S!S!-5= Û
set S!S!-6= Û
set S!S!-7= Û
set S!S!-8= Û
set S!S!-9= Û
set S!S!-10= Û
set S!S!-11=%sp%
set S!S!-12=%sp%
goto Scoreboard
:BAR
for /l %%a in (2,1,5) do set S!S!-%%a=%sp%
set S!S!-6= ÛÛÛÛÛ
set S!S!-7= ÛBARÛ
set S!S!-8= ÛÛÛÛÛ
for /l %%a in (9,1,12) do set S!S!-%%a=%sp%
goto Scoreboard
:KOFFING
set S!S!-2= Û
set S!S!-3= Û
set S!S!-4= ÛÛÛ
set S!S!-5= Û Û
set S!S!-6= Û- -Û
set S!S!-7= Û Û
set S!S!-8= Û\ /Û
set S!S!-9= Û/ \Û
set S!S!-10= Û Û
set S!S!-11= ÛÛÛ
set S!S!-12= Û Û
goto Scoreboard
:VOLTORB
set S!S!-2=%sp%
set S!S!-3=%sp%
set S!S!-4= ÛÛÛ
set S!S!-5= ÛÛÛÛÛ
set S!S!-6= Û-Û-Û
set S!S!-7= ÛÛÛÛÛ
set S!S!-8= Û Û
set S!S!-9= Û Û
set S!S!-10= ÛÛÛ
set S!S!-11=%sp%
set S!S!-12=%sp%
goto Scoreboard
:CHERRY
for /l %%a in (2,1,5) do set S!S!-%%a=%sp%
set S!S!-6= ÛÛ Û
set S!S!-7= ÛÛÛÛÛ
set S!S!-8= ÛÛÛ
set S!S!-9= ÛÛ ÛÛ
set S!S!-10= ÛÛ ÛÛ
set S!S!-11=%sp%
set S!S!-12=%sp%
goto Scoreboard

specs: https://www.userbenchmark.com/UserR...


Reply ↓  Report •
Related Solutions


Ask Question