#include<iostream>
#include<bits/stdc++.h>
#include<cmath>
#include<iomanip>
#include <stdio.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<conio.h>
#include <stdio.h>
#include <cstdio>
#include <unistd.h>
#include <limits>
#include <cstdlib>
#include<windows.h>
#define A 1000
using namespace std;
unsigned long long i,j,k,a[15],sj,b[15],d,db=0,xz,bs;
unsigned long long p[15],cp1,cp2,tx,bf1,bf2,day=1,a6,a7;
unsigned long long pp[150],gs=250,sl,su=1,xz1,x1,sg=250,syf=180,sym=0,lo=1;
bool q1,ll=true;
int gb[100000],gbt1[10000],gbt2[10000];
string s2s,s3s;
char s1s[10000];
struct timeget {
int nian,yue,ri,shi,fen,miao;
void huoqutime() {
system("echo 当前时间日期: %date% %time% > datetime.txt");
ifstream file("datetime.txt");
if (file) {
string datetime;
getline(file, datetime);
nian=((datetime[14]-'0')*1000+(datetime[15]-'0')*100+(datetime[16]-'0')*10+(datetime[17]-'0'));
yue=((datetime[19]-'0')*10)+(datetime[20]-'0');
ri=((datetime[22]-'0')*10+(datetime[23]-'0'));
shi=((datetime[30]-'0')*10+(datetime[31]-'0'));
fen=((datetime[33]-'0')*10+(datetime[34]-'0'));
miao=((datetime[36]-'0')*10+(datetime[37]-'0'));
//cout<<datetime<<endl;
//cout<<nian<<" "<<yue<<" "<<ri<<" "<<shi<<" "<<fen<<" "<<miao;
//for(int i=0;i<datetime.size();++i)
remove("datetime.txt");
}
}
timeget operator -(const timeget x)const {
timeget y;
int ss[13]= {0,31,28,31,30,31,30,31,31,30,31,30,31};
y.nian=x.nian-nian;
if(x.yue>yue) {
y.nian--;
y.yue=yue-x.yue+12;
} else {
y.yue=yue-x.yue;
}
if(x.ri>ri) {
y.yue--;
y.ri=ri-x.ri+ss[y.yue+1];
} else {
y.ri=ri-x.ri;
}
if(x.shi>shi) {
y.ri--;
y.shi=shi-x.shi+24;
} else {
y.shi=shi-x.shi;
}
if(x.fen>fen) {
y.shi--;
y.fen=fen-x.fen+60;
} else {
y.fen=fen-x.fen;
}
if(x.miao>miao) {
y.fen--;
y.miao=miao-x.miao+60;
} else {
y.miao=miao-x.miao;
}
return y;
}
};
void de1(int x) {
int y=0;
switch (x) {
case 1:
y=15;
break;
case 2:
y=10;
break;
case 3:
y=9;
break;
case 4:
y=13;
break;
case 5:
y=14;
break;
case 6:
y=12;
break;
}
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),y);
}
void de2() {
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
}
inline void cd(int x) {
Sleep(x);
system("cls");
}
void gs1(string x) {
int a=x.size()-1;
for(i=0; i<=a; ++i) {
Sleep(100);
cout<<x[i];
}
}
void gs2(string x,int z) {
int a=x.size()-1;
for(i=0; i<=a; ++i) {
Sleep(z);
cout<<x[i];
}
}
struct hl {
long long h,l;
};
void de(int x) {
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),x);
}
bool ax(long long key) {
return (GetKeyState(key) < 0) ? (true) : (false);
}
typedef void (*hs)();
struct wdj {
int x1,x2,y1,y2;
string z;
hs h;
};
bool axj(long long key) {
return (GetKeyState(key) < 0) ? (true) : (false);
}
void srwj() {
de(15);
int saved_fd = dup(STDIN_FILENO);
if (saved_fd == -1) {
cerr << "保存 stdin 失败\n";
while(1) {}
}
if (freopen("yhdl.txt", "r", stdin) == NULL) {
close(saved_fd);
cout<<"无存档"<<endl;
exit(0);
}
int value,ccc;
cin.clear();
while ((ccc = getchar()) != '\n' && ccc != EOF);
if (dup2(saved_fd, STDIN_FILENO) == -1) {
cerr << "恢复 stdin 失败\n";
close(saved_fd);
while(1) {}
}
close(saved_fd);
cin.clear();
cin.sync();
cout<<"读档成功";
Sleep(1000);
system("cls");
}
void drwj() {
int saved_stdout = dup(STDOUT_FILENO);
if (saved_stdout == -1) {
perror("dup failed");
while(1) {}
}
if (freopen("yhdl.txt", "w", stdout) == NULL) {
//perror("freopen failed");
}
fflush(stdout);
if (dup2(saved_stdout, STDOUT_FILENO) == -1) {
perror("dup2 failed");
while(1) {}
}
close(saved_stdout);
}
hl wz(bool x = 1, bool n = 1) {
HANDLE hOutput = GetStdHandle(STD_OUTPUT_HANDLE);
HWND h = GetForegroundWindow();
CONSOLE_FONT_INFO consoleCurrentFont;
hl hl;
POINT p;
if (x) {
GetCursorPos(&p);
ScreenToClient(h, &p);
} else {
GetCursorPos(&p);
}
if (n) {
GetCurrentConsoleFont(hOutput, FALSE, &consoleCurrentFont);
p.x /= consoleCurrentFont.dwFontSize.X;
p.y /= consoleCurrentFont.dwFontSize.Y;
}
hl.h = p.y + 1;
hl.l = p.x + 1;
return hl;
}
void ycbj() {
HANDLE hStdin = GetStdHandle(STD_INPUT_HANDLE);
DWORD mode;
GetConsoleMode(hStdin, &mode);
mode &= ~ENABLE_QUICK_EDIT_MODE;
SetConsoleMode(hStdin, mode);
return;
}
void ycgb() {
CONSOLE_CURSOR_INFO cursor;
cursor.bVisible = FALSE;
cursor.dwSize = sizeof(cursor);
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorInfo(handle, &cursor);
return;
}
inline void ydgb(long long h, long long l) {
COORD pos = { l - 1,h - 1 };
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorPosition(hOut, pos);
return;
}
string jcjp() {
if(GetAsyncKeyState('1'))return "1";
if(GetAsyncKeyState('2'))return "2";
if(GetAsyncKeyState('3'))return "3";
if(GetAsyncKeyState('4'))return "4";
if(GetAsyncKeyState('5'))return "5";
if(GetAsyncKeyState('6'))return "6";
if(GetAsyncKeyState('7'))return "7";
if(GetAsyncKeyState('8'))return "8";
if(GetAsyncKeyState('9'))return "9";
if(GetAsyncKeyState('0'))return "0";
if(GetAsyncKeyState(VK_BACK))return "b";
if(GetAsyncKeyState(13))return "a";
return "";
}
void bxwz(int size) {
CONSOLE_FONT_INFOEX cfi = { sizeof(cfi) };
GetCurrentConsoleFontEx(GetStdHandle(STD_OUTPUT_HANDLE), FALSE, &cfi);
cfi.dwFontSize.Y = size; // 修改字体高度SetCurrentConsoleFontEx(GetStdHandle(STD_OUTPUT_HANDLE), FALSE, &cfi);
}
void datdh(int all) {
Sleep(2000);
system("cls");
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" o "<<endl;
Sleep(400);
system("cls");
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" o "<<endl;
cout<<" "<<endl;
Sleep(400);
system("cls");
cout<<" "<<endl;
cout<<" o "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
Sleep(400);
system("cls");
cout<<" o "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
Sleep(400);
system("cls");
cout<<" o "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
Sleep(400);
system("cls");
cout<<" o "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
Sleep(400);
system("cls");
cout<<" "<<endl;
cout<<" o "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
Sleep(400);
system("cls");
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" o "<<endl;
cout<<" "<<endl;
Sleep(400);
system("cls");
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" o "<<endl;
Sleep(400);
system("cls");
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
Sleep(400);
system("cls");
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
Sleep(400);
system("cls");
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" o "<<endl;
Sleep(1000);
system("cls");
cout<<"第";
Sleep(1000);
system("cls");
cout<<"第"<<all;
Sleep(1000);
system("cls");
cout<<"第"<<all<<"天";
Sleep(1000);
system("cls");
}
struct wp {
string wn;
int jg;
};
struct bb {
string nz;
int sl;
};
wp a1[A];
bb a2[A];
wp a3[A];
wp a4[A];
string gs1(string x,int z) {
int a=x.size()-2;
for(j=0; j<=a; ++j) {
Sleep(z);
cout<<x[j];
}
string y;
y+=x[a+1];
return y;
}
void cj() {
cd(100);
cout<<"出G"<<endl;
cin>>xz;
if(db<xz) {
srand(time(0));
for(i=1; i<=50; ++i) {
de1(rand()%6+1);
gs1("sbs",100);
de2();
}
for(i=1; i<=50; ++i) {
de1(rand()%6+1);
gs1("..",200);
de2();
}
return;
}
db-=xz;
Sleep(1000);
system("cls");
cout<<"规则:抽奖(1%*100 2%*50 5%*10 10%*5 50%*1 32%*0.1)"<<endl;
system("pause");
Sleep(2000);
system("cls");
srand(time(0));
int x=rand()%100+1;
if(x==100) {
system("color 4C");
Sleep(1000);
system("color 0F");
de1(6);
cout<<"G币加"<<xz*100;
db+=(xz*100);
} else if(x>=98) {
system("color 6E");
Sleep(1000);
system("color 0F");
de1(5);
cout<<"G币加"<<xz*50;
db+=(xz*50);
} else if(x>=93) {
system("color 5D");
Sleep(1000);
system("color 0F");
de1(4);
cout<<"G币加"<<xz*10;
db+=(xz*10);
} else if(x>=83) {
system("color 39");
Sleep(1000);
system("color 0F");
de1(3);
cout<<"G币加"<<xz*5;
db+=(xz*5);
} else if(x>=33) {
system("color 2A");
Sleep(1000);
system("color 0F");
de1(2);
cout<<"G币加"<<xz;
db+=(xz);
} else {
system("color 7F");
Sleep(1000);
system("color 0F");
de1(1);
cout<<"G币加"<<x*0;
db+=(xz*0);
}
de2();
Sleep(1500);
system("cls");
}
void cs() {
a1[1]= {"铅笔",3};
a1[2]= {"橡皮",2};
a1[3]= {"草",10};
a1[4]= {"土",5};
a1[5]= {"木头",4};
a1[6]= {"铁锭",30};
a1[7]= {"铁钉",2};
a1[8]= {"铜线",10};
a1[9]= {"铜锭",20};
a1[10]= {"铝片",10};
a1[11]= {"铝块",100};
a1[12]= {"钻石",500};
a1[13]= {"黄金锭",2000};
a1[14]= {"黄金块",20000};
a1[15]= {"钛合金锭",5000};
a1[16]= {"钛合金块",50000};
a1[17]= {"面包",5};
a1[18]= {"大米",25};
a1[19]= {"一把塑料袋",5};
a1[20]= {"杯子",5};
a1[21]= {"金坷垃",100};
a1[22]= {"可乐",5};
a1[23]= {"纸",10};
a1[24]= {"作业",10};
a1[25]= {"D老师的糖果",100000};
a1[26]= {"炸药",100};
a1[27]= {"邓鱼",20};
a1[28]= {"鱼项航(只是鱼名)",10};
a1[29]= {"橘子",5};
a1[30]= {"香蕉",5};
}
void bg() {
int xz=0;
Sleep(1000);
system("cls");
while(1) {
xz=0;
cout<<"格子:"<<gs<<"/"<<sg<<endl;
cout<<"买格"<<endl;
cout<<"退出"<<endl;
for(i=1; i<=su; ++i) {
if(a2[i].sl<=0) {
} else {
cout<<a2[i].nz<<" 数量:"<<a2[i].sl<<endl;
}
}
while(!xz) {
hl w=wz(1,1);
if(w.h==2&&w.l<=4) {
ydgb(2,5);
cout<<"\b\b\b\b";
de(240);
cout<<"买格";
de(15);
if(axj(VK_LBUTTON))xz=1;
} else {
ydgb(2,5);
cout<<"\b\b\b\b";
de(15);
cout<<"买格";
}
if(w.h==3&&w.l<=4) {
ydgb(3,5);
cout<<"\b\b\b\b";
de(207);
cout<<"退出";
de(15);
if(axj(VK_LBUTTON))xz=2;
} else {
ydgb(3,5);
cout<<"\b\b\b\b";
de(12);
cout<<"退出";
de(15);
}
}
if(xz==1) {
cd(100);
cout<<"输入你想买的格数(10G/格)"<<endl;
cin>>sl;
Sleep(1000);
system("cls");
if(db<(sl*10)) {
for(i=1; i<=10000; ++i) {
Sleep(1);
cout<<"撒B!没钱别买!"<<endl;
}
return ;
} else {
cout<<"机付包减"<<(sl*10)<<"G";
db-=(sl*10);
Sleep(1000);
system("cls");
cout<<"格子加 "<<sl;
sg+=sl;
gs+=sl;
Sleep(1000);
}
}
if(xz==2) {
Sleep(1000);
system("cls");
break;
}
system("cls");
}
}
void sxmm() {
int sb;
for(i=1; i<=10; ++i)pp[i]=0;
srand(time(0));
for(i=1; i<=10; ++i) {
q1=true;
sb=rand()%30+1;
for(j=1; j<=i; j++) {
if(sb==pp[j]) {
i--;
q1=false;
break;
}
}
pp[i]=sb;
if(q1==false) {
continue;
i--;
}
a4[i]=a3[i]=a1[sb];
}
srand(time(0));
for(i=1; i<=10; i++) {
sb=rand()%2+1;
if(sb==1) {
sb=rand()%a3[i].jg;
a3[i].jg+=sb;
}
if(sb==2) {
sb=rand()%a3[i].jg;
a3[i].jg-=sb;
}
}
}
void mm() {
int xz=0;
Sleep(1000);
system("cls");
while(1) {
xz=0;
cout<<"每天都会刷新"<<endl;
cout<<"机付包:"<<db<<"G"<<endl;
cout<<"格子:"<<gs<<"/"<<sg<<endl;
de(14);
for(i=1; i<=10; ++i) {
cout<<"购买或出售 "<<a3[i].wn<<" 价格:"<<a3[i].jg<<"G"<<" 市场价:"<<a4[i].jg<<"G"<<endl;
}
de(15);
cout<<"打开背包"<<endl;
cout<<"退出"<<endl;
while(!xz) {
hl d=wz(1,1);
for(int i=1; i<=10; ++i) {
if(d.h==i+3&&d.l<=12) {
ydgb(i+3,13);
cout<<"\b\b\b\b\b\b\b\b\b\b\b\b";
de(239);
cout<<"购买或出售";
de(15);
if(axj(VK_LBUTTON)) {
xz=i;
}
} else {
ydgb(i+3,13);
cout<<"\b\b\b\b\b\b\b\b\b\b\b\b";
de(14);
cout<<"购买或出售";
de(15);
}
}
if(d.h==14&&d.l<=8) {
ydgb(14,9);
cout<<"\b\b\b\b\b\b\b\b";
de(159);
cout<<"打开背包";
de(15);
if(axj(VK_LBUTTON)) {
xz=11;
}
} else {
ydgb(14,9);
cout<<"\b\b\b\b\b\b\b\b";
de(9);
cout<<"打开背包";
de(15);
}
if(d.h==15&&d.l<=4) {
ydgb(15,5);
cout<<"\b\b\b\b";
de(207);
cout<<"退出";
de(15);
if(axj(VK_LBUTTON)) {
xz=12;
}
} else {
ydgb(15,5);
cout<<"\b\b\b\b";
de(12);
cout<<"退出";
de(15);
}
Sleep(50);
}
if(xz<=10) {
int xz1=0;
Sleep(100);
system("cls");
cout<<"购买"<<endl;
cout<<"出售"<<endl;
while(!xz1) {
hl w=wz(1,1);
if(w.h==1&&w.l<=4) {
ydgb(1,5);
cout<<"\b\b\b\b";
de(239);
cout<<"购买";
de(15);
if(axj(VK_LBUTTON))xz1=1;
} else {
ydgb(1,5);
cout<<"\b\b\b\b";
de(14);
cout<<"购买";
de(15);
}
if(w.h==2&&w.l<=4) {
ydgb(2,5);
cout<<"\b\b\b\b";
de(207);
cout<<"出售";
de(15);
if(axj(VK_LBUTTON))xz1=2;
} else {
ydgb(2,5);
cout<<"\b\b\b\b";
de(12);
cout<<"出售";
de(15);
}
}
cd(100);
if(xz1==1) {
cout<<"输入想买的数量"<<endl;
cin>>sl;
if(db<(sl*a3[xz].jg)) {
Sleep(1000);
system("cls");
cout<<"G不够"<<endl;
Sleep(1000);
system("cls");
cout<<"你被踢出去了"<<endl;
return ;
} else if(gs<sl) {
Sleep(1000);
system("cls");
cout<<"你不能买那么多"<<endl;
Sleep(1000);
continue;
}
Sleep(1000);
system("cls");
cout<<"机付包减"<<sl*a3[xz].jg<<"G"<<endl;
db-=(sl*a3[xz].jg);
Sleep(1000);
system("cls");
cout<<"背包加 "<<a3[xz].wn<<"X"<<sl;
gs-=sl;
for(i=1; i<=su; ++i) {
if(a2[i].nz==a3[xz].wn) {
a2[i].sl+=sl;
break;
} else if(i==su) {
a2[i].nz=a3[xz].wn;
a2[i].sl=sl;
su++;
break;
}
}
}
if(xz1==2) {
cout<<"输入你想卖的数量"<<endl;
cin>>sl;
for(i=1; i<=su; ++i) {
if(a2[i].nz==a3[xz].wn) {
x1=i;
break;
} else if(i==su) {
Sleep(1000);
system("cls");
cout<<"你没有这个物品"<<endl;
Sleep(1000);
system("cls");
cout<<"你被踢出去了"<<endl;
Sleep(1000);
system("cls");
return ;
}
}
if(a2[x1].sl<sl) {
Sleep(1000);
system("cls");
cout<<"你没有那么多"<<endl;
Sleep(1000);
system("cls");
continue;
Sleep(1000);
system("cls");
}
Sleep(1000);
system("cls");
cout<<"机付包加"<<sl*a3[xz].jg<<"G"<<endl;
db+=(sl*a3[xz].jg);
Sleep(1000);
system("cls");
cout<<"背包减 "<<a2[x1].nz<<"X"<<sl;
gs+=sl;
a2[x1].sl-=sl;
}
Sleep(1000);
system("cls");
}
if(xz==11) {
bg();
}
if(xz==12) {
break;
}
system("cls");
}
}
void kt() {
for(i=1; i>=1; --i) {
cout<<" G币人生"<<endl;
cout<<setw(5)<<i<<"S";
Sleep(1000);
system("cls");
}
system("cls");
//a6=7432;
//a7=30;
cout<<"欢迎来到G币人生"<<endl;
Sleep(500);
cout<<"这里你需要通过不同的方法赚G币"<<endl;
Sleep(1000);
system("cls");
cout<<"开始吧!"<<endl;
Sleep(500);
system("cls");
cout<<"我将给你10个G币"<<endl;
db=10;
Sleep(500);
cout<<"机付包到账10G"<<endl;
Sleep(500);
system("cls");
}
void gg() {
Sleep(1000);
system("cls");
Sleep(1000);
cout<<"广告开始";
Sleep(1000);
system("cls");
gs1("跑酷");
cd(1000);
gs1("生死三选一");
cd(1000);
cout<<"============================================================================="<<endl;//1
cout<<" ="<<endl;//2
cout<<" ="<<endl;//3
cout<<" < < ="<<endl;//4
cout<<" < < ="<<endl;//5
cout<<" < < < < < < ="<<endl;//6
cout<<" ---------^^^^----^^^----^^^----^^^^----- < ="<<endl;//7
cout<<" = - < ="<<endl;//8
cout<<" - < ="<<endl;//9
cout<<" < ="<<endl;//10
cout<<" < ="<<endl;//11
cout<<" < ="<<endl;//12
cout<<"===========^ ==-======== ==^^^--^^^-=^^^--^^^=-^^^==^^^=<<^^====-^^^^^^^ ="<<endl;//13
cout<<" < ="<<endl;//14
cout<<" < ="<<endl;//15
cout<<" < ="<<endl;//16
cout<<" < < ="<<endl;//17
cout<<" < < ="<<endl;//18
cout<<" ^^^ < < > < < < << <> <$^="<<endl;//19
cout<<"----------------- -----------------------------------------^^----^^------="<<endl;//20
//12345678901234567890123456789012345678901234567890123456789012345678901234567
//0 1 2 3 4 5 6 7
int ps=15;
hl w1z[ps+1]= {{},{19,2},{14,4},{15,5},{16,6},{17,7},{18,8},{19,9},{14,10},{14,11},{15,12},{11,13},{12,14},{12,15},{12,16},{12,17}};
for(int i=1; i<=ps; ++i) {
ydgb(w1z[i].h,w1z[i].l);
cout<<"*";
Sleep(150);
//ydgb(w1z[i].h,w1z[i].l+1);
cout<<"\b ";
}
cd(150);
gs1("大胆一跃");
cd(150);
cout<<" "<<endl;//1
cout<<" = < "<<endl;//2
cout<<" = < < "<<endl;//3
cout<<" = < < $"<<endl;//4
cout<<" = < --=^^="<<endl;//5
cout<<" = < < "<<endl;//6
cout<<" --- < < < "<<endl;//7
cout<<" = < "<<endl;//8
cout<<" ======- ^-===---=----=-=----=====^===-===== "<<endl;//9
cout<<" "<<endl;//10
cout<<" "<<endl;//11
cout<<" --- "<<endl;//12
cout<<" "<<endl;//13
cout<<" "<<endl;//14
cout<<" "<<endl;//15
cout<<" -"<<endl;//16
cout<<" "<<endl;//17
cout<<" "<<endl;//18
cout<<" "<<endl;//19
cout<<" ------------- ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^------------------------------"<<endl;//20
//12345678901234567890123456789012345678901234567890123456789012345678901234567
//0 1 2 3 4 5 6 7
int ps1=15;
hl w1z1[ps1+1]= {{11,17},{4,18},{5,19},{6,20},{4,21},{5,22},{6,23},{1,24},{2,26},{3,27},{4,28},{1,30},{1,31},{2,32},{3,33},{4,33}};
for(int i=1; i<=ps1; ++i) {
ydgb(w1z1[i].h,w1z1[i].l);
cout<<"*";
Sleep(150);
//ydgb(w1z[i].h,w1z[i].l+1);
cout<<"\b ";
}
cd(1000);
gs1("更多内容在http://10.139.199.199/d/gfhd/user/212中,点下方链接即可进入跑酷");
cout<<endl;
cout<<"跑酷";
for(int i=1; i<=100; ++i) {
hl es=wz(1,1);
if(es.h==2&&es.l<=4) {
cout<<"\b\b\b\b";
de(240);
cout<<"跑酷";
de(15);
if(axj(VK_LBUTTON)) {
system("start http://10.139.199.199/d/gfhd/user/212");
}
} else {
cout<<"\b\b\b\b";
de(15);
cout<<"跑酷";
}
Sleep(100);
}
cd(1000);
cout<<"机付包到账5G";
db+=5;
Sleep(1000);
system("cls");
}
void kp() {
Sleep(1000);
system("cls");
cout<<"出G(赢了你将得两倍)"<<endl;
bf1=0;
bf2=0;
cin>>bs;
if(db<bs) {
cout<<"余额不足";
Sleep(1000);
system("cls");
cout<<"你被踢出去了!!!";
Sleep(1000);
system("cls");
return;
}
db-=bs;
cout<<"机付包减"<<bs<<"G"<<endl;
Sleep(1000);
system("cls");
cout<<"规则:"<<endl;
cout<<"你将得到5张牌,你可以出任意一张,只能出有的,4>3>2>1,1可以干掉4"<<endl;
system("pause");
system("cls");
srand(time(0));
for(i=1; i<=5; ++i) {
p[i]=rand()%4+1;
}
srand(time(0));
for(i=1; i<=5; ++i) {
Sleep(1000);
system("cls");
cout<<"对方:你 "<<bf1<<":"<<bf2<<endl;
cout<<"第"<<i<<"回合";
tx=0;
Sleep(2000);
system("cls");
srand(time(0));
cp1=rand()%2+1;
srand(time(0));
if(cp1==1) {
cp1=rand()%3+1;
}
if(cp1==2) {
cp1=rand()%4+1;
}
for(j=1; j<=5; ++j) {
if(p[j]!=0) {
cout<<p[j]<<" ";
}
}
cout<<endl;
while(1) {
if(tx==1) {
cout<<"再次";
}
tx=0;
cout<<"出牌"<<endl;
cin>>cp2;
for(j=1; j<=5; ++j) {
if(p[j]==cp2) {
break;
} else {
if(j==5) {
cout<<"不能出没有的牌"<<endl;
tx=1;
}
}
}
if(tx==0) {
for(j=1; j<=5; ++j) {
if(p[j]==cp2) {
p[j]=0;
break;
}
}
break;
}
}
Sleep(500);
system("cls");
cout<<"?对方 你?";
Sleep(500);
system("cls");
cout<<" 对? ? ";
Sleep(500);
system("cls");
cout<<" 对方"<<cp1<<" "<<cp2<<"你";
Sleep(500);
system("cls");
if(cp1<cp2) {
if(cp1==1&&cp2==4) {
cout<<" 对方"<<cp1<<" "<<"你";
tx=1;
} else {
cout<<" 对方"<<" "<<cp2<<"你";
tx=0;
}
}
if(cp1>cp2) {
if(cp1==4&&cp2==1) {
cout<<" 对方"<<" "<<cp2<<"你";
tx=0;
} else {
cout<<" 对方"<<cp1<<" "<<"你";
tx=1;
}
}
if(cp1==cp2) {
cout<<" 对方"<<" "<<"你";
tx=2;
}
Sleep(1000);
system("cls");
if(tx==1) {
cout<<"这回合你输了";
bf1++;
}
if(tx==0) {
cout<<"这回合你赢了";
bf2++;
}
if(tx==2) {
cout<<"这回合平局";
}
}
Sleep(2000);
system("cls");
if(bf1>bf2) {
cout<<"你输了";
bf1++;
}
if(bf1<bf2) {
cout<<"你赢了"<<endl;
bf2++;
Sleep(1000);
cout<<"机付包到账"<<bs*2<<"G";
db+=(bs*2);
Sleep(1000);
}
if(bf1==bf2) {
cout<<"平局"<<endl;
Sleep(1000);
cout<<"机付包到账"<<bs<<"G";
db+=bs;
Sleep(1000);
}
}
void hm() {
for(i=1; i<=10; ++i) {
a[i]=0;
}
Sleep(1000);
system("cls");
d=0;
srand(time(0));
cout<<"输入你想买的被数,1为1倍,2为2倍"<<endl;
cin>>bs;
if(db<bs) {
cout<<"余额不足";
Sleep(1000);
system("cls");
cout<<"你被踢出去了!!!";
Sleep(1000);
system("cls");
return;
}
db-=bs;
cout<<"机付包减"<<bs<<"G"<<endl;
Sleep(1000);
system("cls");
cout<<"每对上一个你卖彩票的G乘2(第一次为你卖彩票的G)"<<endl;
cout<<"输入你的号码(6位,0~30)"<<endl;
cin>>b[1]>>b[2]>>b[3]>>b[4]>>b[5]>>b[6];
Sleep(1000);
system("cls");
cout<<"5秒后开奖";
Sleep(1000);
system("cls");
for(i=4; i>=1; i--) {
cout<<i<<"s";
Sleep(1000);
system("cls");
}
for(i=1; i<=6; ++i) {
sj=rand()%30;
for(k=1; k<=30; ++k) {
a[i]=k;
if(k==sj) {
system("cls");
break;
}
cout<<setw(2)<<setfill('0')<<a[1]<<" "<<setw(2)<<setfill('0')<<a[2]<<" "<<setw(2)<<setfill('0')<<a[3]<<" "<<setw(2)<<setfill('0')<<a[4]<<" "<<setw(2)<<setfill('0')<<a[5]<<" "<<setw(2)<<setfill('0')<<a[6];
Sleep(10);
system("cls");
}
}
for(i=1; i<=6; ++i)cout<<setw(2)<<setfill('0')<<a[i]<<" ";
for(i=1; i<=6; ++i) {
for(j=1; j<=6; ++j) {
if(a[i]==b[j]) {
if(d==0) {
d+=bs;
} else {
d*=2;
}
}
}
}
cout<<endl;
for(i=1; i<=6; ++i)cout<<setw(2)<<setfill('0')<<b[i]<<" ";
cout<<endl;
cout<<"你得"<<d<<"个G币"<<endl;
db+=d;
system("pause");
system("cls");
}
void shuru() {
cd(100);
de(15);
de(11);cout<<"第"<<setw(2)<<setfill('0')<<day<<"天"<<setw(2)<<setfill('0')<<syf%6<<"时"<<setw(2)<<setfill('0')<<sym<<"分"<<endl;de(15);
de(12);cout<<"剩余"<<30-day<<"天"<<endl;de(15);
de(14);cout<<"机付包:"<<db<<"G"<<endl;de(15);
cout<<"卡牌对战"<<endl;
cout<<"彩票"<<endl;
cout<<"广告"<<endl;
cout<<"市场"<<endl;
cout<<"睡觉觉"<<endl;
cout<<"抽奖"<<endl;
cout<<"老虎机"<<endl;
cout<<"退出"<<endl;
}
void lhj(){
cd(100);
int xz=0;
cout<<"选择倍率"<<" 剩余G币:"<<db<<endl;
cout<<"2倍 10G"<<endl;
cout<<"5倍 50G"<<endl;
cout<<"10倍 200G"<<endl;
cout<<"20倍 500G"<<endl;
cout<<"50倍 1500G"<<endl;
cout<<"100倍 5000G"<<endl;de(14);
cout<<"1000倍 100000G"<<endl;de(15);
int zs[]={0,10,50,200,500,1500,5000,100000},sz[]={0,2,5,10,20,50,100,1000};
while(!xz){
hl s=wz();
if(s.h==2&&s.l<=7){ydgb(2,8);cout<<"\b\b\b\b\b\b\b";de(240);cout<<"2倍 10G";de(15);
if(axj(VK_LBUTTON))xz=1;
}else{ydgb(2,8);cout<<"\b\b\b\b\b\b\b";de(15);cout<<"2倍 10G";}
if(s.h==3&&s.l<=7){ydgb(3,8);cout<<"\b\b\b\b\b\b\b";de(240);cout<<"5倍 50G";de(15);
if(axj(VK_LBUTTON))xz=2;
}else{ydgb(3,8);cout<<"\b\b\b\b\b\b\b";de(15);cout<<"5倍 50G";}
if(s.h==4&&s.l<=9){ydgb(4,10);cout<<"\b\b\b\b\b\b\b\b\b";de(240);cout<<"10倍 200G";de(15);
if(axj(VK_LBUTTON))xz=3;
}else{ydgb(4,10);cout<<"\b\b\b\b\b\b\b\b\b";de(15);cout<<"10倍 200G";}
if(s.h==5&&s.l<=9){ydgb(5,10);cout<<"\b\b\b\b\b\b\b\b\b";de(240);cout<<"20倍 500G";de(15);
if(axj(VK_LBUTTON))xz=4;
}else{ydgb(5,10);cout<<"\b\b\b\b\b\b\b\b\b";de(15);cout<<"20倍 500G";}
if(s.h==6&&s.l<=10){ydgb(6,11);cout<<"\b\b\b\b\b\b\b\b\b\b";de(240);cout<<"50倍 1500G";de(15);
if(axj(VK_LBUTTON))xz=5;
}else{ydgb(6,11);cout<<"\b\b\b\b\b\b\b\b\b\b";de(15);cout<<"50倍 1500G";}
if(s.h==7&&s.l<=11){ydgb(7,12);cout<<"\b\b\b\b\b\b\b\b\b\b\b";de(240);cout<<"100倍 5000G";de(15);
if(axj(VK_LBUTTON))xz=6;
}else{ydgb(7,12);cout<<"\b\b\b\b\b\b\b\b\b\b\b";de(15);cout<<"100倍 5000G";}
if(s.h==8&&s.l<=14){ydgb(8,15);cout<<"\b\b\b\b\b\b\b\b\b\b\b\b\b\b";de(239);cout<<"1000倍 100000G";de(15);
if(axj(VK_LBUTTON))xz=7;
}else{ydgb(8,15);cout<<"\b\b\b\b\b\b\b\b\b\b\b\b\b\b";de(14);cout<<"1000倍 100000G";de(15);}
}
if(zs[xz]>db){
cd(100);
cout<<"sb";
db=0;
cd(1000);
return ;
}
cd(100);
const int Max=20;
struct cj{
char nz;
int jg;
}ad[Max+1];
ad[1]={'a',3};
ad[2]={'b',2};
ad[3]={'d',2};
ad[4]={'o',3};
ad[5]={'7',7};
ad[6]={'w',3};
ad[7]={'A',2};
ad[8]={'B',3};
ad[9]={'p',2};
ad[10]={'#',4};
ad[11]={'@',5};
ad[12]={'&',6};
ad[13]={'?',10};
ad[14]={'+',11};
ad[15]={'|',9};
ad[16]={'-',12};
ad[17]={'>',9};
ad[18]={'<',10};
ad[19]={'$',15};
ad[20]={';',14};
cout<<"-----价格表-------"<<endl;
for(int i=1;i<=Max;++i){
cout<<ad[i].nz<<" "<<ad[i].jg<<endl;
}
system("pause");
cd(1000);
cout<<"点击开奖"<<endl;
cout<<"|--老虎机--| o" <<endl;
cout<<"|I I I I|-|" <<endl;
cout<<"|----------| " <<endl;
srand(time(0));
int zp[4]={0,rand()%Max+1,rand()%Max+1,rand()%Max+1};
for(int i=1;i<=3;){
if(i<=1){
zp[1]=rand()%Max+1;
ydgb(3,5);
cout<<"\b\b";
cout<<" "<<ad[zp[1]].nz;
}
if(i<=2){
zp[2]=rand()%Max+1;
ydgb(3,8);
cout<<"\b\b";
cout<<" "<<ad[zp[2]].nz;
}
if(i<=3){
zp[3]=rand()%Max+1;
ydgb(3,11);
cout<<"\b\b";
cout<<" "<<ad[zp[3]].nz;
}
if(axj(VK_LBUTTON)){
i++;Sleep(500);
}
}
cd(100);
if(zp[1]==zp[2]&&zp[2]==zp[3]){
db-=zs[xz];
db+=ad[zp[1]].jg*ad[zp[1]].jg*ad[zp[1]].jg*sz[xz];
cout<<"恭喜你获得"<<ad[zp[1]].jg*ad[zp[1]].jg*ad[zp[1]].jg*sz[xz]<<"G"<<endl;
}else{
if(zp[1]==zp[2]){
db-=zs[xz];
db+=ad[zp[1]].jg*ad[zp[1]].jg*sz[xz];
cout<<"恭喜你获得"<<ad[zp[1]].jg*ad[zp[1]].jg*sz[xz]<<"G"<<endl;
}else if(zp[1]==zp[3]){
db-=zs[xz];
db+=ad[zp[1]].jg*ad[zp[1]].jg*sz[xz];
cout<<"恭喜你获得"<<ad[zp[1]].jg*ad[zp[1]].jg*sz[xz]<<"G"<<endl;
}else if(zp[2]==zp[3]){
db-=zs[xz];
db+=ad[zp[2]].jg*ad[zp[2]].jg*sz[xz];
cout<<"恭喜你获得"<<ad[zp[2]].jg*ad[zp[2]].jg*sz[xz]<<"G"<<endl;
}else{
db-=zs[xz];
cout<<"很遗憾你什么也没有"<<endl;
}
}
Sleep(1000);
system("pause");
}
int main() {
system("mode con cols=80 lines=40");
system("title G币人生");
//system("shutdown /sg /t 60 /c c++正在关闭");
kt();
ycgb();
ycbj();
cout.tie(0);
cin.tie(0);
cs();
sxmm();
system("cls");
shuru();
timeget last,now,yon;
last.huoqutime();
now.huoqutime();
for(int i=1;1;i++) {
//cd(50);
ydgb(1,15);
cout<<"\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b";
de(11);cout<<"第"<<setw(2)<<setfill('0')<<day<<"天"<<setw(2)<<setfill('0')<<syf%6<<"时"<<setw(2)<<setfill('0')<<sym<<"分"<<endl;de(15);
if(last.miao!=now.miao||last.fen!=now.fen){
yon=now.operator -(last);
last=now;
//cout<<yon.nian<<" "<<yon.yue<<" "<<yon.ri<<" "<<yon.shi<<" "<<yon.fen<<" "<<yon.miao;
syf-=yon.fen;
if(sym<yon.miao){
syf-=1;
sym=sym+60-yon.miao;
}else{
sym-=yon.miao;
}
lo=29-syf/6;
}
if(lo<=day)lo=day;
hl w=wz(1,1);
if(w.h==4&&w.l<=8) {
ydgb(4,9);
cout<<"\b\b\b\b\b\b\b\b";
de(240);
cout<<"卡牌对战";
de(15);
if(axj(VK_LBUTTON))xz=1;
} else {
ydgb(4,9);
cout<<"\b\b\b\b\b\b\b\b";
de(10);
cout<<"卡牌对战";
de(15);
}
if(w.h==5&&w.l<=4) {
ydgb(5,5);
cout<<"\b\b\b\b";
de(240);
cout<<"彩票";
de(15);
if(axj(VK_LBUTTON))xz=2;
} else {
ydgb(5,5);
cout<<"\b\b\b\b";
de(9);
cout<<"彩票";
de(15);
}
if(w.h==6&&w.l<=4) {
ydgb(6,5);
cout<<"\b\b\b\b";
de(223);
cout<<"广告";
de(15);
if(axj(VK_LBUTTON))xz=3;
} else {
ydgb(6,5);
cout<<"\b\b\b\b";
de(13);
cout<<"广告";
de(15);
}
if(w.h==7&&w.l<=4) {
ydgb(7,5);
cout<<"\b\b\b\b";
de(239);
cout<<"市场";
de(15);
if(axj(VK_LBUTTON))xz=4;
} else {
ydgb(7,5);
cout<<"\b\b\b\b";
de(14);
cout<<"市场";
de(15);
}
if(w.h==8&&w.l<=6) {
ydgb(8,7);
cout<<"\b\b\b\b\b\b";
de(191);
cout<<"睡觉觉";
de(15);
if(axj(VK_LBUTTON)){
lo++;xz=5;
}
} else {
ydgb(8,7);
cout<<"\b\b\b\b\b\b";
de(11);
cout<<"睡觉觉";
de(15);
}
if(w.h==9&&w.l<=4) {
ydgb(9,5);
cout<<"\b\b\b\b";
de(143);
cout<<"抽奖";
de(15);
if(axj(VK_LBUTTON))xz=6;
} else {
ydgb(9,5);
cout<<"\b\b\b\b";
de(8);
cout<<"抽奖";
de(15);
}
if(w.h==10&&w.l<=6) {
ydgb(10,7);
cout<<"\b\b\b\b\b\b";
de(223);
cout<<"老虎机";
de(15);
if(axj(VK_LBUTTON))xz=8;
} else {
ydgb(10,7);
cout<<"\b\b\b\b\b\b";
de(13);
cout<<"老虎机";
de(15);
}
if(w.h==11&&w.l<=4) {
ydgb(11,5);
cout<<"\b\b\b\b";
de(207);
cout<<"退出";
de(15);
if(axj(VK_LBUTTON))xz=7;
} else {
ydgb(11,5);
cout<<"\b\b\b\b";
de(12);
cout<<"退出";
de(15);
}
if(xz==1) {
kp();
shuru();
xz=0;
}
if(xz==2) {
hm();
shuru();
xz=0;
}
if(xz==3) {
gg();
shuru();
xz=0;
}
if(xz==4) {
mm();
shuru();
xz=0;
}
if(xz==5||day!=lo) {
//cout<<day<<" "<<lo;
Sleep(1000);
system("cls");
day=lo;
sxmm();
datdh(day);
shuru();
xz=0;
syf=(30-day)*6-1;
sym=59;
//day++;
}
if(xz==6) {
cj();
shuru();
xz=0;
}
if(xz==7) {
return 0;
}
if(xz==8){
lhj();
shuru();
xz=0;
}
if(day==30) {
Sleep(1000);
system ("cls");
cout<<"游戏结束"<<endl;
cout<<"你一共赚了"<<db<<"G"<<endl;
return 0;
}
if(i%20==0){
now.huoqutime();
}
Sleep(50);
//system("cls");
}
return 0;
}