[应急响应] vbs游戏代码段1

326 1
cinond800T_T实名认证 2023-5-14 20:19:57 | 显示全部楼层 |阅读模式
SET Wshell=CreateObject("Wscript.Shell")
set fso=wscript.createobject("scripting.filesystemobject")
if lcase(right(Wscript.fullName,11)) = "wscript.exe" then
    Wshell.run "cmd /k cscript.exe //nologo " & chr(34) & wscript.scriptfullname & chr(34)
    Wscript.quit
else
    msgbox "1号用ctrl+alt+w/a/s/d来操控方向,用ctrl+alt+z攻击"
    msgbox"2号用ctrl+alt+上/下/左/右 来操控方向,用ctrl+alt+l攻击"
    dim a(59,28),dname(3),ldname(3),all(9),zd(1),iline(100),liline(100)
    dname(0)="a"
    dname(1)="s"
    dname(2)="d"
    dname(3)="w"
    ldname(0)="left"
    ldname(1)="down"
    ldname(2)="right"
    ldname(3)="up"
    all(0)="a"
    all(1)="s"
    all(2)="d"
    all(3)="w"
    all(4)="z"
    all(5)="up"
    all(6)="down"
    all(7)="left"
    all(8)="right"
    all(9)="l"
    zidan=15
    lzidan=15
    xueliang=3
    lxueliang=3
    for i= 0 to 59
        for j= 0 to 27
            a(i,j)="█ "
        next
    next
    m=2
    n=2
    p=57
    q=24
    direction="d"
    ldirection="left"
    a(m,n)="◎"
    a(p,q)="◎"
    strDesktop=WShell.SpecialFolders("Desktop")
    for name=0 to 9
        set open=fso.opentextfile(strdesktop&"\"&all(name)&".vbs",2,true)
        open.write("set fso=wscript.createobject("&chr(34)&"scripting.filesystemobject"&chr(34)&")"&vbcrlf&"set f=fso.opentextfile("&chr(34)&strdesktop&"\"&all(name)&".txt"&chr(34)&",1,true)")
        open.close
        if fso.fileexists(strdesktop&"\"&all(name)&".txt") then
            fso.deletefile(strdesktop&"\"&all(name)&".txt")
        end if
        set oShellLink = WShell.CreateShortcut(strDesktop & "\"&all(name)&".lnk")
        oShellLink.TargetPath = strdesktop&"\"&all(name)&".vbs"
        oShellLink.Hotkey = "ctrl+alt+"&all(name)
        oShellLink.WorkingDirectory = strdesktop
        oShellLink.Save
    next
    wshecho()
    for ztime=1 to 1000000
        for xxxx=0 to 100
            iline(xxxx)=""
            liline(xxxx)=""
        next
    for name=0 to 3
        if fso.fileexists(strdesktop&"\"&dname(name)&".txt") then
            direction=dname(name)
            runaswd=true
            for i= 0 to 59
                for j= 0 to 27
                    a(i,j)="█ "
                next
            next
            fso.deletefile(strdesktop&"\"&dname(name)&".txt")
        end if
    next
    for name=0 to 3
        if fso.fileexists(strdesktop&"\"&ldname(name)&".txt") then
            ldirection=ldname(name)
            lrunaswd=true
            for i= 0 to 59
                for j= 0 to 27
                    a(i,j)="█ "
                next
            next
            fso.deletefile(strdesktop&"\"&ldname(name)&".txt")
        end if
    next
    if fso.fileexists(strdesktop&"\z.txt") then
        if zidan=0  then
        elseif z then
        else
            z=true
            zidan=zidan-1
        end if
        fso.deletefile(strdesktop&"\z.txt")
    end if
    if fso.fileexists(strdesktop&"\l.txt"  ) then
        if lzidan=0  then
        elseif lz then
        else
            lz=true
            lzidan=lzidan-1
        end if
        fso.deletefile(strdesktop&"\l.txt")
    end if
    if ztime mod 1000=0 then
        zidan=zidan+1
        lzidan=lzidan+1
    end if
    select case direction
        case "w"
            if runaswd then
                n=n-1
                runaswd=false
            end if
            if z then
                for g=0 to n-3
                    a(m,g)="? "
                    iline(g)=m&g
                next
                z=false
            end if
            if n=1 then
                n=n+1
            end if
            a(m,n)="? "
            dimar
            a(m,n-2)="△"
        case "a"
            if runaswd then
                m=m-1
                runaswd=false
            end if
            if z then
                for g=0 to m-3
                    a(g,n)="? "
                    iline(g)=g&n
                next
                z=false
            end if
            if m=1 then
                m=m+1
            end if
            a(m,n)="? "
            dimar
            a(m-2,n)="?"
        case "d"
if runaswd then
            m=m+1
runaswd=false
end if
if z then
for g=m+3 to 59
a(g,n)="? "
iline(g)=g&n
next
z=false
end if
            if m=58 then
                m=m-1
end if
                a(m,n)="? "
dimar
a(m+2,n)="?"
        case "s"
if runaswd then
            n=n+1
runaswd=false
end if
if z then
for g=n+3 to 27
a(m,g)="? "
iline(g)=m&g
next
z=false
end if
            if n=26 then
                n=n-1
end if
                a(m,n)="? "
dimar
a(m,n+2)="▽"
end select
select case ldirection
        case "up"
if lrunaswd then
            q=q-1
lrunaswd=false
end if
if lz then
for g=0 to q-3
a(p,g)="? "
liline(g)=p&g
next
lz=false
end if
            if q=1 then
                q=q+1
end if
                a(p,q)="? "
ldimar
a(p,q-2)="△"
        case "left"
if lrunaswd then
            p=p-1
lrunaswd=false
end if
if lz then
for g=0 to p-3
a(g,q)="? "
liline(g)=g&q
next
lz=false
end if
            if p=1 then
                p=p+1
end if
                a(p,q)="? "
ldimar
a(p-2,q)="?"
        case "right"
if lrunaswd then
            p=p+1
lrunaswd=false
end if
if lz then
for g=p+3 to 59
a(g,q)="? "
liline(g)=g&p
next
lz=false
end if
            if p=58 then
                p=p-1
end if
                a(p,q)="? "
ldimar
a(p+2,q)="?"
        case "down"
if lrunaswd then
            q=q+1
lrunaswd=false
end if
if lz then
for g=q+3 to 27
a(p,g)="? "
liline(g)=p&g
next
lz=false
end if
            if q=26 then
                q=q-1
end if
                a(p,q)="? "
ldimar
a(p,q+2)="▽"
end select
for xxxx=0 to 100
if iline(xxxx)=p&q then
lxueliang=lxueliang-1
elseif iline(xxxx)=p+1&q+1 then
lxueliang=lxueliang-1
elseif iline(xxxx)=p-1&q-1 then
lxueliang=lxueliang-1
end if
if liline(xxxx)=m&n then
xueliang=xueliang-1
elseif liline(xxxx)=m+1&n+1 then
xueliang=xueliang-1
elseif liline(xxxx)=m-1&n-1 then
xueliang=xueliang-1
end if
next
if xueliang=0 then
wshecho()
wscript.echo "1号输了"
wscript.quit
end if
if lxueliang=0 then
wshecho()
wscript.echo "2号输了"
wscript.quit
end if
if ztima mod 200=0 then
                wshecho()
end if
next
end if
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

中国红客联盟公众号

联系站长QQ:5520533

admin@chnhonker.com
Copyright © 2001-2025 Discuz Team. Powered by Discuz! X3.5 ( 粤ICP备13060014号 )|天天打卡 本站已运行