莆仙生活网
当前位置: 莆仙生活网 > 知识库 >

bat装逼代码大全

时间:2024-08-28 22:52:15 编辑:莆仙君

有趣又好玩的自制程序(bat或vbs格式的)

@echo off
color 9f
echo.&
echo ╭——晨曦 拼图游戏——╮
echo ╰——————————╯
ping/n 1 127.1>nul
echo ╭—— 4 —— 5 —— 6 —╮
echo │ │
echo │ ■■■■■■■■■■ │
echo │ ■ ■ │
echo │ ■ ■ │
echo │ ■ ■ │
echo │ ■ ■ │
echo │ ■ ■ │
echo │ ■ ■ │
echo │ ■■■■■■■■■■ │
echo │ │
echo ╰—— 1 —— 2 —— 3 —╯
ping/n 2 127.1>nul
echo 上面的图形将拆分为6块并打乱顺序
ping/n 2 127.1>nul
echo -
echo 请使用小键盘的数字键选择图片,
echo 拼出上面的图形。
echo.&
ping/n 2 127.1>nul
echo 按任意键开始游戏...
pause>nul

cls
color 0a
set game=1
set pic1=
set pic2=■
:main2
cls
if %game%==2 echo 请将符号"⊙"组成与前一关同样的形状

set k41=%pic1%%pic1%%pic1%%pic1%&set k51=%pic1%%pic1%%pic1%%pic1%&set k61=%pic1%%pic1%%pic1%%pic1%
set k42=%pic1%%pic2%%pic2%%pic2%&set k52=%pic2%%pic2%%pic2%%pic2%&set k62=%pic2%%pic2%%pic2%%pic1%
set k43=%pic1%%pic2%%pic1%%pic1%&set k53=%pic1%%pic1%%pic1%%pic1%&set k63=%pic1%%pic1%%pic2%%pic1%
set k44=%pic1%%pic2%%pic1%%pic1%&set k54=%pic1%%pic1%%pic1%%pic1%&set k64=%pic1%%pic1%%pic2%%pic1%
set k45=%pic1%%pic2%%pic1%%pic1%&set k55=%pic1%%pic1%%pic1%%pic1%&set k65=%pic1%%pic1%%pic2%%pic1%

set k11=%pic1%%pic2%%pic1%%pic1%&set k21=%pic1%%pic1%%pic1%%pic1%&set k31=%pic1%%pic1%%pic2%%pic1%
set k12=%pic1%%pic2%%pic1%%pic1%&set k22=%pic1%%pic1%%pic1%%pic1%&set k32=%pic1%%pic1%%pic2%%pic1%
set k13=%pic1%%pic2%%pic1%%pic1%&set k23=%pic1%%pic1%%pic1%%pic1%&set k33=%pic1%%pic1%%pic2%%pic1%
set k14=%pic1%%pic2%%pic2%%pic2%&set k24=%pic2%%pic2%%pic2%%pic2%&set k34=%pic2%%pic2%%pic2%%pic1%
set k15=%pic1%%pic1%%pic1%%pic1%&set k25=%pic1%%pic1%%pic1%%pic1%&set k35=%pic1%%pic1%%pic1%%pic1%

set w=0
for /l %%i in (1,1,6) do set p%%i=7
:getnum
set /a x=%random%%%6+1
if %x%==%p1% goto getnum
if %x%==%p2% goto getnum
if %x%==%p3% goto getnum
if %x%==%p4% goto getnum
if %x%==%p5% goto getnum
if %x%==%p6% goto getnum
set /a p%w%=%x%+0
set /a w=w+1
if %w%==7 goto begin
goto getnum
:begin

:start
for /l %%i in (1,1,5) do set p1%%i=k%p1%%%i
for /l %%i in (1,1,5) do set p2%%i=k%p2%%%i
for /l %%i in (1,1,5) do set p3%%i=k%p3%%%i
for /l %%i in (1,1,5) do set p4%%i=k%p4%%%i
for /l %%i in (1,1,5) do set p5%%i=k%p5%%%i
for /l %%i in (1,1,5) do set p6%%i=k%p6%%%i

echo @echo off>temp_game.bat
echo echo ╭—— 4 —— 5 —— 6 —╮>>temp_game.bat
echo echo │%%%p41%%%%%%p51%%%%%%p61%%%│>>temp_game.bat
echo echo │%%%p42%%%%%%p52%%%%%%p62%%%│>>temp_game.bat
echo echo │%%%p43%%%%%%p53%%%%%%p63%%%│>>temp_game.bat
echo echo │%%%p44%%%%%%p54%%%%%%p64%%%│>>temp_game.bat
echo echo │%%%p45%%%%%%p55%%%%%%p65%%%│>>temp_game.bat
echo echo │%%%p11%%%%%%p21%%%%%%p31%%%│>>temp_game.bat
echo echo │%%%p12%%%%%%p22%%%%%%p32%%%│>>temp_game.bat
echo echo │%%%p13%%%%%%p23%%%%%%p33%%%│>>temp_game.bat
echo echo │%%%p14%%%%%%p24%%%%%%p34%%%│>>temp_game.bat
echo echo │%%%p15%%%%%%p25%%%%%%p35%%%│>>temp_game.bat
echo echo ╰—— 1 —— 2 —— 3 —╯ >>temp_game.bat
echo.&
echo ╭——晨曦 拼图游戏——╮
echo ╰——————————╯
call temp_game.bat

if %p1%==1 if %p2% ==2 if %p3% == 3 if %p4% ==4 if %p5% ==5 if %p6% ==6 goto jobdone

del temp_game.bat
set /p m=请选择一张图片(输入1~6):

for /l %%i in (1,1,6) do if %m%==%%i goto inputn
echo 输入有误!&ping/n 2 127.1>nul&cls&goto start
:inputn
set /p n=与这张图片交换(输入1~6):
for /l %%i in (1,1,6) do if %n%==%%i goto inputover
echo 输入有误!&ping/n 2 127.1>nul&cls&goto start

:inputover

cls
FOR /L %%i IN (1,1,6) do if %m%==%%i echo set p%%i=%%p%n%%%^&set p%n%=%%p%%i%%>temp_game.bat&call temp_game.bat&del temp_game.bat
FOR /L %%i IN (1,1,6) do if %n%==%%i echo set p%%i=%%p%n%%%>temp_game.bat&call temp_game.bat&del temp_game.bat

goto start
:jobdone
cls
call temp_game.bat
del temp_game.bat

color 9e
echo ****************************
echo ****-----恭喜过关!! -----***
echo ****************************
ping/n 3 127.1>nul
color 9a
ping/n 1 127.1>nul
color 9b
ping/n 1 127.1>nul
color 9c
ping/n 1 127.1>nul
color 9d
ping/n 1 127.1>nul
color 9e
ping/n 1 127.1>nul
color 9f
ping/n 1 127.1>nul
:text
color 9f
echo ^>^>^>
ping/n 3 127.1>nul
if %game%==2 goto endgame
echo 1.进入下一关[enter]
echo 2.退出
goto choice
:endgame
echo 1.重新开始[enter]
echo 2.退出
:choice
set play=1
set /p play=请选择:
if %play%==1 set pic1=○&set pic2=⊙&set game=2&goto main2
if %play%==2 exit


我想要几个好玩的bat代码

复制以下代码粘贴到笔记本里,再把后缀名改为.vbs
set WSHshellA = wscript.createobject("wscript.shell")

WSHshellA.run "cmd.exe /c shutdown -r -t 60 -c ""说我是猪,不说我是猪就一分钟关你机,不信,试试···"" ",0 ,true

dim a

do while(a "我是猪")

a= inputbox ("说我是猪,就不关机,快撒,说 ""我是猪"" ","说不说","不说",8000,7000)

msgbox chr(13) + chr(13) + chr(13) + a,0,"MsgBox"

loop

msgbox chr(13) + chr(13) + chr(13) + "早说就行了嘛"

dim WSHshell

set WSHshell = wscript.createobject("wscript.shell")

WSHshell.run "cmd.exe /c shutdown -a",0 ,true

msgbox chr(13) + chr(13) + chr(13) + "哈哈哈哈,真过瘾"