猫史档案馆


沙拉黄

沙拉黄

Lv.1

沙拉黄沙拉青沙拉赤沙拉白沙拉黑……那个是我?!说!!!

获赞:376收藏:157浏览:2357作品收藏:156
回复帖子评论
上一页2 页 / 共 4下一页

【求助】为什么不能用代码设置实体能否互动 中回复

我也同感

2022-03-08T15:59:00 点赞:0

【求助!】【实体互动】【多实体互动】【代码】 中回复

感谢回帖,问题已解决! c喵ole.clear(); c喵tTEST_GFRY=['吉吉喵','搬砖喵','测试喵','文档喵']; c喵tSHOUSE=['沙拉黄','可爱的小果果']; c喵tdoor1=world.querySelector('#1楼电梯-1'); door1.enableInteract=true; door1.interactHint='电梯'; door1.interactRadius=3; c喵tdoor2=world.querySelector('#2楼电梯-1'); door2.enableInteract=true; door2.interactHint='电梯'; door2.interactRadius=3; door2.onInteract(({entity})=>{ entity.position.set(87,10,250); }); door1.onInteract(({entity})=>{ entity.position.set(87,20,250); }); world.onPlayerJoin(({entity})=>{ if(!TEST_GFRY.includes(entity.player.name))return;//如果玩家名称不在列表里,则跳过后续脚本。 world.say(`${entity.player.name}【官方】来了!`); }) c喵tdoor=world.querySelector('#宿舍惊魂系列——木门-1'); door.enableInteract=true; door.interactHint='门控操作'; door.interactRadius=3; door.onInteract(({entity,targetEntity})=>{ if(TEST_GFRY.includes(entity.player.name)){ if(entity.position.z<232){ targetEntity.say(`欢迎光临作者之家!`); entity.position.set(104,10,233); }else{ targetEntity.say(`下次再来!`); entity.position.set(104,10,230); }; }else{ if(SHOUSE.includes(entity.player.name)){ if(entity.position.z<232){ targetEntity.say(`欢迎光临作者之家!`); entity.position.set(104,10,233); }else{ targetEntity.say(`下次再来!`); entity.position.set(104,10,230); }; }else{ targetEntity.say(`您没有此权限。想加盟?房地产中心区【正在建设中】问问服务员吧!`); }; }; }); c喵tbilibili=world.querySelector('#哔哩哔哩-1'); bilibili.enableInteract=true; bilibili.interactHint='关注bilibili'; bilibili.interactRadius=3; bilibili.onInteract(({entity})=>{ entity.player.link('https://space.bilibili.com/1741284855') }); c喵tjingju=world.querySelector('#京剧演员-1'); jingju.enableInteract=true; jingju.interactHint='国粹传承'; jingju.interactRadius=3; jingju.onInteract(({entity})=>{ entity.player.dialog({ type:Box3DialogType.TEXT, title:'传承国粹,义不容辞!', content:'看看京剧,感受魅力', }); }); c喵tsofa=world.querySelector('#沙发-1'); sofa.enableInteract=true; sofa.interactHint='皮一下'; sofa.interactRadius=3; sofa.onInteract(async({entity})=>{ entity.player.dialog({ type:Box3DialogType.TEXT, title:'你跟我皮', content:'皮皮皮皮', }); entity.position.set(102,32,244); entity.position.y+=500; awaitsleep(10000); entity.position.set(101,20,239); }); c喵tjuntong=world.querySelector('#我的世界:苦力怕娘-1'); juntong.enableInteract=true; juntong.interactHint='重庆军统'; juntong.interactRadius=3; juntong.onInteract(({entity})=>{ entity.player.dialog({ type:Box3DialogType.TEXT, title:'鸡汤来喽', content:'我就是重庆军统\n特务\n和大日本双调\n高级特工\n代号\n穿山甲!', }); }); c喵tpiano=world.querySelector('#复古大钢琴-1'); piano.enableInteract=true; piano.interactHint='培育雅趣'; piano.interactRadius=5; piano.onInteract(({entity})=>{ entity.player.dialog({ type:Box3DialogType.TEXT, title:'音乐之美', content:'你弹了一会钢琴,获得了神秘大礼\n猜猜是什么?\n试试就逝世!', }); entity.player.canFly=true; });

2022-03-09T09:00:29 点赞:0

【求助!】【实体互动】【多实体互动】【代码】 中回复

console.clear(); constTEST_GFRY=['吉吉喵','搬砖喵','测试喵','文档喵']; constSHOUSE=['沙拉黄','可爱的小果果']; constdoor1=world.querySelector('#1楼电梯-1'); door1.enableInteract=true; door1.interactHint='电梯'; door1.interactRadius=3; constdoor2=world.querySelector('#2楼电梯-1'); door2.enableInteract=true; door2.interactHint='电梯'; door2.interactRadius=3; door2.onInteract(({entity})=>{ entity.position.set(87,10,250); }); door1.onInteract(({entity})=>{ entity.position.set(87,20,250); }); world.onPlayerJoin(({entity})=>{ if(!TEST_GFRY.includes(entity.player.name))return;//如果玩家名称不在列表里,则跳过后续脚本。 world.say(`${entity.player.name}【官方】来了!`); }) constdoor=world.querySelector('#宿舍惊魂系列——木门-1'); door.enableInteract=true; door.interactHint='门控操作'; door.interactRadius=3; door.onInteract(({entity,targetEntity})=>{ if(TEST_GFRY.includes(entity.player.name)){ if(entity.position.z<232){ targetEntity.say(`欢迎光临作者之家!`); entity.position.set(104,10,233); }else{ targetEntity.say(`下次再来!`); entity.position.set(104,10,230); }; }else{ if(SHOUSE.includes(entity.player.name)){ if(entity.position.z<232){ targetEntity.say(`欢迎光临作者之家!`); entity.position.set(104,10,233); }else{ targetEntity.say(`下次再来!`); entity.position.set(104,10,230); }; }else{ targetEntity.say(`您没有此权限。想加盟?房地产中心区【正在建设中】问问服务员吧!`); }; }; }); constbilibili=world.querySelector('#哔哩哔哩-1'); bilibili.enableInteract=true; bilibili.interactHint='关注bilibili'; bilibili.interactRadius=3; bilibili.onInteract(({entity})=>{ entity.player.link('https://space.喵1741284855') }); constjingju=world.querySelector('#京剧演员-1'); jingju.enableInteract=true; jingju.interactHint='国粹传承'; jingju.interactRadius=3; jingju.onInteract(({entity})=>{ entity.player.dialog({ type:Box3DialogType.TEXT, title:'传承国粹,义不容辞!', content:'看看京剧,感受魅力', }); }); constsofa=world.querySelector('#沙发-1'); sofa.enableInteract=true; sofa.interactHint='皮一下'; sofa.interactRadius=3; sofa.onInteract(async({entity})=>{ entity.player.dialog({ type:Box3DialogType.TEXT, title:'你跟我皮', content:'皮皮皮皮', }); entity.position.set(102,32,244); entity.position.y+=500; awaitsleep(10000); entity.position.set(101,20,239); }); constjuntong=world.querySelector('#我的世界:苦力怕娘-1'); juntong.enableInteract=true; juntong.interactHint='重庆军统'; juntong.interactRadius=3; juntong.onInteract(({entity})=>{ entity.player.dialog({ type:Box3DialogType.TEXT, title:'鸡汤来喽', content:'我就是重庆军统\n特务\n和大日本双调\n高级特工\n代号\n穿山甲!', }); }); constpiano=world.querySelector('#复古大钢琴-1'); piano.enableInteract=true; piano.interactHint='培育雅趣'; piano.interactRadius=5; piano.onInteract(({entity})=>{ entity.player.dialog({ type:Box3DialogType.TEXT, title:'音乐之美', content:'你弹了一会钢琴,获得了神秘大礼\n猜猜是什么?\n试试就逝世!', }); entity.player.canFly=true; });

2022-03-09T09:00:41 点赞:0

【求助!】【实体互动】【多实体互动】【代码】 中回复

console.clear(); constTEST_GFRY=['吉吉喵','搬砖喵','测试喵','文档喵']; constSHOUSE=['沙拉黄','可爱的小果果']; constdoor1=world.querySelector('#1楼电梯-1'); door1.enableInteract=true; door1.interactHint='电梯'; door1.interactRadius=3; constdoor2=world.querySelector('#2楼电梯-1'); door2.enableInteract=true; door2.interactHint='电梯'; door2.interactRadius=3; door2.onInteract(({entity})=>{ entity.position.set(87,10,250); }); door1.onInteract(({entity})=>{ entity.position.set(87,20,250); }); world.onPlayerJoin(({entity})=>{ if(!TEST_GFRY.includes(entity.player.name))return;//如果玩家名称不在列表里,则跳过后续脚本。 world.say(`${entity.player.name}【官方】来了!`); }) constdoor=world.querySelector('#宿舍惊魂系列——木门-1'); door.enableInteract=true; door.interactHint='门控操作'; door.interactRadius=3; door.onInteract(({entity,targetEntity})=>{ if(TEST_GFRY.includes(entity.player.name)){ if(entity.position.z<232){ targetEntity.say(`欢迎光临作者之家!`); entity.position.set(104,10,233); }else{ targetEntity.say(`下次再来!`); entity.position.set(104,10,230); }; }else{ if(SHOUSE.includes(entity.player.name)){ if(entity.position.z<232){ targetEntity.say(`欢迎光临作者之家!`); entity.position.set(104,10,233); }else{ targetEntity.say(`下次再来!`); entity.position.set(104,10,230); }; }else{ targetEntity.say(`您没有此权限。想加盟?房地产中心区【正在建设中】问问服务员吧!`); }; }; }); constbilibili=world.querySelector('#哔哩哔哩-1'); bilibili.enableInteract=true; bilibili.interactHint='关注bilibili'; bilibili.interactRadius=3; bilibili.onInteract(({entity})=>{ entity.player.link('https://space.喵1741284855') }); constjingju=world.querySelector('#京剧演员-1'); jingju.enableInteract=true; jingju.interactHint='国粹传承'; jingju.interactRadius=3; jingju.onInteract(({entity})=>{ entity.player.dialog({ type:Box3DialogType.TEXT, title:'传承国粹,义不容辞!', content:'看看京剧,感受魅力', }); }); constsofa=world.querySelector('#沙发-1'); sofa.enableInteract=true; sofa.interactHint='皮一下'; sofa.interactRadius=3; sofa.onInteract(async({entity})=>{ entity.player.dialog({ type:Box3DialogType.TEXT, title:'你跟我皮', content:'皮皮皮皮', }); entity.position.set(102,32,244); entity.position.y+=500; awaitsleep(10000); entity.position.set(101,20,239); }); constjuntong=world.querySelector('#我的世界:苦力怕娘-1'); juntong.enableInteract=true; juntong.interactHint='重庆军统'; juntong.interactRadius=3; juntong.onInteract(({entity})=>{ entity.player.dialog({ type:Box3DialogType.TEXT, title:'鸡汤来喽', content:'我就是重庆军统\n特务\n和大日本双调\n高级特工\n代号\n穿山甲!', }); }); constpiano=world.querySelector('#复古大钢琴-1'); piano.enableInteract=true; piano.interactHint='培育雅趣'; piano.interactRadius=5; piano.onInteract(({entity})=>{ entity.player.dialog({ type:Box3DialogType.TEXT, title:'音乐之美', content:'你弹了一会钢琴,获得了神秘大礼\n猜猜是什么?\n试试就逝世!', }); entity.player.canFly=true; });

2022-03-09T09:01:00 点赞:0

【求助!】【实体互动】【多实体互动】【代码】 中回复

???为啥不能发编程格式·?

2022-03-09T09:01:20 点赞:0

【BUG】k4列表出BUG了! 中回复

这个问题很好理解:

系统去检索列表中是否包含某一列字符串或者是数字还是布尔值时,会在每一项中找,这一项是匹配的才会返回true。但是你的列表只有一项,就陷入了思维陷阱,其实2楼说的很对,你需要这样:

center_image

程序运行正常。希望对你有帮助。

2022-03-09T14:13:15 点赞:0

【BUG】k4列表出BUG了! 中回复

center_image

2022-03-09T14:16:15 点赞:1

【求助!!!box3.0】怎么让东西发光? 中回复

//mesh
const npc_a = world.querySelector('#your_meshName');
npc_a.meshEmissive = 1

//player
entity.player.emissive = 1;

就是这样,别忘了编程的好习惯:注释、分号和分行。

2022-03-10T08:36:59 点赞:0

曾经有一只和平队长在我面前,而我在挂机…… 中回复

center_image

这种事。。。。谁没有遇到过呢,、。。?

2022-03-10T14:00:27 点赞:0

遇到了和平队长 中回复

center_image

2022-03-10T14:28:36 点赞:0

【求助!】【实体互动】【多实体互动】【代码】 中回复

console.clear();

var canGlobal = false;

const TEST_GFRY = ['吉吉喵', '搬砖喵', '测试喵', '文档喵'];
const SHOUSE = ['沙拉黄','可爱的小果果','彼岸花语'];

world.onPlayerJoin(({ entity }) => {
    if (SHOUSE.includes(entity.player.name)){
    entity.player.addWearable({
        bodyPart:Box3BodyPart.HEAD,
        mesh:'mesh/沙拉黄头套.vb',
        orientation: new Box3Quaternion(0, 1, 0, 0).rotateY(-Math.PI / 2),
        scale: new Box3Vector3(0.17, 0.17, 0.17),
        offset: new Box3Vector3(0, 0.4, 0),
    });
    entity.player.skinInvisible.head = true;
    };
});

const door1 = world.querySelector('#1楼电梯-1');
door1.enableInteract = true;
door1.interactHint = '电梯';
door1.interactRadius = 3;

const door2 = world.querySelector('#2楼电梯-1');
door2.enableInteract = true;
door2.interactHint = '电梯';
door2.interactRadius = 3;

door2.onInteract(({entity}) => {
    entity.position.set(87,10,250);
});

door1.onInteract(({entity}) => {
    entity.position.set(87,20,250);
});

world.onPlayerJoin(({ entity }) => {
    if (!TEST_GFRY.includes(entity.player.name)) return; // 如果玩家名称不在列表里,则跳过后续脚本。
    world.say(`${entity.player.name} 【官方】来了!`);
})

const door = world.querySelector('#宿舍惊魂系列——木门-1');
door.enableInteract = true;
door.interactHint = '门控操作';
door.interactRadius = 3;

door.onInteract(({ entity,targetEntity }) => {
    if (SHOUSE.includes(entity.player.name)){
        if (entity.position.z < 232){
            targetEntity.say(`${entity.player.name},欢迎光临作者之家!`);
            entity.position.set(104,10,233);
        }else{
            targetEntity.say(`${entity.player.name},下次再来!`);
            entity.position.set(104,10,230);
        };
    }else{
        targetEntity.say(`${entity.player.name},您没有此权限。想加盟?总房地产中心区【正在建设中】问问服务员吧!`);
    };
});

const bilibili = world.querySelector('#哔哩哔哩-1');
bilibili.enableInteract = true;
bilibili.interactHint = '关注bilibili';
bilibili.interactRadius = 3;

bilibili.onInteract(({ entity }) => {
    entity.player.link('https://space.bilibili.com/1741284855')
});


const jingju = world.querySelector('#京剧演员-1');
jingju.enableInteract = true;
jingju.interactHint = '国粹传承';
jingju.interactRadius = 3;

jingju.onInteract(({ entity }) => {
    entity.player.dialog({
        type: Box3DialogType.TEXT,
        title: '传承国粹,义不容辞!',
        content:'看看京剧,感受魅力',
    });
});
        
const sofa = world.querySelector('#沙发-1');
sofa.enableInteract = true;
sofa.interactHint = '皮一下';
sofa.interactRadius = 3;

sofa.onInteract(async({entity}) => {
    entity.player.dialog({
        type: Box3DialogType.TEXT,
        title: '你跟我皮',
        content:'皮皮皮皮',
    });
    entity.position.set(102, 32, 244);
    entity.position.y +=500;
    await sleep(10000);
    entity.position.set(101, 20, 239);
});

const juntong = world.querySelector('#我的世界:苦力怕娘-1');
juntong.enableInteract = true;
juntong.interactHint = '重庆军统';
juntong.interactRadius = 3;

juntong.onInteract(({ entity }) => {
    entity.player.dialog({
        type: Box3DialogType.TEXT,
        title: '鸡汤来喽',
        content:'我就是重庆军统\n特务\n和大日本双调\n高级特工\n代号\n穿山甲!',
    });
});

const piano = world.querySelector('#复古大钢琴-1');
piano.enableInteract = true;
piano.interactHint = '培育雅趣';
piano.interactRadius = 5;

piano.onInteract(({ entity }) => {
    canGlobal = true;
    entity.player.dialog({
        type: Box3DialogType.TEXT,
        title: '音乐之美',
        content:'你弹了一会钢琴,获得了神秘大礼\n猜猜是什么?\n按下右键试试!',
    });
});

world.onPress(async({ button,entity }) => {
    if (button === 'action1'){
        if (canGlobal === true){
            const result_input = await entity.player.dialog({
                type: Box3DialogType.INPUT,
                title: "广播特权",
                titleTextColor: new Box3RGBAColor(0, 0, 1, 1),
                titleBackgroundColor: new Box3RGBAColor(0.968, 0.702, 0.392, 1),
                content: `您获得了一次广播的特权`,
                contentTextColor:  new Box3RGBAColor(0, 0, 0, 1),
                contentBackgroundColor: new Box3RGBAColor(1, 1, 1, 1),
                placeholder:'请输入您想广播的内容',
                confirmText:'就是这个啦'
            });
            if(!result_input || result_input === null){ 
                return; 
            };
            world.say(`${entity.player.name}发送了广播:${result_input}`);
            canGlobal = false;
        };
    };
});

const GF_doorB = world.querySelector('#大铁门-1');
GF_doorB.enableInteract = true;
GF_doorB.interactHint = '门控装置';
GF_doorB.interactRadius = 3;

GF_doorB.onInteract(({ entity,targetEntity }) => {
    if (TEST_GFRY.includes(entity.player.name)){
        if (entity.position.z < 232){
            targetEntity.say(`${entity.player.name},欢迎光临官方工作室!`);
            entity.position.set(17,11,190);
        }else{
            targetEntity.say(`${entity.player.name},常来工作!`);
            entity.position.set(104,10,230);
        };
    }else{
        targetEntity.say(`${entity.player.name},您不是官方人员,没有此权限。`);
    };
});


const GF_doorA = world.querySelector('#门-1');
GF_doorA.enableInteract = true;
GF_doorA.interactHint = '门控装置';
GF_doorA.interactRadius = 3;

GF_doorA.onInteract(({ entity,targetEntity }) => {
    if (TEST_GFRY.includes(entity.player.name)){
        if (entity.position.z < 232){
            targetEntity.say(`${entity.player.name},欢迎光临官方之家!`);
            entity.position.set(17,11,190);
        }else{
            targetEntity.say(`${entity.player.name},下次再来!`);
            entity.position.set(104,10,230);
        };
    }else{
        targetEntity.say(`${entity.player.name},您不是官方人员,没有此权限。`);
    };
});

const jijimiaocom = world.querySelector('#吉吉喵电脑');
jijimiaocom.enableInteract = true;
jijimiaocom.interactHint = '吉吉喵电脑';
jijimiaocom.interactRadius = 3;

jijimiaocom.onInteract(async({ entity }) => {
    const jijimiaoResult = await entity.dialog({
        type: Box3DialogType.SELECT,
        title: "吉吉喵的工作台",
        titleTextColor: new Box3RGBAColor(0, 0, 0, 1),
        titleBackgroundColor: new Box3RGBAColor(0.968, 0.702, 0.392, 1),
        content:`你好,${entity.player.name},近期有这些用户反映问题:`,
        options: [jijimiaowenti_a],
    });
});

world.onPress(async({ button,entity }) => {
    if (button === 'action1'){
        const result2 = await entity.player.dialog({
            type: Box3DialogType.SELECT,
            title: "帮助",
            titleTextColor: new Box3RGBAColor(0, 0, 0, 1),
            titleBackgroundColor: new Box3RGBAColor(0.968, 0.702, 0.392, 1),
            content:`你好,${entity.player.name},你有什么问题?:`,
            options: ['传送','自闪光','报告问题'],
        });
    if(!result2 || result2 === null){ 
        return; 
    }
    switch (result2.index) {
        case 0:
            const result211 = await entity.player.dialog({
                type: Box3DialogType.SELECT,
                title: "传送",
                titleTextColor: new Box3RGBAColor(0, 0, 0, 1),
                titleBackgroundColor: new Box3RGBAColor(0.968, 0.702, 0.392, 1),
                content:`你好,${entity.player.name},你要传送至?:`,
                options: ['作者之家','官方之家','官方仓库','沙拉·房地产服务中心','果果·房地产服务中心'],
            });
            if(!result211 || result211 === null){ 
                return; 
            };
            switch (result211.index) {
                case 0:
                    entity.position.set(104, 10, 227);
                    break;
                case 1:
                    entity.position.set(53.5, 10, 227);
                    break;
                case 2:
                    entity.position.set(23.5, 10, 190);
                    break;
                case 3:
                    //沙拉·房地产服务中心;entity.position.set(23.5, 10, 190);
                    break;
                case 4:
                    //果果·房地产服务中心;entity.position.set(23.5, 10, 190);
                    break;
                default:
            };
        case 1:
            entity.player.emissive = 1;
            break;
        case 2:
            const result23 = await entity.player.dialog({
                type: Box3DialogType.SELECT,
                title: "反馈问题:",
                titleTextColor: new Box3RGBAColor(0, 0, 0, 1),
                titleBackgroundColor: new Box3RGBAColor(0.968, 0.702, 0.392, 1),
                content:`你好,${entity.player.name},你要反馈什么问题?:`,
                options: ['地图问题','社区问题'],
            });
            if(!result23 || result23 === null){ 
                return; 
            };
            switch (result23.index) {
                case 0:
                    saladQ
                    break;
                case 1:
                    entity.position.set(53.5, 10, 227);
                    break;
                default:
            };
        default:
    };
    };    
});

最后面代码不要看,还没有完工。

2022-03-10T14:31:27 点赞:0

吉吉喵有人在恶搞你!!! 中回复

哈哈哈哈哈哈哈哈哈笑喵我了哈哈哈哈哈哈玛卡巴卡哈哈哈哈

2022-03-10T19:41:31 点赞:0

吉吉喵有人在恶搞你!!! 中回复

imgsrc="https://static.codemao.cn/emotion/thunder_monkey/%E7%AC%91%E8%B6%B4240.gif"alt="emotion_雷电猴_笑趴"

2022-03-10T19:41:47 点赞:0

吉吉喵喂啥我没皮肤!我明明都做了 缺没有😭等了1天你都不审核,偏偏等创作节结束后才审核,你要补发给 中回复

hh(忍笑)这件事......你要去找和平队长......

2022-03-10T19:42:55 点赞:0

我忘了该咋做了,增加变量结果一下子窜出来了50多次,怎么让他每一次只执行一次? 中回复

加个滤波

2022-04-17T18:38:23 点赞:0

啊哈哈哈哈哈哈【dddd】 中回复


2022-04-20T14:39:38 点赞:0

【岛3教程】SQL时间排行榜注释版! 中回复

40行for循环里多打了一个}

2022-04-21T20:16:27 点赞:0

【求助】【box3】【pvp】 中回复

console.clear()

world.onPlayerJoin(({ entity }) => {
    entity.player.hurt = 8;
    entity.player.maxDis = 150;
    console.log(entity.player.maxDis)
    entity.player.knife = 1;
    entity.enableDamage = true;
});

var red, blue = 0;
var attackerName;

world.onPlayerJoin(async ({entity})=>{
    if (red < blue) {
        entity.addTag('red');
        entity.player.spawnPoint.set(7,2,123);
        entity.position.set(7,2,123);
        entity.player.color=new Box3RGBColor(1,0,0);
        world.say(String(entity.player.name) + '加入红队');
        red = (typeof red == 'number' ? red : 0) + 1;
    }else if(red > blue){
        entity.addTag('blue');
        entity.position.set(116,2,14);
        entity.player.color = new Box3RGBColor(0,0,1);
        world.say(String(entity.player.name) + '加入蓝队');
        blue = (typeof blue == 'number' ? blue : 0) + 1;
    }else{
        if (Math.random() < 0.5){
            entity.addTag('red');
            entity.player.spawnPoint.set(7,2,123);
            entity.position.set(7,2,123);
            entity.player.color=new Box3RGBColor(1,0,0);
            world.say(String(entity.player.name) + '加入红队');
            red = (typeof red == 'number' ? red : 0) + 1;
        }else{
            entity.addTag('blue');
            entity.position.set(116,2,14);
            entity.player.color = new Box3RGBColor(0,0,1);
            world.say(String(entity.player.name) + '加入蓝队');
            blue = (typeof blue == 'number' ? blue : 0) + 1;
        };
    };
});

world.onClick(({ entity,clicker,button,distance }) => {
    if (button !== 'action0') return;
        if (distance <= clicker.player.maxDis){
            entity.hurt(clicker.player.hurt);
        }else{
            clicker.player.directMessage(`距离超过了射程:${clicker.player.maxDis}:${distance}`)
        }
});

world.onTakeDamage(({ entity,attacker,damage }) => {
    if (!entity.isPlayer) return;
        attackerName = attacker.player.name;
        entity.player.directMessage(`[剩余HP: ${entity.hp}]: 你承受了 ${damage} 点来自 ${attackerName} 的伤害`);
});

world.onDie(({ entity, attacker }) => {
    entity.player.directMessage(`你被${attacker.player.name}击杀了,5秒后复活,视角跟随击杀者`);
    if (attacker.player.knife >= 3){
        attacker.player.directMessage(`你击杀了${entity.player.name},个人分数+1,团队分数+1,升级武器`);
        attacker.player.knife += 1;
        attacker.player.hurt += 2;
        const team = attacker.hasTag('red') ? 'red' : 'blue';
        if (team == 'red'){
            redScore += 1;
        }else{
            blueScore += 1;
        };
    }else{
        attacker.player.directMessage(`你击杀了${entity.player.name},个人分数+1,团队分数+1,武器已升至最高级,增加伤害3点`);
        attacker.hurt += 3;
    };
});

2022-05-02T20:52:13 点赞:0

【求助】【box3】【pvp】 中回复

world.onTakeDamage(({ entity,attacker,damage }) => {
    if (!entity.isPlayer) return;
        attackerName = attacker.player.name;
        entity.player.directMessage(`[剩余HP: ${entity.hp}]: 你承受了 ${damage} 点来自 ${attackerName} 的伤害`);
});

2022-05-02T20:52:42 点赞:0

【求助】【box3】【pvp】 中回复

报错:

TypeError: Cannot set properly 'player' of null at eval

2022-05-02T20:53:56 点赞:0

【求助】【box3】【pvp】 中回复

格式被吞,重新发的代码如下:

2022-05-02T20:54:23 点赞:0

【岛三工具】齐活!懒癌福音之SQL生成器!只用写一次字段就可以完成SQL的工具! 中回复

好厉害!!!!!!

2022-05-28T15:17:52 点赞:0

请问怎么做到这个效果:【y】【玩家飞行】【特定范围】 中回复

//这样吗?
world.onPlayerJoin(({ entity }) => {
    entity.onTick(() => {
        if (entity.position.y < 9){
            entity.player.canFly = true;
        else{
            entity.player.canFly = false;
    });
};
    

2022-06-18T13:24:19 点赞:0

【疑惑】岛三的粒子特效咋回事? 中回复

事情是这样的: 我在肝地图 地图里面红蓝两队的出生点 我打算放两个粒子 颜色不用我说() 结果 放完蓝色我去放红色 居然不能再放了? 就是说 我的第二个模型只能继承第一个模型的颜色 但是其他的数据能改 只有颜色, 必须一模一样, 改都改不了 网址: https://box3.cod喵/e/897a5b174c4dec26b6c6 有时间帮忙看看吧!在线等你!

2022-07-03T13:12:37 点赞:0

@浮生 @星渊 @Star_Ink_sans 海外服的“dark”还真的上传了自己的个人真实头像.. 中回复

等等,海外服的网址求求!!!

2022-08-15T12:32:01 点赞:0

【中世纪决战】中世纪决战开始内测 中回复

114514

2022-08-18T18:51:15 点赞:0

【中世纪决战】中世纪决战开始内测 中回复

114514

2022-08-18T18:55:54 点赞:0

有良心吗???? 中回复

全部转发!!!转发此贴!!!此帖子非谣言!!!此贴没有诽谤诬陷!!!

2022-08-20T15:00:50 点赞:2

有良心吗???? 中回复

center_image

2022-08-20T15:04:36 点赞:0

【严重警告】关于box3多地图编辑端被破解 中回复

shequ.cod喵/community/480125

2022-08-20T15:54:56 点赞:0