猫史档案馆


【神器代码岛】【建议收藏】喵代码大合集!!!

用户:Chengxuyee_已退Chengxuyee_已退查看:49 回复:80 评论:49 创建时间:2022-05-09T22:12:40


这些代码可以拿来喵,当然得分场合,造成损失的话本人不负责qwq

另外本帖的代码有很多创新代码呦awa不光只是改变某个变量的值 虽然确实有几条是啦

一、喵代码

PS:以下代码如需修改被整的人的名字可以修改name变量。

      以下代码可以在控制台执行。

1.玻璃封印:在指定一位玩家周围生成玻璃罩子。

let name = 'BCX编程中手~';/*修改名称为你要整的人的名称*/
world.querySelectorAll('player').forEach((entity)=>{
    if(entity.player.name == name){
        voxels.setVoxel(entity.position.x, entity.position.y+2, entity.position.z, 'glass');
        voxels.setVoxel(entity.position.x, entity.position.y+1, entity.position.z+1, 'glass');
        voxels.setVoxel(entity.position.x, entity.position.y+1, entity.position.z-1, 'glass');
        voxels.setVoxel(entity.position.x+1, entity.position.y+1, entity.position.z, 'glass');
        voxels.setVoxel(entity.position.x-1, entity.position.y+1, entity.position.z, 'glass');
        voxels.setVoxel(entity.position.x, entity.position.y, entity.position.z+1, 'glass');
        voxels.setVoxel(entity.position.x, entity.position.y, entity.position.z-1, 'glass');
        voxels.setVoxel(entity.position.x+1, entity.position.y, entity.position.z, 'glass');
        voxels.setVoxel(entity.position.x-1, entity.position.y, entity.position.z, 'glass');
        voxels.setVoxel(entity.position.x, entity.position.y-1, entity.position.z+1, 'glass');
        voxels.setVoxel(entity.position.x, entity.position.y-1, entity.position.z-1, 'glass');
        voxels.setVoxel(entity.position.x+1, entity.position.y-1, entity.position.z, 'glass');
        voxels.setVoxel(entity.position.x-1, entity.position.y-1, entity.position.z, 'glass');
        voxels.setVoxel(entity.position.x, entity.position.y-2, entity.position.z, 'glass');
    };
});
console.clear();

恢复办法:如地图处于编辑状态,则自己打破。如地图处于运行状态,则停止运行即可。

玻璃封印EX版,“你逃不掉”:重复在指定一位玩家周围生成玻璃罩子。

let name = 'BCX编程中手~';/*修改名称为你要整的人的名称*/
world.onTick(({})=>{
    world.querySelectorAll('player').forEach((entity)=>{
        if(entity.player.name == name){
            voxels.setVoxel(entity.position.x, entity.position.y+2, entity.position.z, 'glass');
            voxels.setVoxel(entity.position.x, entity.position.y+1, entity.position.z+1, 'glass');
            voxels.setVoxel(entity.position.x, entity.position.y+1, entity.position.z-1, 'glass');
            voxels.setVoxel(entity.position.x+1, entity.position.y+1, entity.position.z, 'glass');
            voxels.setVoxel(entity.position.x-1, entity.position.y+1, entity.position.z, 'glass');
            voxels.setVoxel(entity.position.x, entity.position.y, entity.position.z+1, 'glass');
            voxels.setVoxel(entity.position.x, entity.position.y, entity.position.z-1, 'glass');
            voxels.setVoxel(entity.position.x+1, entity.position.y, entity.position.z, 'glass');
            voxels.setVoxel(entity.position.x-1, entity.position.y, entity.position.z, 'glass');
            voxels.setVoxel(entity.position.x, entity.position.y-1, entity.position.z+1, 'glass');
            voxels.setVoxel(entity.position.x, entity.position.y-1, entity.position.z-1, 'glass');
            voxels.setVoxel(entity.position.x+1, entity.position.y-1, entity.position.z, 'glass');
            voxels.setVoxel(entity.position.x-1, entity.position.y-1, entity.position.z, 'glass');
            voxels.setVoxel(entity.position.x, entity.position.y-2, entity.position.z, 'glass');
        };
    });
    console.clear();
})

恢复办法:如地图处于编辑状态,则运行一次后关闭,随即可以打破玻璃罩子并出来。如地图处于运行状态,则停止运行即可。

2.成为你的跟班:谁不喜欢有一个用玩家做的跟班呢qwq

let name1 = 'BCX编程中手~';/*修改名称为你要整的人的名称*/
let name2 = 'BCX编程中手~';/*修改名称为你的名称*/
let pos;
world.onTick(({})=>{
    world.querySelectorAll('player').forEach((entity)=>{
        if(entity.player.name == name2){
            pos = entity.position;
        }
        if(entity.player.name == name1){
            if(pos){
                entity.position.set(pos.x + 2, pos.y, pos.z);
            }
        }
    });
    console.clear();
})
//你搁着原地tp呢(?)

恢复办法:如地图处于编辑状态,则运行一次后关闭;如地图处于运行状态,则停止运行即可。

3.隐身术:让自己隐身,这个没啥好说的。

let name = 'BCX编程中手~';/*修改名称为你的名称*/
world.querySelectorAll('player').forEach((entity)=>{
    if(entity.player.name == name){
        entity.player.invisible = true;
        entity.player.showName = false;
    }
})

恢复办法:如地图处于编辑状态,则运行一次后关闭;如地图处于运行状态,则停止运行即可。

4.躲猫猫神器:藏好自己,做好清理 让你每时每刻知道自己与对方的距离!!

let name1 = 'BCX编程中手~';/*修改名称为你的名称*/
let name2 = 'BCX编程中手~';/*修改名称为对方的名称*/
world.onTick(({ tick })=>{
    if(tick % 5 != 0){return}
    let pos;
    world.querySelectorAll('player').forEach((entity)=>{
        if(entity.player.name == name2){
            pos = entity.position;
        };
    });
    world.querySelectorAll('player').forEach((entity)=>{
        if(entity.player.name == name1 && pos){
            entity.player.directMessage([Math.trunc(pos.x - entity.position.x), Math.trunc(pos.y - entity.position.y), Math.trunc(pos.z - entity.position.z)]);
        };
    });
    console.clear();
});

5.干饭时间到了 吓人神器:在对方周围出现“嗨害嗨”字样!

let name = 'BCX编程中手~';/*修改名称为你要整的人的名称*/
let entity;
let pos;
world.querySelectorAll('player').forEach((e)=>{
    if(e.player.name == name){
        pos = [new Box3Vector3(e.position.x - 1, e.position.y - 1, e.position.z), new Box3Vector3(e.position.x + 1, e.position.y - 1, e.position.z), new Box3Vector3(e.position.x, e.position.y - 1, e.position.z - 1), new Box3Vector3(e.position.x, e.position.y - 1, e.position.z + 1)];
    };
});
for(let i = 0; i <= 3; i++){
    entity = world.createEntity({
        mesh:'',
        position:pos[i],
        fixed:true,
        gravity:false,
        collides:false
    });
    entity.say('嗨害嗨');
};

恢复办法:你认真的?这玩意儿需要恢复?

6.大小随心变:指定一位玩家,改变它的大小。

let name = 'BCX编程中手~';/*修改名称为你要整的人的名称*/
let scale = 5;/*输入你要改变的大小的倍数*/
world.querySelectorAll('player').forEach((entity)=>{
    if(entity.player.name == name){
        entity.player.scale = scale;
    }
})

恢复办法:如地图处于编辑状态,则运行一次后关闭;如地图处于运行状态,则停止运行即可。

7.人都给你踢喽~ 踢人器:将一位玩家踢出服务器。

警告!本代码请慎用,如造成不良后果请自行承担。

let name = 'BCX编程中手~';/*修改名称为你要整的人的名称*/
world.querySelectorAll('player').forEach((entity)=>{
    if(entity.player.name == name){
        entity.player.kick();
    };
});

好啦,本期干货分享就到此结束啦~~如果又吞格式那我也没办法了qwq


回复

上一页1 页 / 共 3下一页
DDguanDDguan

world.querySelectorAll("*").forEach((e)=>{
    for(let i = 0; i < world.entityQuota(); i ++)
    world.createEntity(e)
});
//必须有模型
//谨慎使用会卡崩google

点赞0


评论


YDS尹子YDS尹子

坑人很简单()()

world.onPlayerJoin(({entity})=>{entity.player.kick()})

点赞1


评论


不知道该叫啥的一只萌新不知道该叫啥的一只萌新

这些代码至少有一半搞过我...

点赞1


评论


ZNS_哪吒ZNS_哪吒

喵d

点赞0


评论


灵清帝王吃爆一切厕所灵清帝王吃爆一切厕所

总的来说,kick才是王道emotion_doge

点赞0


评论


银狐残影银狐残影

收藏

点赞0


评论


CenCen

收藏

点赞0


评论


Chengxuyee_已退Chengxuyee_已退

喵d

点赞0


评论


难起的名字难起的名字

ddd

点赞0


评论


WitheredWonderWitheredWonder

点赞0


评论


传奇无敌传奇无敌

create完entity不删()()()()nb大了()

点赞0


评论


科技攀岩者科技攀岩者

收藏

点赞0


评论


NeutrophilsNotNeutrophilsNot

哈哈哈最后的kick才是{亡}者

点赞0


评论


菜鸟3号_已退菜鸟3号_已退

嗨害嗨

点赞0


评论


qwertasdqwertasd

师傅你怎么入岛了

点赞0


评论


Star_Ink_sansStar_Ink_sans

中手还不看我踢他的帖子()()()

点赞0


评论


未名用户未名用户

收藏

 

点赞0


评论


难起的名字难起的名字

中手欸()

点赞0


评论


喵喵咪awa喵喵咪awa

哈哈哈(

点赞0


评论


PoiresPoires

收藏啊

点赞0


评论


Robot一只屑代码师Robot一只屑代码师

怎么收藏((((((

点赞0


评论


SHEL深空无尽SHEL深空无尽

收藏

点赞0


评论


SCS_user_i1eril0dUySCS_user_i1eril0dUy

挖()()

点赞0


评论


YLG_個YLG_個

()

点赞0


评论


尖端放电尖端放电

()

点赞0


评论


美男子阿宇美男子阿宇


我顶
必须顶
不得不顶
用尽全力顶
再加上千斤顶
总之把它顶到顶
接着使出葵花宝顶
就算顶到史前也要顶
老子看了会用道德经顶
孔子亲自拜你为师天天顶
秦始皇站在阿房宫上使劲顶
汉高祖挥师杀向东罗马为你顶
吕布抛弃了貂禅而选择了帮你顶
张三丰见了后用太极拳九式全力顶
左冷禅召开武林盟主大会商讨如何顶
西门吹雪从此学会了最强一招剑神一顶
龙剑飞的如来神掌最后一式改为万佛朝顶
陆小凤从此再也不管闲事了而专门来为你顶
四大名捕四面出击看天下还有没有人敢不在顶
顶到阎罗王说我制造噪音我刁根烟看看他继续顶
顶到火山喷发太平洋海啸我还要继续往喵里顶
顶到益阳地震山崩地裂地下水泛滥我还要顶
顶到地下水喷发造成洪灾损失惨重我也顶
要是你觉得敢兴趣你也可以过来一起顶
要是你看我不爽我没办法还要继续顶
要是**敢过来阻止我就更加要顶
要是别人见了骂我傻我还是要顶
要是踩到我脚喵我也继续顶
要是地面凹了我不管继续顶
要是天真塌下来了继续顶
就算天塌下来我都要顶
就算腾讯倒闭也要顶
就算鞋子烂也要顶
我用尽全力去顶
我非常用力顶
我很用力顶
我用力顶
我再顶
我顶

点赞0


评论


云游de军长渡云游de军长渡

收藏

点赞0


评论


没名字pwp没名字pwp

))

点赞0


评论


145a145a

145安全大脑提示您:请勿随意尝喵坛中来源非官方的代码!此代码安全等级为:危险

点赞0


评论


BOSS不爱吃鱼的小鱼BOSS不爱吃鱼的小鱼

真不错,谁顶的,怎么没有教程2字?

点赞0


评论