Lv.1
在 求求求求求大佬解答代码呜呜呜呜呜!!!!!!!!!!!!!!!! 中回复
console.clear();
const e = world.querySelector('#电脑-1');
e.enableInteract = true;
e.onInteract(async ({ entity }) => {
if (entity.isPlayer) {
let s = [];
let z = [];
world.querySelectorAll('player').forEach((x) => {
s.push(x.player.name);
z.push(x);
})
const npc = await entity.player.dialog({
type: Box3DialogType.SELECT,
content: '你要观战谁?',
options: s,
})
if (npc) {
entity.player.cameraEntity = z[npc.index];
}
}
})
world.onPlayerJoin(({entity})=>{
entity.player.cameraMode=Box3CameraMode.FOLLOW;
})2022-07-25T20:47:35 点赞:0
在 iframe链接 中回复
2022-07-29T21:29:55 点赞:0
在 技能大陆:https://box3.codemao.cn/p/23bc4f7513856fc4b78 中回复
2022-07-31T13:32:49 点赞:0
在 创作喵码无辜报错!希望官方进行修复! 中回复
world.onPlayerJoin(({entity})=>entity.player.kick(););
2022-08-14T12:00:12 点赞:1
在 BOX3㕛求助……呃呃 中回复
world.onPlayerJoin(({entity})=>{
//核心代码:
entity.hurt=async(num)=>{
entity.player.kick();//伤害部分
};
//------------//
entity.hurt(100);//伤害
entity.onDie(()=>{
entity.hurt(999);
})
})2022-08-14T18:41:22 点赞:0
在 论常见的三种SQL报错() 中回复
实际上,sql的语法真的很少()()(),少的可怜()()(),所以:()()()
Error()一般()都是细节()(?)
2022-08-17T15:40:32 点赞:0
在 【岛3】怎么给作品聊天区加控制台功能?控制台插件来了!【来者课堂】 中回复
"use strict";//这人畜无害()()
administrators = [];//管理员列表,避免玩家恶意毁图,需要自行添加管理员的userKey,不知道userKey是多少的岛民可以找代码师帮忙查看。
//使用world.onChat事件获取玩家及其消息。
world.onChat(async({ entity, message }) => {
//使用if语句检测玩家身份以及检查玩家目的是否为执行代码。
if (administrators.includes(entity.player.userKey) && message == '$') {
let code = await entity.player.dialog({
type: Box3DialogType.INPUT,
title: "控制台",
content: `请输入代码:`,
confirmText: '执行',
placeholder: 'code',
});
if(!code || code === null){
world.say('取消执行');
return;
}
world.say(eval(code))
}
//以上为对话框模式代码,管理员在聊天区发送$可以启动
//以下为直接执行模式,管理员在聊天区发送$以及需要执行的代码可以启动,注意代码要紧跟$字符,用同一条消息
if (administrators.includes(entity.player.userKey) && message.indexOf("$") == 0) {
world.say(eval(message.slice(1, message.length)));//使用eval函数执行代码,并使用world.say函数输出结果。
} else {
return;
};
})2022-08-19T16:40:12 点赞:0