猫史档案馆


高贵的木叶龙A35d

高贵的木叶龙A35d

Lv.1

获赞:83收藏:40浏览:1098作品收藏:59

签名:https://shequ.codemao.cn/community/330512 请看此贴,我已经永久退猫了,再见

回复帖子评论
上一页5 页 / 共 24下一页

本SHQ工作室成员专用 中回复

(async()=>{
    for(y=8;y<128;y++){
        for(x=0;x<128;x++){
            for(z=0;z<128;z++){
                if(voxels.getVoxel(x,y,z)==voxels.id('air')){
                    voxels.setVoxel(x,y,z,voxels.id('/*岩浆*/'))//岩浆方块自己写
                }
            }
        };await sleep(1000);
    }
})()

2020-05-06T10:06:19 点赞:0

本SHQ工作室成员专用 中回复

//模仿系统说话代码:放控制台或者代码栏都可
world.say("你要说的话")

//控制别人说话
world.querySelectorAll('player').forEach((x) => {if (x.player.name == "你想要坑的人") {x.say("我是***")}}) 

//让自己飞行
world.querySelectorAll('player').forEach((x) => {if (x.player.name == "名字鬼知道") {x.player.canFly = true}});

//让自己解除飞行
world.querySelectorAll('player').forEach((x) => {if (x.player.name == "名字鬼知道") {x.player.canFly = flase}});

//让自己变身幽灵,无视实体
world.querySelectorAll('player').forEach((x) => {if (x.player.name == "名字鬼知道") {x.player.spectator = true}});

//让自己变回人类,有实体影响
world.querySelectorAll('player').forEach((x) => {if (x.player.name == "名字鬼知道") {x.player.spectator = flase}});

// 控制玩家的行走和跳跃
world.querySelectorAll('player').forEach((x) => {if (x.player.name == "你要坑的人") {x.velocity.y+=1}})// 跳一下

world.querySelectorAll('player').forEach((x) => {if (x.player.name == "你要坑的人") {x.velocity.x+=1}}) // 向右或左走一步

world.querySelectorAll('player').forEach((x) => {if (x.player.name == "你要坑的人") {x.velocity.z+=1}}) // 向前向后退

world.querySelectorAll('player').forEach((x) => {if (x.player.name == "你要坑的人") {x.velocity.x=10}}) //传送

//控制玩家大小
world.querySelectorAll('player').forEach((x) => {if (x.player.name == "你要坑的人") {x.player.scale = 6}}) // scale 的值可以变

//触碰控制玩家隐身
world.querySelectorAll('player').forEach((x) => {if (x.player.name == "名字鬼知道") {x.player.invisible = true}}); // true是隐身 false是解除

//触碰控制玩家现身
world.querySelectorAll('player').forEach((x) => {if (x.player.name == "名字
鬼知道") {x.player.invisible = false}}); // true是隐身 false是解除

//让玩家发光
world.querySelectorAll('player').forEach((x) => {if (x.player.name == "名字鬼知道") {x.player.emissive = 2}});

//下方代码纯属过期,基本没用

// 强制退出游戏
world.querySelectorAll('player').forEach((x) => {if (x.player.name == "你要坑的人") {x.player.Pokering=true}}); //true是喵亡

// 强制退出游戏
world.querySelectorAll('player').forEach((x) => {if (x.player.name == "你要坑的人") {x.fixed = true}}); //true是喵亡





2020-05-06T10:20:56 点赞:1

本SHQ工作室成员专用 中回复

world.onTick(()=>{world.querySelectorAll('player').forEach((e)=>{
    if(e.position.y<0){e.hurt(e.hp/10+1);}

    })
})
//掉虚空凋谢

2020-05-06T10:25:02 点赞:0

本SHQ工作室成员专用 中回复

world.onPlayerJoin(({entity})=>{
    entity.player.crouchAcceleration=0.5;
    entity.player.crouchSpeed=0.5;
    entity.player.walkAcceleration=0.5;
    entity.player.walkSpeed=0.5;
    entity.player.runAcceleration=0.5;
    entity.player.runSpeed=0.5;
    entity.player.jumpAccelerationFactor=0.5;
    entity.player.jumpPower=0.75;
    entity.player.jumpSpeedFactor=0.5;
    entity.player.doublejumpAccelerationFactor=0.5;
    entity.player.doublejumpPower=0.75;
    entity.player.doublejumpSpeedFactor=0.5;
    entity.player.swimAcceleration=0.5;
    entity.player.swimSpeed=0.5;
    entity.player.flyAcceleration=0.5;
    entity.player.flySpeed=0.5;
    entity.player.fallAcceleration=0.05;
})
//更改玩家的一些设置

2020-05-06T10:29:16 点赞:0

本SHQ工作室成员专用 中回复

setInterval(() => {
    world.querySelectorAll('*').forEach((e) => {
        if (e.isPlayer&&e.player.name=='你要整的人的名字') {
            e.position=new Box3Vector3(Math.floor(Math.random()*128),11,Math.floor(Math.random()*128))
            //随机移动
            //为什么random要加上*128呢?因为random给出的是一个0~1之间的小数,将它*128就可以得到0~128之间的小数,正好是box3地图的范围
            //加上floor的原因是Math.random()*128得到的是一个小数,所以要将它向下取整(汗)
        }
    });
}, 10);
//坑人代码,让他闪现,得输控制台

2020-05-06T10:30:37 点赞:0

本SHQ工作室成员专用 中回复

setInterval(() => {
    world.querySelectorAll('*').forEach((e) => {
        if (e.isPlayer&&e.player.name=='你要整的人的名字') {
            e.velocity.y += 1;
            //增加Y坐标上的速度
        }
    });
}, 10);
//让人喵,也要控制台

2020-05-06T10:32:12 点赞:0

本SHQ工作室成员专用 中回复

while(true){}
//程序强行崩溃,使用这个代码后请所有人离开10分钟才行,如果有个挂机的……

2020-05-06T10:33:16 点赞:0

本SHQ工作室成员专用 中回复

entity.hp=0
//这个代码怎么用找大佬去问,我不知道

2020-05-06T10:34:30 点赞:0

本SHQ工作室成员专用 中回复

sleep(100000)
world.say("喵进村了!")
sleep(100000)
world.say("喵来了!")
sleep(100000)
world.say("救命啊!")
sleep(100000)
world.say("八 嘎!")
//每隔1000000÷1000秒说一句话

2020-05-06T10:37:00 点赞:0

本SHQ工作室成员专用 中回复

world.querySelectorAll('.喵').forEach((e)=>{
e.onEntityContact(({entity,other})=>{  //设置目标模型的碰撞事件。
if(!other.isPlayer){return} //防止非玩家实体参与检测。
other.mesh=entity.mesh;  //设置玩家的外观。
})
}) 
//背喵的代码

2020-05-06T10:38:15 点赞:0

本SHQ工作室成员专用 中回复

https://shequ.codemao.cn/community/286686

2020-05-06T15:15:26 点赞:0

判断正盗版的方法!!!快来看!!(除非作品不一样) 中回复

没文化!真可怕!看看再创作就知道了!不懂别瞎说!萌新也敢乱说话!

2020-05-07T09:09:54 点赞:0

【业余课程】一个简易的联机小游戏制作思路 中回复

电脑玩家:我**心态崩了,切换一下左右都要0.5秒!

2020-05-07T16:27:07 点赞:0

本SHQ工作室成员专用 中回复

//监狱代码
function contains(arr,obj){//判断元素是否存在于某数组中
    var i=arr.length;
    while(i>=0){
        if(arr[i]===obj){
            return true;
        }
        i--;
    }
    return false;
}

function find(arr,obj){//查找数组中某个元素的下标
    var i=arr.length;
    while(i>=0){
        if(arr[i]===obj){
            return i;
        }
        i--;
    }
    return -1;
}

var in_jail=new Array();//监狱名单
var all_player_name=new Array();
var jail_count=0;

world.onPlayerJoin(({entity})=>{
    all_player_name.push(entity.player.name);
})

world.onChat(({message,entity})=>{
    if(message[0]==='进'&&message[1]==='监'&&message[2]==='狱'&&entity.player.name==='人工智能AI'){//名字可改
        var message_01=message;
        message_01=message_01.replace("进监狱 ","");//将前面的字删除,只留玩家名
        if(message_01==='人工智能AI'){//名字可改
            entity.player.directMessage('你不能使该玩家进入监狱,他是作者!');
            return;
        }
        if(contains(all_player_name,message_01)&&contains(in_jail,message_01)===false){
            in_jail.push(message_01);
            world.say(message_01+'已进入监狱!');
        } else{
            entity.player.directMessage('该玩家不存在!');
        }
    } 
    else if(message[0]==='出'&&message[1]==='监'&&message[2]==='狱'&&entity.player.name==='人工智能AI'){//名字可改
        var message_01=message;
        message_01=message_01.replace("出监狱 ","");//将前面的字删除,只留玩家名
        if(contains(in_jail,message_01)===false){
            entity.player.directMessage('该玩家不再监狱内!');
            return;
        }
        if(contains(all_player_name,message_01)){
            world.say(message_01+'出狱了!');
            world.querySelectorAll('player').forEach((e)=>{
                if(e.player.name===message_01){
                    e.position.set(喵,喵,喵);
                    in_jail.splice(find(in_jail,message_01),1);//将玩家名从监狱名单中删除
                }
            })
        } else{
            entity.player.directMessage('该玩家不存在!');
        }
    }
})

world.onTick(()=>{//跨时段监狱代码的主要部分
    jail_count++;
    if(jail_count>=250){
        world.querySelectorAll('player').forEach((e)=>{
            for(let i=0;i<=in_jail.length;i++){
                if(in_jail[i]===e.player.name){
                    e.position.set(123,10,123);//监狱位置,可改
                }
            }
        })
        jail_count=0;
    }
})

2020-05-07T17:38:18 点赞:0

新萌自动门教程-1 门 中回复

*!还以为是BOX3的!

2020-05-08T13:49:38 点赞:0

box3.0内测版链接公布 中回复

我保证不挖文!才怪,挖文中

2020-05-08T15:55:37 点赞:0

【代码岛3.0科普贴】如何像城市空战里那样做跨时段的监狱? 中回复

怎么输?进监狱XXX吗?

2020-05-11T15:53:01 点赞:0

输入玩家姓名将其关监狱功能简化方法!!! 中回复

怎么用!

2020-05-13T08:29:42 点赞:0

虚空梦鸽龙工作室BOX3.0创作贴 中回复

https://box3create.codemao.cn/games/5fb954f06946c31b6015

2020-05-13T09:36:56 点赞:0

虚空梦鸽龙工作室BOX3.0创作贴 中回复

https://box3create.codemao.cn/games/f77f01aea84cbbd79a0c

2020-05-13T18:57:20 点赞:0

【墨教】用手开门?low!!叫你用准心开门!! 中回复

怎么?

2020-05-15T09:03:00 点赞:0

【教程】第3期代码教程 中回复

水啊~

2020-05-17T12:39:11 点赞:1

【教学】代码教学贴第4期——月球大战蹲下回血及被打击变红 中回复

自古本人喷楼主

2020-05-17T15:36:38 点赞:2

【教学】代码教学贴第4期——月球大战蹲下回血及被打击变红 中回复

自古本人武装抢沙发

吉吉喵来了也挡不住我

2020-05-17T20:48:25 点赞:2

【墨教】俗话说上车容易下车难……吗? 中回复

地核

2020-05-17T20:49:49 点赞:0

[无字白书] 提示:Ctrl+A 中回复

来自手机版的怒火

 

2020-05-17T20:53:34 点赞:0

【一脸懵逼】这是什么#@¥#@%#……¥&……%*……()()*&)*&…………&%……*……*…… 中回复

你不知道一视角是啥吗?

2020-05-17T21:03:35 点赞:1

喵原之战反馈贴 中回复

沙发不准刷!要刷就刷顶顶打油诗

2020-05-17T21:04:27 点赞:2

金币的这些事…… 中回复

你说如果有人没交钱来到编程猫换礼品,编程猫早破产了

2020-05-17T21:44:19 点赞:0

你们玩我的世界吗? 中回复

举报引战不谢,请叫我迷你忠粉

2020-05-18T09:54:41 点赞:0