Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off & setlocal DisableDelayedExpansion
- Set "/Ex=^!"
- Setlocal EnableDelayedExpansion
- If Exist "Bot.bat" Call :main
- Echo(@echo off^&Setlocal EnableDelayedExpansion>Bot.bat
- Echo(Set /A RandAnswer=(%%Random%% * 3 / 32768 + 1^)>>Bot.bat
- Echo(Call :%%~1 2^>Nul>>Bot.bat
- Echo(If Errorlevel 1 Echo.You're not making much sense.>>Bot.bat
- Echo(Exit /B>>Bot.bat
- :Training
- For /L %%A in (1,1,1000)do (
- Set "Question="
- Set /P "Question=Question:"
- If /I "!Question!"=="End" Exit
- Echo(:!Question!>>Bot.bat
- For /L %%B in (1,1,3)do (
- Set /P "Answer[%%B]=Answer[%%B]:"
- Echo(Set "Answer[%%B]=!Answer[%%B]!">>Bot.bat
- )
- Echo(Set "Answer=%/Ex%Answer[%%RandAnswer%%]%/Ex%">>Bot.bat
- Echo(Echo."%/Ex%Answer%/Ex%">>Bot.bat
- Echo(Exit /B>>Bot.bat
- )
- :main
- Set /P "Question=Question:"
- If /I "!Question!"=="Train" Goto :Training
- Call "Bot.bat" "!Question!"
- Set "Question="
- Goto :main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement