网址为119.23.30.17 密码为75111 注意游玩时要开大写
#include <iostream>
#include <vector>
#include <string>
#include <windows.h>
#include <conio.h>
#include <algorithm> // 添加这个头文件以使用 max 和 min 函数
#include<bits/stdc++.h>
#include<windows.h>
#include<stdio.h>
#include<conio.h>
#include<time.h>
#define h 40
#define w 150
#define Nor if(B[b].x<5) B[b].x=5;
#define Out1 Bx1-Bvx1<=6||Bx1-Bvx1>=28||By1-Bvy1<=7||By1-Bvy1>=27
#define Out2 Bx2-Bvx2<=6||Bx2-Bvx2>=28||By2-Bvy2<=7||By2-Bvy2>=27
#define Chang1 {Bwhat1=0;Bvx1=Bvy1=0;memset(Bgo1,0,sizeof(Bgo1));}
#define Chang2 {Bwhat2=0;Bvx2=Bvy2=0;memset(Bgo2,0,sizeof(Bgo2));}
#define Chang3 {Bwhat3=0;Bvx3=Bvy3=0;memset(Bgo3,0,sizeof(Bgo3));}
using namespace std;
string mm,gl,ys="751",yss="11";
char js=2,rsjs=1;
int ssss,hhh,ck,dx=22,dy=28,hh=5,sy[4],wy[400]={-27,-5,27,5,-19,-47,19,47,-1,-44},sy1[4]={0,8,3,20},sy11[4]={0,8,3,20},sy2[4]={0,8,0,17},sy22[4]={0,8,0,17},sy3[4]={0,8,0,17},sy33[4]={0,8,0,17},sy4[4]={0,8,63,80},sy44[4]={0,8,63,80},sy55[4]={19,27,20,37},sy5[4]={19,27,20,37},cs[100]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},hm[8]={-1,0,1,0,0,1,0,-1},fx,smz=1,sd=200,txz,rs,bs,dj,sjd=50,jb=10,ss,b=1,tmp[107],n,d,x,e,f,op;
char aax[10]={'W','D','S','A'},sz[10]={'0','1','2','3'};
char dt1[1000][1000]={
" ",
" ",
" ##=#####################################################################################################",
" # # # # # # # # # # #",
" # ##### ####### ######### # ## # # # # # # ### #### # ############## ######### ### #",
" # ## # # # # # # # # # # # # # #### # ## #$# #",
" # # ## # ### # ## # ### # ### # # # # # ### # # ######## #### # ### # #",
" # ### # # # # # # ######## # #### # ### # ###### # # #",
" # # ### # ##### # ## ############### # # ### # ## # ######## #### # # #",
" # # # # # # # # # ##### ###### # # ## ###### ###### # # # # #",
" # #### ## # # ## # # ########### ### # # ### ## ## # # # ## # #",
" # ### # # # ### ## # ##### # # ## # # ## # # # ## # #",
" # # # # # # # ## # # # # # # # # # # # # # #",
" # # ## # # # # # ### # # # # # # # ## # #",
" # # ### ## # # ## # # # ## # #### ### #",
" # ### # # right or left, # #### # # # # # #",
" # # #### # up and down! ## ### ## ########### ### # #",
" # # ###### # | ------- # # # #",
" # #<##># # ---+--- | ----relax for a while! # # ## ####### ## # ##### #",
" # #### ## #### # / \\ | | # # # ## # # # # ##!#",
" # #$ # / \\ / \\| # # # # # #### # ##### #",
" # ## ########## ################ ################## #### ######## ### # # # ### #",
" # # # |# # # # # surprise! # # ## ## ## #",
" # # # ## # # # # ## # #### ### ## ^/\\^ ## # # #### ##################################",
" # # # # # # # # # # # \\__/ # # # # # too lazy,don't want to worok'!#",
" ## # # # # # #### # ## # ## ############## ## ### # ## ##################### # #",
" # # # # ### # # # # # ## # # |##| # ## # ######## # #",
" # # # # # # # # # # ## ################ ## ## # # ############### ### # # #",
" # # # # # # # # # # # ### ## # # # ####### # ## # ##",
" # # ## # # # ### # # # ## ### # ## #### ### # # # ################# ## # # #",
" # ### # # # # # # # # # # ## ## ## # # ## # # # # # # # ## # #",
" ## ##| # # # # # # # # # # ## # ###### # ## ### # # # # # # # ### #",
" # ### # ## # # # # ## # # # # ## ### # ## # # ##############################",
" # # # # # # # # # # # # # ## # ##### ## #### ## # # # # # # # #",
" ## # # ### # # # # # # # # ### # # # # ###### # # # # # # # # # # ## #",
" # # # # # # # ## # # # # # # # # ### # # ## # # # # # # # # #__# # ## #",
" # # # # # # # # # # # # ## # # # # ## # # # # # # # # # # # # #",
" # # #### # # # @ ####### # # # # # # ## ################### # # # # # # # # # # # # # # #",
" # # # ?# # # ###! # ## # # # # # #$ #",
" ########################################################################################################",};
char dt2[1000][1000]={
" ",
" ",
" ##################################################",
" #| ( #",
" ################### #################### # #",
" # $ # # # # # ####",
" # # # # # # | #",
" # # # # # # ###",
" # # ##### ##### # # | #",
" # ] [ # ###",
" ################### #################### | #",
" # ] [ #######",
" # # ##### ##### # #",
" # # # # # $ #",
" # # # # # #",
" #$ # # # # #",
" ################### ####################",
" #! # # # # #",
" # # # # # $ #",
" # $ # # # # #",
" # # ##### ##### # #",
" # } [ #",
" ################### ####################",
" # ] { #",
" # # ##### ##### # #",
" # # # # # #",
" # # # # # ###",
" # $ # # # # &i#",
" ###########################################",};
char dt3[1000][1000]={
" ",
" ",
" ##########################################################",
" ## ( #",
" ## # #",
" ## ##### ##### ####",
" ## ## # # ## | #",
" ## #### # ###### # #### ###",
" ## #### # ###### # #### | #",
" # ## # ###### # ## ###",
" # | #",
" # ###",
" # ##########",
" # ## ## # #",
" # #### ## | #",
" # ## #### # | #",
" # #### ## # # !#",
" # #### # ___# #",
" ## ## # | # #",
" #| # | # #",
" #| ## | # #",
" #| @# | # @ #",
" #| ## | # #",
" #| # | # #",
" ## ## # | # #",
" # #### # |___# #",
" # #### ## # # #",
" # ## #### # | #",
" # #### ## | #",
" # ## ## # #",
" # ####### #",
" # # #",
" # [ #",
" # ## # ###### # ## # #",
" ## #### # ###### # #### #&#########",
" ## #### # ###### # #### # #",
" ## ## # @ # ## # ### #",
" ## ##### ##### # ### #",
" ## # ### #",
" ## # |",
" #######################################################",};
char dt4[1000][1000]={
"",
"",
"#########################################################",
"# ##",
"# ###### world 1 ]#",
"# # ##",
"# # ### rest for a while world 2 #",
"# # ### ##",
"# world 3 #",
"# ######### ##",
"# monny shop # / # world 4 #",
"# @ { +=- } ##",
"# EXP shop # * # world 5 #",
"# @ ######### ##",
"# key shop world 6 #",
"# @ ##",
"# ??? shop relax yourself. world 7 #",
"# @ ##",
"# ??? shop world 8 #",
"# @ ##",
"########################### ###########################",
" # # ",
" # # ",
" ######### ",};
// 原代码中未定义 dt5,这里假设 dt5 是一个占位符,可根据实际情况修改
char dt5[1000][1000] = {0};
// 声明 dt 数组
char dt[1000][1000];
// 边界检查函数
void checkBoundary(int& x, int& y, int minX, int maxX, int minY, int maxY) {
x = std::max(minX, std::min(x, maxX));
y = std::max(minY, std::min(y, maxY));
}
int ti(float a) {return ((int)(a*10+5))/10;}
void Setpos(float x,float y){COORD pos;pos.X=ti(y*4)/2;pos.Y=ti(x);SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),pos);}
void HideCursor(){CONSOLE_CURSOR_INFO cursor_info = { 1, 0 };SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cursor_info);}
void YD(int x,int y);
int test(int n);
void C(int o);
void XVX();
void BD();
void JZJM(){
HideCursor();
Setpos(0,0);
for(int i=0;i<40;i++){
for(int j=0;j<150;j++){
cout<<" ";
}
}
Setpos(0,0);
for(int i=1;i<=25;i++){Setpos(20,7+i-1),cout<<"__";}
Setpos(21,6),cout<<"|",Setpos(21,32),cout<<"|";
for(int i=1;i<=25;i++){Setpos(22,7+i-1),cout<<"▔";}
for(int i=1;i<=25;i++){Setpos(21,7+i-1);cout<<"▇",Setpos(23,17),cout<<i*4<<"%",Setpos(5,17),cout<<"正在加载中",Setpos(5,22);for(int i=0;i<3;i++){cout<<".",Sleep(10),Setpos(5,22+i*0.5),cout<<" ";}}
Sleep(100);
Setpos(5,17),cout<<" ";
for(int i=1;i<=25;i++){Setpos(20,7+i-1),cout<<" ";}
for(int i=1;i<=27;i++){Setpos(21,6+i-1),cout<<" ";}
for(int i=1;i<=25;i++){Setpos(22,7+i-1),cout<<" ";}
Setpos(23,17),cout<<" ";
C(hh);
}
void C(int o){
HideCursor();
Setpos(0,0);
for(int i=0;i<1000;i++){
for(int j=0;j<1000;j++){
if(o==1){dt[i][j]=dt1[i][j];}
if(o==2){dt[i][j]=dt2[i][j];}
if(o==3){dt[i][j]=dt3[i][j];}
if(o==4){dt[i][j]=dt4[i][j];}
if(o==5){dt[i][j]=dt5[i][j];}
}
}
for(int i=0;i<4;i++){
if(o==1){sy[i]=sy1[i];}
if(o==2){sy[i]=sy2[i];}
if(o==3){sy[i]=sy3[i];}
if(o==4){sy[i]=sy4[i];}
if(o==5){sy[i]=sy5[i];}
}
// 边界检查
checkBoundary(dx, dy, sy[0], sy[1] - 1, sy[2], sy[3] - 1);
Setpos(0,0);
for(int i=sy[0];i<sy[1];i++){
for(int j=sy[2];j<sy[3];j++){
if(i==dx&&j==dy){
cout<<"@";
continue;
}
cout<<dt[i][j];
}cout<<"\n";
}
cout<<endl;
cout<<" 血量:"<<smz;
cout<<" 金币:"<<jb<<endl;
cout<<" 等级:"<<dj;
cout<<" 速度:"<<dj*dj+1<<endl;
cout<<dx<<" "<<dy<<endl;
cout<<sy[0]<<" "<<sy[1]<<" "<<sy[2]<<" "<<sy[3];
if(smz<=0&&rs>0){smz+=3,--rs;}
if(smz<=0||cs[11]==1){
hhh=hh;
for(int i=0;i<4;i++){
if(hhh==1){sy1[i]=sy11[i];}
if(hhh==2){sy2[i]=sy22[i];}
if(hhh==3){sy3[i]=sy33[i];}
if(hhh==4){sy4[i]=sy44[i];}
}
if(smz<=0){Setpos(11,15.5),cout<<"*你死了!*",Sleep(1000),Setpos(11,15.5),cout<<" ";}
if(cs[11]=1<=0){Setpos(11,15.5),cout<<"*退出成功!*",Sleep(1000),Setpos(11,15.5),cout<<" ",cs[11]=0;}
hh=5,dx=22,dy=28,smz=1,ssss=1,JZJM(),C(hh);
}
YD(dx,dy);
}
int test(int n){
int sum=0;
for(int j=1;j<n;j++){if(n%j==0){sum+=j;}}
return sum; // 原代码缺少返回值,这里补充
}
void YD(int x,int y){
srand(time(0));
char cc,ch=getch();
for(int i=0;i<4;i++){if(ch==aax[i]){fx=i,x+=hm[i],y+=hm[i+4];}}
if(ch=='O'){
for(int i=0;i<5;i++){
cc=getch();
mm+=cc;
}
if(mm==ys){
Setpos(3,2);
cout<<"*密码正确!*";
cs[4]=1;
Sleep(1000);
C(hh);
}else{
Setpos(3,2);
cout<<"*密码错误!*";
Sleep(1000);
mm=gl;
C(hh);
}
}
// 边界检查
checkBoundary(x, y, sy[0], sy[1] - 1, sy[2], sy[3] - 1);
if(dt[x][y]!='#'){
bs++;
if(bs>=sjd){sjd*=2,bs=0,dj++;}
if(hh==1&&dt[x][y]=='&'&&txz==0&&cs[4]==0){
Setpos(3,2);
cout<<"请输入密码!";
if(ss>0){
Setpos(3,2);
cout<<"是否使用钥匙?";
}
Sleep(1500);
C(hh);
}
if(ch==' '){
ch=getch();
for(int i=0;i<4;i++){if(ch==sz[i]){hh=i,C(hh);}}
}
if(ch=='Y'){cs[4]=1,--ss;}
if(hh==3&&dt[x][y]=='}'&&cs[5]==0){
if(ss>0){
Setpos(3,2);
if(cs[5]==0){cout<<"是否使用钥匙H";}
Sleep(1000);
Setpos(0,0);
for(int i=sy[0];i<sy[1];i++){
for(int j=sy[2];j<sy[3];j++){
if(i==dx&&j==dy){
cout<<js;
continue;
}
cout<<dt[i][j];
}cout<<"\n";
}
ch=getch();
if(ch=='H'){cs[5]=1,C(hh);}
}Sleep(1000),C(hh);
}
if(hh==3&&dt[x][y]=='{'&&cs[6]==0){
if(ss>0){
Setpos(3,2);
if(cs[6]==0){cout<<"是否使用钥匙J";}
Sleep(1000);
Setpos(0,0);
for(int i=sy[0];i<sy[1];i++){
for(int j=sy[2];j<sy[3];j++){
if(i==dx&&j==dy){
cout<<js;
continue;
}
cout<<dt[i][j];
}cout<<"\n";
}
ch=getch();
if(ch=='J'){cs[6]=1,C(hh);}
}Sleep(1000),C(hh);
}
if(ch=='Q'&&hh!=5){
Setpos(3,2),cout<<"是否退出探险R",Sleep(1000),Setpos(3,2),cout<<" ";
Setpos(0,0);
for(int i=sy[0];i<sy[1];i++){
for(int j=sy[2];j<sy[3];j++){
if(i==dx&&j==dy){
cout<<js;
continue;
}
cout<<dt[i][j];
}cout<<"\n";
}
ch=getch();
if(ch=='R'){cs[11]=1,C(hh);}
C(hh);
}
if(ch=='0'){Sleep(1000),BD();}
if(hh==5&&x==4&&y==55){for(int i=0;i<4;i++){sy5[i]=sy55[i];}hh=1,ssss=0,dx+=wy[8],dy+=wy[9],JZJM(),Sleep(1000),C(hh);}
if(hh==3&&dt[x][y]=='$'){dt3[x][y]=' ',jb+=10;}
if(hh==1&&x==22&&y==59){hh=3,dx+=wy[4],dy+=wy[5],C(hh);}
if(hh==3&&x==3&&y==10){hh=1,dx+=wy[6],dy+=wy[7],C(hh);}
if(hh==2&&dt[x][y]==1){dt2[x][y]=' ',++rs;}
if(hh==1&&dt[x][y]=='='){hh=2,dx+=wy[0],dy+=wy[1],C(hh);}
if(hh==2&&dt[x][y]=='='){hh=1,dx+=wy[2],dy+=wy[3],C(hh);}
if(hh==2&&dt[x][y]=='?'){dt2[x][y]=' ',smz-=2;}
if(hh==2&&dt[x][y]=='$'){dt2[x][y]=' ',jb+=50;}
if(hh==1&&dt[x][y]=='!'){dt1[x][y]=' ',++ss;}
if(hh==2&&dt[x][y]=='!'){dt2[x][y]=' ',++ss;}
if(hh==1&&x==13&&y==36&&cs[1]==0){++dj,cs[1]=1;}
if(hh==1&&x==27&&y==21&&cs[0]==0){++smz,cs[0]=1;}
if(hh==1&&x==31&&y==108&&cs[2]==0){sjd/=2,cs[2]=1;}
if(hh==1&&dt[x][y]=='$'){dt1[x][y]=' ',jb+=40;}
if(dt[x][y]=='*'&&hh==1){if(rand()%2==0){dt1[13][18]='#';}else{smz+=2;}dt1[x][y]=' ';}
if(dt[x][y]=='_'&&hh==1){--smz;}
if(dt[x][y]=='_'&&hh==2){--smz;}
if(fx==0){--sy[0],--sy[1];}
if(fx==1){++sy[2],++sy[3];}
if(fx==2){++sy[0],++sy[1];}
if(fx==3){--sy[2],--sy[3];}
for(int i=0;i<4;i++){
if(hh==1){sy1[i]=sy[i];}
if(hh==2){sy2[i]=sy[i];}
if(hh==3){sy3[i]=sy[i];}
if(hh==4){sy4[i]=sy[i];}
if(hh==5){sy5[i]=sy[i];}
}
dx=x,dy=y;
}
Sleep(sd-(dj*dj));
C(hh);
}
void XVX(){
HideCursor();
MessageBox(NULL,"欢迎来到坤坤游戏!\n制作者:该","活该有限公司",4%37);
MessageBox(NULL,"先输入密码!","活该有限公司",4%37);
for(int i=0;i<5;i++){
Setpos(10,16),cout<<"__________";
Setpos(11,15.5),cout<<"|",Setpos(11,21),cout<<"|";
Setpos(12,16),cout<<"▔▔▔▔▔",Setpos(11,16.5);
for(int i=0;i<5;i++){
char cc=getch();
cout<<". ";
mm+=cc;
}
Setpos(10,16),cout<<" ";
Setpos(11,16.5),cout<<" ",Setpos(11,21),cout<<" ";
Setpos(12,16),cout<<" ",Setpos(11,17.5);
if(mm==ys+yss){mm=gl,Setpos(11,15.5),cout<<"*密码正确!*",Sleep(1000),Setpos(11,15.5),cout<<" ",HideCursor(),JZJM();}else{Setpos(11,15.5),Setpos(11,15.5),cout<<"*密码错误!*",Sleep(1000),Setpos(11,15.5),cout<<" ",cout<<" ",mm=gl;}
cs[10]=1;
}
}
void BD(){
string lj[100]={"119.23.30.17","137.23.91.37","138.23.91.38","158.07.60.90"},srlj;
int ljo;
srand(time(0));
HideCursor();
Setpos(0,0);
for(int i=0;i<40;i++){
for(int j=0;j<150;j++){
cout<<" ";
}
}
Setpos(0,0);
for(int i=0;i<5;i++){
Setpos(5,17),cout<<" ^__^ ";
Setpos(6,17),cout<<"(百度)";
Setpos(7,17),cout<<" ▔▔ ";
Setpos(10,15.5),cout<<"______________";
Setpos(11,15),cout<<"|",Setpos(11,22.5),cout<<"|";
Setpos(12,15.5),cout<<"▔▔▔▔▔▔▔";
Setpos(11,16);
cin>>srlj;
Sleep(100);
Setpos(10,15.5),cout<<" ";
Setpos(11,14.5),cout<<" ";
Setpos(12,15.5),cout<<" ";
Setpos(5,17),cout<<" ";
Setpos(6,17),cout<<" ",Setpos(6,20),cout<<" ";
Setpos(7,17),cout<<" ",Sleep(300);
Setpos(6,18),cout<<" ",Sleep(200);
Setpos(6,13.5),cout<<"真实百度,拒绝盗版!";
for(int i=0;i<5;i++){Setpos(11,17);for(int j=0;j<4;j++){cout<<". ",Sleep(100),Setpos(11,17+j),cout<<" ";}}
Setpos(6,13.5),cout<<" ";
for(int i=0;i<100;i++){
if(srlj==lj[i]){
Setpos(6,15.5),cout<<"已连接此链接!";
Sleep(1000);
Setpos(6,+15.5),cout<<" ";
ljo=i;
if(ljo==0&&cs[10]==0){XVX();}
if(cs[10]==1){Setpos(6,15),cout<<"该链接已被禁止!",Sleep(1000),Setpos(6,15.5),cout<<" ";}
}
}
Setpos(6,15.5),cout<<"未找到该链接!";
Sleep(1000);
Setpos(6,15.5),cout<<" ";
}
return;
}
int main(){
HideCursor();
MessageBox(NULL,"欢迎来到百度链接!\n制作者:袁得韬","韬韬有限公司",4%37);
BD();
return 0;
}