【游戏】Goc赢利模仿器1.0版

打印 上一主题 下一主题

主题 577|帖子 577|积分 1731

Hello!各人好,我是@学霸小羊,本日分享一个Goc游戏。
//注:以下代码为Goc原创代码。
各人可以在下面网址写入代码www.51goc.com慧通教育
http://www.51goc.com
注:Goc编辑器路径:
www.51goc.com ➡ 登录 ➡ 游客登岸 ➡ 入门课程 ➡ WebGoc
实在不行就试一下 下面这个链接:
WebGoc
https://www.51goc.com/static/gocWebNet/gocWebNet.html?submitBt=0&insert=0&ra=60&winName=20200413
给点面子,评论一下这个作品吧!
  1. int main(){
  2.     p.rr(1000,1000,14).hide();
  3.     //pen.button(id,string,col,size, dir,x,y,bgcol,edgecol);
  4.     p.moveTo(0,100);
  5.     p.button(0,"开始游戏",5,50,0,0,-200,1,5);
  6.     pen.text("作者:小羊",5,50,0,0,-40,1);
  7.     while(1)
  8.     {
  9.         int f=0;
  10.         if(buttonMP(0)){break;}
  11.         for(int i=25;i<=150;i++)
  12.         {
  13.             p.rr(800,200,14).text("赚钱模拟器",5,i);
  14.             wait(0.003);
  15.             if(buttonMP(0)){break;f=1;}
  16.             if(i>80)wait(0.001);
  17.             if(buttonMP(0)){break;f=1;}
  18.         }
  19.         if(f==1){break;}
  20.         for(int i=150;i>=25;i--)
  21.         {
  22.             p.rr(800,200,14).text("赚钱模拟器",5,i);
  23.             wait(0.003);
  24.             if(buttonMP(0)){break;f=1;}
  25.         }
  26.         if(f==1){break;}
  27.     }
  28.     int money=0,rishouru=0,baoshidu=50,tianshu=1;
  29.     p.rr(1000,1000,14);
  30.     pen.text("第",13,50,0,325,30,14);
  31.     pen.text(tianshu,13,50,0,325,-30,14);
  32.     pen.text("天",13,50,0,325,-90,14);
  33.     pen.text("日收入:",13,50,0,-275,-185,14);
  34.     pen.text("总资产:",13,50,0,-275,-130,14);
  35.     pen.text("饱食度:",13,50,0,0,-250,14);
  36.     pen.text(rishouru,13,50,0,-120,-185,14);
  37.     pen.text(money,13,50,0,-120,-130,14);
  38.     pen.text(baoshidu,13,50,0,0,-325,14);
  39.    
  40.     p.button(1,"乞讨",5,100,0,-250,-300,1,5);
  41.     p.button(2,"买彩票",5,75,0,250,-250,1,5);
  42.     pen.text("成本100元,收入0—500元",13,20,0,250,-350,14);
  43.     p.button(3,"卖矿泉水",5,50,0,-250,300,1,5);
  44.     pen.text("成本20元,日收入+2元",13,20,0,-250,220,14);
  45.     p.button(4,"卖烟",5,50,0,0,300,1,5);
  46.     pen.text("成本50元,日收入+5元",13,20,0,0,220,14);
  47.     p.button(5,"卖酒",5,50,0,250,300,1,5);
  48.     pen.text("成本200元,日收入+25元",13,20,0,250,220,14);
  49.     p.button(6,"卖饮料",5,50,0,-250,160,1,5);
  50.     pen.text("成本100元,日收入+15元",13,20,0,-250,80,14);
  51.     p.button(7,"做屠夫卖肉",5,50,0,50,160,1,5);
  52.     pen.text("成本500元,日收入+50元",13,20,0,50,80,14);
  53.     p.button(8,"买食物",5,40,0,300,160,1,5);
  54.     pen.text("成本50元,饱食度+20",13,20,0,300,80,14);
  55.     p.button(9,"进城",5,150,0,75,-50,1,5);
  56.     pen.text("花费100000元",13,50,0,75,-175,14);
  57.     p.speed(10).moveTo(-250,-20).r(300,160).hide();
  58.     for(int i=1;;i++)
  59.     {
  60.         if(buttonMP(1)){
  61.             int x=rand(0,rand(20,50));money+=x;
  62.             pen.text(money,13,50,0,-120,-130,14);
  63.             pen.text("乞讨到",13,40,0,-320,-20,14);
  64.             pen.text(x,13,50,0,-225,-20,14);
  65.             pen.text("元",13,40,0,-150,-20,14);
  66.             wait(0.5);
  67.             p.moveTo(-250,-20).rr(290,150,14);
  68.         }
  69.         
  70.         if(buttonMP(2)){
  71.             if(money>=100){
  72.                 money-=100;
  73.                 pen.text(money,13,50,0,-120,-130,14);
  74.                 int t=rand(0,50)*10;money+=t;
  75.                 pen.text(money,13,50,0,-120,-130,14);
  76.                 if(t!=0){
  77.                     pen.text("中奖了!中了:",13,40,0,-250,10,14);
  78.                     pen.text(t,13,50,0,-250,-40,14);
  79.                     pen.text("元",13,30,0,-150,-40,14);
  80.                 }
  81.                 else
  82.                 {
  83.                     pen.text("没中奖。",13,50,0,-250,-20,14);   
  84.                 }
  85.                 wait(1);p.moveTo(-250,-20).rr(290,150,14);
  86.             }
  87.             else
  88.             {
  89.                 pen.text("钱不够!",13,50,0,-250,-20,14);
  90.                 wait(1);p.moveTo(-250,-20).rr(290,150,14);
  91.             }
  92.         }
  93.         
  94.         if(buttonMP(3)){
  95.             if(money>=20){
  96.                 money-=20;rishouru+=2;
  97.                 pen.text(money,13,50,0,-120,-130,14);
  98.                 pen.text(rishouru,13,50,0,-120,-185,14);
  99.                 pen.text("日收入+2元",13,40,0,-250,-20,14);
  100.                 wait(1);p.moveTo(-250,-20).rr(290,150,14);
  101.             }
  102.             else
  103.             {
  104.                 pen.text("钱不够!",13,50,0,-250,-20,14);
  105.                 wait(1);p.moveTo(-250,-20).rr(290,150,14);
  106.             }
  107.         }
  108.         
  109.         if(buttonMP(4)){
  110.             if(money>=50){
  111.                 money-=50;rishouru+=5;
  112.                 pen.text(money,13,50,0,-120,-130,14);
  113.                 pen.text(rishouru,13,50,0,-120,-185,14);
  114.                 pen.text("日收入+5元",13,40,0,-250,-20,14);
  115.                 wait(1);p.moveTo(-250,-20).rr(290,150,14);
  116.             }
  117.             else
  118.             {
  119.                 pen.text("钱不够!",13,50,0,-250,-20,14);
  120.                 wait(1);p.moveTo(-250,-20).rr(290,150,14);
  121.             }
  122.         }
  123.         
  124.         if(buttonMP(5)){
  125.             if(money>=200){
  126.                 money-=200;rishouru+=25;
  127.                 pen.text(money,13,50,0,-120,-130,14);
  128.                 pen.text(rishouru,13,50,0,-120,-185,14);
  129.                 pen.text("日收入+25元",13,40,0,-250,-20,14);
  130.                 wait(1);p.moveTo(-250,-20).rr(290,150,14);
  131.             }
  132.             else
  133.             {
  134.                 pen.text("钱不够!",13,50,0,-250,-20,14);
  135.                 wait(1);p.moveTo(-250,-20).rr(290,150,14);
  136.             }
  137.         }
  138.         
  139.         if(buttonMP(6)){
  140.             if(money>=100){
  141.                 money-=100;rishouru+=15;
  142.                 pen.text(money,13,50,0,-120,-130,14);
  143.                 pen.text(rishouru,13,50,0,-120,-185,14);
  144.                 pen.text("日收入+15元",13,40,0,-250,-20,14);
  145.                 wait(1);p.moveTo(-250,-20).rr(290,150,14);
  146.             }
  147.             else
  148.             {
  149.                 pen.text("钱不够!",13,50,0,-250,-20,14);
  150.                 wait(1);p.moveTo(-250,-20).rr(290,150,14);
  151.             }
  152.         }
  153.         
  154.         if(buttonMP(7)){
  155.             if(money>=500){
  156.                 money-=500;rishouru+=50;
  157.                 pen.text(money,13,50,0,-120,-130,14);
  158.                 pen.text(rishouru,13,50,0,-120,-185,14);
  159.                 pen.text("日收入+50元",13,40,0,-250,-20,14);
  160.                 wait(1);p.moveTo(-250,-20).rr(290,150,14);
  161.             }
  162.             else
  163.             {
  164.                 pen.text("钱不够!",13,50,0,-250,-20,14);
  165.                 wait(1);p.moveTo(-250,-20).rr(290,150,14);
  166.             }
  167.         }
  168.         
  169.         if(buttonMP(8)){
  170.             if(money>=50){
  171.                 money-=50;baoshidu+=20;
  172.                 pen.text("购买成功",13,30,0,-250,10,14);
  173.                 pen.text("饱食度+20",13,30,0,-250,-30,14);
  174.                 pen.text(money,13,50,0,-120,-130,14);
  175.                 pen.text(baoshidu,13,50,0,0,-325,14);
  176.                 wait(1);p.moveTo(-250,-20).rr(290,150,14);
  177.             }
  178.             else
  179.             {
  180.                 pen.text("钱不够!",13,50,0,-250,-20,14);
  181.                 wait(1);p.moveTo(-250,-20).rr(290,150,14);
  182.             }
  183.         }
  184.         
  185.         if(buttonMP(9))
  186.         {
  187.             if(money>=100000){
  188.                 money-=100000;
  189.                 break;
  190.             }
  191.             else
  192.             {
  193.                 pen.text("钱不够!",13,50,0,-250,-20,14);
  194.                 wait(1);p.moveTo(-250,-20).rr(290,150,14);
  195.             }
  196.         }
  197.         
  198.         if(i%25==0)
  199.         {
  200.             money+=rishouru;
  201.             pen.text(money,13,50,0,-120,-130,14);
  202.             baoshidu-=rand(1,2);
  203.             pen.text(baoshidu,13,50,0,0,-325,14);
  204.             tianshu++;
  205.             pen.text(tianshu,13,50,0,325,-30,14);
  206.         }
  207.         if(baoshidu<=0)
  208.         {
  209.             pen.text("你饿了,无法工作。",13,30,0,-250,10,14);
  210.             pen.text("日收入清零。",13,30,0,-250,-30,14);
  211.             rishouru=0;
  212.             pen.text(rishouru,13,50,0,-120,-185,14);
  213.             pause(); p.moveTo(-250,-20).rr(290,150,14);     
  214.         }
  215.         wait(0.075);
  216.     }
  217.     p.moveTo(0,0).rr(1000,1000,14).text("未完待续",5,200,0,0,200,14);
  218.     p.text("敬请期待",5,200,0,0,-200,14);
  219.     return 0;
  220. }
复制代码


免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

笑看天下无敌手

金牌会员
这个人很懒什么都没写!

标签云

快速回复 返回顶部 返回列表