赚钱模拟器2.0版出了!
int main(){
p.rr(1000,1000,14).hide();
//pen.button(id,string,col,size, dir,x,y,bgcol,edgecol);
p.moveTo(0,100);
p.button(0,"开始游戏",5,50,0,0,-200,1,5);
pen.text("作者:小羊",5,50,0,0,-40,1);
while(1)
{
int f=0;
if(buttonMP(0)){break;}
for(int i=25;i<=150;i++)
{
p.rr(800,200,14).text("赚钱模拟器",5,i);
wait(0.003);
if(buttonMP(0)){break;f=1;}
if(i>80)wait(0.001);
if(buttonMP(0)){break;f=1;}
}
if(f==1){break;}
for(int i=150;i>=25;i--)
{
p.rr(800,200,14).text("赚钱模拟器",5,i);
wait(0.003);
if(buttonMP(0)){break;f=1;}
}
if(f==1){break;}
}
int money=100000,rishouru=0,baoshidu=50,tianshu=1;
p.rr(1000,1000,14);
pen.text("第",13,50,0,325,30,14);
pen.text(tianshu,13,50,0,325,-30,14);
pen.text("天",13,50,0,325,-90,14);
pen.text("日收入:",13,50,0,-275,-185,14);
pen.text("总资产:",13,50,0,-275,-130,14);
pen.text("饱食度:",13,50,0,0,-250,14);
pen.text(rishouru,13,50,0,-120,-185,14);
pen.text(money,13,50,0,-120,-130,14);
pen.text(baoshidu,13,50,0,0,-325,14);
p.button(1,"乞讨",5,100,0,-250,-300,1,5);
p.button(2,"买彩票",5,75,0,250,-250,1,5);
pen.text("成本100元,收入0—500元",13,20,0,250,-350,14);
p.button(3,"卖矿泉水",5,50,0,-250,300,1,5);
pen.text("成本20元,日收入+2元",13,20,0,-250,220,14);
p.button(4,"卖烟",5,50,0,0,300,1,5);
pen.text("成本50元,日收入+5元",13,20,0,0,220,14);
p.button(5,"卖酒",5,50,0,250,300,1,5);
pen.text("成本200元,日收入+25元",13,20,0,250,220,14);
p.button(6,"卖饮料",5,50,0,-250,160,1,5);
pen.text("成本100元,日收入+15元",13,20,0,-250,80,14);
p.button(7,"做屠夫卖肉",5,50,0,50,160,1,5);
pen.text("成本500元,日收入+50元",13,20,0,50,80,14);
p.button(8,"买食物",5,40,0,300,160,1,5);
pen.text("成本50元,饱食度+20",13,20,0,300,80,14);
p.button(9,"进城",5,150,0,75,-50,1,5);
pen.text("花费100000元",13,50,0,75,-175,14);
p.speed(10).moveTo(-250,-20).r(300,160).hide();
for(int i=1;;i++)
{
if(buttonMP(1)){
int x=rand(0,rand(20,50));money+=x;
pen.text(money,13,50,0,-120,-130,14);
pen.text("乞讨到",13,40,0,-320,-20,14);
pen.text(x,13,50,0,-225,-20,14);
pen.text("元",13,40,0,-150,-20,14);
wait(0.5);
p.moveTo(-250,-20).rr(290,150,14);
}
if(buttonMP(2)){
if(money>=100){
money-=100;
pen.text(money,13,50,0,-120,-130,14);
int t=rand(0,50)*10;money+=t;
pen.text(money,13,50,0,-120,-130,14);
if(t!=0){
pen.text("中奖了!中了:",13,40,0,-250,10,14);
pen.text(t,13,50,0,-250,-40,14);
pen.text("元",13,30,0,-150,-40,14);
}
else
{
pen.text("没中奖。",13,50,0,-250,-20,14);
}
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
else
{
pen.text("钱不够!",13,50,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
}
if(buttonMP(3)){
if(money>=20){
money-=20;rishouru+=2;
pen.text(money,13,50,0,-120,-130,14);
pen.text(rishouru,13,50,0,-120,-185,14);
pen.text("日收入+2元",13,40,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
else
{
pen.text("钱不够!",13,50,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
}
if(buttonMP(4)){
if(money>=50){
money-=50;rishouru+=5;
pen.text(money,13,50,0,-120,-130,14);
pen.text(rishouru,13,50,0,-120,-185,14);
pen.text("日收入+5元",13,40,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
else
{
pen.text("钱不够!",13,50,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
}
if(buttonMP(5)){
if(money>=200){
money-=200;rishouru+=25;
pen.text(money,13,50,0,-120,-130,14);
pen.text(rishouru,13,50,0,-120,-185,14);
pen.text("日收入+25元",13,40,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
else
{
pen.text("钱不够!",13,50,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
}
if(buttonMP(6)){
if(money>=100){
money-=100;rishouru+=15;
pen.text(money,13,50,0,-120,-130,14);
pen.text(rishouru,13,50,0,-120,-185,14);
pen.text("日收入+15元",13,40,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
else
{
pen.text("钱不够!",13,50,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
}
if(buttonMP(7)){
if(money>=500){
money-=500;rishouru+=50;
pen.text(money,13,50,0,-120,-130,14);
pen.text(rishouru,13,50,0,-120,-185,14);
pen.text("日收入+50元",13,40,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
else
{
pen.text("钱不够!",13,50,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
}
if(buttonMP(8)){
if(money>=50){
money-=50;baoshidu+=20;
pen.text("购买成功",13,30,0,-250,10,14);
pen.text("饱食度+20",13,30,0,-250,-30,14);
pen.text(money,13,50,0,-120,-130,14);
pen.text(baoshidu,13,50,0,0,-325,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
else
{
pen.text("钱不够!",13,50,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
}
if(buttonMP(9))
{
if(money>=100000){
money-=100000;
break;
}
else
{
pen.text("钱不够!",13,50,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
}
if(i%25==0)
{
money+=rishouru;
pen.text(money,13,50,0,-120,-130,14);
baoshidu-=rand(1,2);
pen.text(baoshidu,13,50,0,0,-325,14);
tianshu++;
pen.text(tianshu,13,50,0,325,-30,14);
}
if(baoshidu<=0)
{
pen.text("你饿了,无法工作。",13,30,0,-250,10,14);
pen.text("日收入清零。",13,30,0,-250,-30,14);
rishouru=0;f=0;
pen.text(rishouru,13,50,0,-120,-185,14);
wait(0.1);p.moveTo(-250,-20).rr(290,150,14);
}
wait(0.075);
}
p.moveTo(0,0).rr(1000,1000,14);
rishouru=0,money+=500;int tzzc=0,qianzhai=0,cunkuan=0,lixi=0;
pen.text("第",13,50,0,325,30,14);
pen.text(tianshu,13,50,0,325,-30,14);
pen.text("天",13,50,0,325,-90,14);
pen.text("日收入:",13,50,0,-275,-185,14);
pen.text("总资产:",13,50,0,-275,-130,14);
pen.text("饱食度:",13,50,0,0,-250,14);
pen.text("投资资产:",13,30,0,-250,375,14);
pen.text(tzzc,13,30,0,-125,375,14);
pen.text(rishouru,13,50,0,-120,-185,14);
pen.text(money,13,50,0,-120,-130,14);
pen.text(baoshidu,13,50,0,0,-325,14);
p.button(1,"投资",5,100,0,-250,-300,1,5);
p.button(2,"买彩票",5,75,0,250,-250,1,5);
pen.text("成本100元,收入0—1000元",13,20,0,250,-350,14);
p.button(3,"开便利店",5,50,0,-250,300,1,5);
pen.text("成本2000元,日收入+100元",13,20,0,-250,220,14);
p.button(4,"贷款",5,50,0,0,300,1,5);
pen.text("可贷款100—100 0000元",13,20,0,0,220,14);
p.button(5,"还款",5,50,0,250,300,1,5);
pen.text("欠债",13,20,0,200,220,14);
pen.text(qianzhai,13,20,0,250,220,14);
pen.text("元",13,20,0,300,220,14);
p.button(6,"存钱",5,50,0,-250,160,1,5);
pen.text("存款",13,20,0,-330,100,14);
pen.text(cunkuan,13,20,0,-250,100,14);
pen.text("元",13,20,0,-200,100,14);
lixi=cunkuan/100;
pen.text("利息(日)",13,20,0,-330,70,14);
pen.text(lixi,13,20,0,-250,70,14);
pen.text("元",13,20,0,-200,70,14);
p.button(7,"取钱",5,50,0,0,160,1,5);
pen.text("可取出",13,20,0,-50,90,14);
pen.text(cunkuan,13,20,0,20,90,14);
pen.text("元",13,20,0,70,90,14);
p.button(8,"买食物",5,40,0,300,160,1,5);
pen.text("成本500元,饱食度+25",13,20,0,300,80,14);
p.button(9,"退休",5,60,0,200,-85,1,5);
pen.text("花费1000 0000元",13,20,0,200,-150,14);
p.button(10,"打工",5,60,0,50,30,1,5);
pen.text("饱食度每天消耗+5,日收入+50—200",13,20,0,75,-30,14);
p.speed(10).moveTo(-250,-20).r(300,160).hide();
int f=0,bsdj=0,dkjje=0,ysdf;
bool sfhk=false,ci=true;
for(int i=1;;i++)
{
if(buttonMP(1)){
p.moveTo(-300,0);
cinTitle("请输入投资资金");
int a;cin>>a;
if(money>=a&&a!=0)
{
money-=a;tzzc+=a;
pen.text(tzzc,13,30,0,-125,375,14);
pen.text(money,13,50,0,-120,-130,14);
pen.text("投资成功!",13,50,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
else
{
pen.text("钱不够!",13,50,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
}
if(buttonMP(2)){
if(money>=100){
money-=100;
pen.text(money,13,50,0,-120,-130,14);
int t=rand(0,50)*10;money+=t;
pen.text(money,13,50,0,-120,-130,14);
if(t!=0){
pen.text("中奖了!中了:",13,40,0,-250,10,14);
pen.text(t,13,50,0,-250,-40,14);
pen.text("元",13,30,0,-150,-40,14);
}
else
{
pen.text("没中奖。",13,50,0,-250,-20,14);
}
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
else
{
pen.text("钱不够!",13,50,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
}
if(buttonMP(3)){
if(money>=2000){
money-=2000;rishouru+=100;
pen.text(money,13,50,0,-120,-130,14);
pen.text(rishouru,13,50,0,-120,-185,14);
pen.text("日收入+100元",13,40,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
else
{
pen.text("钱不够!",13,50,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
}
if(buttonMP(4)){
if(dkjje>4999999)
{
pen.text("已 超 过",13,40,0,-250,10,14);
pen.text("贷款金额上限",13,40,0,-250,-40,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
else{
p.moveTo(-300,0);
cinTitle("请输入贷款金额");
int tt;cin>>tt;
if(tt<100)
{
pen.text("金额太小了!",13,35,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
else if(tt<=1000000)
{
dkjje+=tt;ci=false;
qianzhai+=tt+tt/10;pen.text(qianzhai,13,20,0,250,220,14);
money+=tt;pen.text(money,13,50,0,-120,-130,14);
pen.text("贷款成功!",13,40,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
else
{
pen.text("金额太大了!",13,35,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
}
}
if(buttonMP(5)){
if(qianzhai==0)
{
pen.text("无需还款!",13,35,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
else{
sfhk=true;
p.moveTo(-300,0);
cinTitle("请输入还款金额");
int t1;cin>>t1;
if(t1<100)
{
pen.text("金额太小了!",13,35,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
else if(t1>=qianzhai)
{
money-=qianzhai;
pen.text(money,13,50,0,-120,-130,14);
qianzhai=0;pen.text(qianzhai,13,20,0,250,220,14);
pen.text("还款成功!",13,50,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
dkjje-=qianzhai;
}
else if(t1<=1000000)
{
qianzhai-=t1;money-=t1;dkjje-=t1;
pen.text(qianzhai,13,20,0,250,220,14);
pen.text(money,13,50,0,-120,-130,14);
pen.text("还款成功!",13,50,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
else
{
pen.text("金额太大了!",13,35,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
}
}
if(buttonMP(6)){
if(cunkuan>4999999)
{
pen.text("已 超 过",13,40,0,-250,10,14);
pen.text("存款金额上限",13,40,0,-250,-40,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
p.moveTo(-300,0);
cinTitle("请输入存款金额");
int tt;cin>>tt;
p.moveTo(-300,0);
if(tt<100)
{
pen.text("金额太小了!",13,35,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
else if(tt<=1000000)
{
cunkuan+=tt;lixi+=tt/100;
pen.text(cunkuan,13,20,0,-250,100,14);
pen.text(lixi,13,20,0,-250,70,14);
money-=tt;
pen.text(money,13,50,0,-120,-130,14);
pen.text("存款成功!",13,40,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
else
{
pen.text("金额太大了!",13,35,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
}
if(buttonMP(7)){
p.moveTo(-300,0);
cinTitle("请输入取款金额");
int tt;cin>>tt;
p.moveTo(-300,0);
if(tt<100)
{
pen.text("金额太小了!",13,35,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
else if(tt<=cunkuan)
{
cunkuan-=tt;lixi=cunkuan/100;
pen.text(cunkuan,13,20,0,-250,100,14);
pen.text(lixi,13,20,0,-250,70,14);
money+=tt;
pen.text(money,13,50,0,-120,-130,14);
pen.text("取款成功!",13,40,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
else
{
pen.text("存款不足!",13,35,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
}
if(buttonMP(8)){
if(money>=500){
money-=500;baoshidu+=25;
pen.text("购买成功",13,30,0,-250,10,14);
pen.text("饱食度+25",13,30,0,-250,-30,14);
pen.text(money,13,50,0,-120,-130,14);
pen.text(baoshidu,13,50,0,0,-325,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
else
{
pen.text("钱不够!",13,50,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
}
if(buttonMP(9))
{
if(dkjje)
{
pen.text("请先还清债务",13,30,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
else{
if(money>=10000000){
money-=10000000;
break;
}
else
{
pen.text("钱不够!",13,50,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
}
}
if(buttonMP(10)){
bsdj+=5;
f++;
pen.text(money,13,50,0,-120,-130,14);
pen.text("日收入增加",13,40,0,-250,-20,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
if(i%25==0)
{
ysdf+=rand(18,24);
money+=rand(50,rand(100,200))*f;
money+=rishouru;
pen.text(money,13,50,0,-120,-130,14);
baoshidu-=rand(1,5)+bsdj;
pen.text(baoshidu,13,50,0,0,-325,14);
tianshu++;
pen.text(tianshu,13,50,0,325,-30,14);
cunkuan+=lixi;
pen.text(cunkuan,13,20,0,-250,100,14);
pen.text(lixi,13,20,0,-250,70,14);
}
if(i%200==0&&tzzc!=0)
{
int t=rand(0,10);
if(t<=3){
int s=rand(2,4);
tzzc-=tzzc/s;
pen.text(tzzc,13,30,0,-125,375,14);
pen.text("亏损",13,50,0,-250,20,14);
pen.text(tzzc/s,13,50,0,-250,-40,14);
pen.text("元",13,50,0,-140,-40,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
else {
int z=rand(3,4);
money+=tzzc/z;
pen.text("获得分红",13,50,0,-250,20,14);
pen.text(tzzc/z,13,50,0,-250,-40,14);
pen.text("元",13,50,0,-140,-40,14);
pen.text(money,13,50,0,-120,-130,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
}
if(i%750==0&&!sfhk&&!ci)
{
pen.text("未及时还款",13,30,0,-250,20,14);
pen.text("扣除500元",13,30,0,-250,-40,14);money-=500;
pen.text("欠款+500元",13,30,0,-250,-70,14);qianzhai+=500;
wait(1);p.moveTo(-250,-20).rr(290,150,14);
sfhk=false;
}
if(i%175==0)
{
lixi+=cunkuan/100;
pen.text(lixi,13,20,0,-250,70,14);
}
if(i%750==0)
{
int sdf=ysdf*15/10;
money-=sdf;ysdf=0;
pen.text(money,13,50,0,-120,-130,14);
pen.text("交水电费",13,50,0,-250,20,14);
pen.text(sdf,13,50,0,-250,-40,14);
pen.text("元",13,50,0,-140,-40,14);
wait(1);p.moveTo(-250,-20).rr(290,150,14);
}
if(baoshidu<=0)
{
pen.text("你饿了,无法工作。",13,30,0,-250,10,14);
pen.text("日收入清零。",13,30,0,-250,-30,14);
rishouru=0;f=0;
pen.text(rishouru,13,50,0,-120,-185,14);
wait(0.1);p.moveTo(-250,-20).rr(290,150,14);
}
wait(0.075);
}
return 0;
}