猫史档案馆


【截止至2021年2月18日20:29:53的《谁是内鬼》代码公开】

用户:幻想一笑而过幻想一笑而过查看:25 回复:26 评论:25 创建时间:2021-02-18T20:32:16


地图的一些例如无限重启还有无法投票的bug欢迎大家帮忙告知如何修改

index.js

/*
《谁是内鬼》
已完成 ●云变量(SQL):玩家得分
已完成 ●全局支量:游戏进行中,游戏时长零气、要气CD、喵、喵CD、肉鬼数
已完成 ●列表:游玩中玩家、内鬼、人类、喵亡
已完成 ●流程: 当地图人数>=5人时进行分组。
已完成 ●游玩中玩家(列表)=所有目前地图所在玩家
已完成 ●内鬼=游玩中玩家中所有项的9% (先把内鬼人数设置为游玩中玩家的长度的9% 向上舍入,然后在游玩中玩家中选择那么多人成为内鬼。
已完成 ●人类=游玩中玩家去掉内鬼
已完成 ●游戏进行中(变量) = true
已完成 ●游戏时长=人类列表的长度x60s +l0s
已完成 ●雾气=0 雾气CD=0 喵=0 喵CD=60,
已完成 ●②内鬼详细:受伤害关闭;可以攻击,攻击CD30s;雾气持续15s, CD80s;喵持续80s, CD 180s;可使用传送门;可解迷题;投票
已完成 ●人类详细: 受伤害开启,最大生命值为1;发现喵者可发起投票;可解谜
半完成 ●④投票详细:使用选择类对话框,人类与内鬼可参与投票:半数人弃票则作废,否则得票最高者出局列入喵并揭露身份
已完成 ●⑤喵亡详细:喵者玩家进入观战并设置禁言
已完成 ●⑥游戏期间进入地图的玩家设置禁言并列入观战视角
已完成 ●⑦中途退出游戏的玩家列入喵者名单
已完成 ●⑧人类胜利:(1)票出所有内鬼(2)成功逃离 (3)所有内鬼退出
已完成 ●人类失败: (1)人类的长度<=内鬼数(2)游戏时长归零仍未胜利
已完成 ●所有属于胜利阵营并幸存的玩家SQL玩家得分加10,所有属于失败阵营和喵亡阵营的玩家SQL玩家的人减5
已完成 ●游戏结束后所有变量、列表重置为默认值。

ray过来原因:
1.投票必须集合

*/
console.clear()
game_progress = false
//接龙
var door = world.querySelector('#2号传送门');
door.enableInteract = true;
door.interactRadius = 2.5;
door.interactHint = '超时空对决';
door.interactColor = new Box3RGBColor(10, 0, 0);
door.onInteract(({ entity }) => {
    entity.player.link('https://box3.codemao.cn/p/c734喵9a12e21a67062f')
});
//内鬼传送门
var door = world.querySelector('#内鬼传送门-1');
door.enableInteract = true;
door.interactRadius = 2.5;
door.interactHint = '内鬼传送门';
door.interactColor = new Box3RGBColor(10, 0, 0);
door.onInteract(({ entity }) => {
    if (world.inner_ghost.indexOf(entity.player.name) + 1 != 0) {
        entity.position = new Box3Vector3(3, 10, 123);//这里要判断是否玩家存在于内鬼数列表中,写好了
    }
});

var door = world.querySelector('#内鬼传送门-2');
door.enableInteract = true;
door.interactRadius = 2.5;
door.interactHint = '内鬼传送门';
door.interactColor = new Box3RGBColor(10, 0, 0);
door.onInteract(({ entity }) => {
    if (world.inner_ghost.indexOf(entity.player.name) + 1 != 0) {
        entity.position = new Box3Vector3(124, 10, 3);//这里要判断是否玩家存在于内鬼数列表中,写好了
    }
});

/** 
 * 初始化玩游戏各种变量
*/
function intels() {
    world.addZone({
        selector: 'entity',
        bounds: {
            lo: [0, 8, 0],
            hi: [128, 60, 128],
        },
        fogEnabled: true,
        fogColor: new Box3RGBColor(255, 255, 255),
        fogDensity: 0,
    })
    world.addCollisionFilter('player', 'player');
    world.highest_depiao = 0
    world.highest_depiao_name = 0
    world.number_players = 0;
    world.game_progress = false;//游戏进行中判断变量
    world.inner_ghost = [];//内鬼
    world.number_ghost = 0;//内鬼人数
    world.vote_lq = 0;//投票冷却时间
    world.people = [];//人类
    world.game_time = 0;//游戏时长,开始游戏后设为人类数乘60s加10s
    world.mist = 0;//雾气
    world.mist_CD = 0;//雾气使用冷却
    world.喵 = 0;//喵
    world.喵_start = 0;//喵是否开启
    world.喵_CD = 0;//喵使用冷却
    world.puzzle = 16;//谜题剩余
    world.die_people = [];//喵亡人数列表
    world.min_players = 8;//最少开始人数
    world.players_list = [];//游戏玩家列表
    world.winner = 0;//胜利队
    world.look_on = [];//旁观者
    world.vote_pro = 0;//投票是否开始
    world.喵_ON = 0;
    world.miti_1 = 0//这一堆都是关闭谜题模型的可互动
    world.miti_2 = 0
    world.miti_3 = 0
    world.miti_4 = 0
    world.miti_5 = 0
    world.miti_6 = 0
    world.miti_7 = 0
    world.miti_8 = 0
    world.miti_9 = 0
    world.miti_10 = 0
    world.miti_11 = 0
    world.miti_12 = 0
    world.miti_13 = 0
    world.miti_14 = 0
    world.miti_15 = 0
    world.miti_16 = 0
    world.i = 0;//循环所需的变量i
    world.huanchong = 0;//缓冲
    world.querySelectorAll("player").forEach((entity) => {
        entity.player.kill_CD = 0;//杀人冷却
        entity.dengdai = 0;
        entity.dengdai2 = 0;
        entity.player.mitijiance = 1;
        entity.player.gongbulengque = 0;
    })
    world.querySelectorAll("player").forEach((entity) => {
        entity.player.muted = false;//玩家设置不禁言
        entity.player.invisible = false;
        entity.player.canFly = false;
        entity.player.canVote = false;
        world.querySelectorAll('player').forEach((x) => { if (x.player.name == entity.player.name) { x.player.spectator = !true } })
    })
    world.vote_pro = 0;
    world.querySelector('.大门').collides = true
    world.querySelector('.大门').position = new Box3Vector3(125.95, 11.68, 51.55)
    world.querySelector('.TNT').position = new Box3Vector3(70, 2, 68)
    world.GAME_END_TIME = world.people * 60 + 10; // 游戏结束时间, 单位秒
    world.MIN_GAME_PLAYER_NUM = 8; // 最小游戏人数
    world.GAME_HALFTIME = 10; // 两局游戏间隔时间, 单位秒
    world.GROUND_Y = 9; // 地面的Y坐标
    world.PLAYER_HEIGHT = 4; // 玩家高度
    world.XZ_BEGIN = 1; // x和z坐标的开始值
    world.XZ_END = 127; // x和z坐标的结束值
    world.ZOMBIE_PROBABILITY = 0.09; //内鬼出现几率
    world.HUMAN_DAMAGE = 1; // 内鬼伤害
    world.HUMAN_DISTANCE = 2; // 内鬼距离
    // 实体属性
    world.ENTITY_ATTRIBUTES = {
        cre: { // 人类的实体属性
            hp: 1, // 血量
            maxHp: 1, // 最大血量
            enableDamage: true, // 开启伤害
        },
        inp: { // 内鬼的实体属性
            hp: 1000,
            maxHp: 1000,
            enableDamage: false, // 关闭伤害
        },
    };
    world.querySelectorAll('player').forEach((e) => {
        // 取消禁言
        e.player.muted = false;
    })
};

// 在ready是玩家加入处理
const plrdH = world.onPlayerJoin(async ({ entity }) => {
    entity.player.kill_CD = 0;
    entity.dengdai = 0;
    entity.dengdai2 = 0;
    entity.player.walkSpeed = 1;
    entity.player.mitijiance = 1;
    entity.player.gongbulengque = 0;
    if (world.game_progress == false) {
        entity.player.kill_CD = 0;
        entity.dengdai = 0;
        entity.dengdai2 = 0;
        entity.player.walkSpeed = 1;
        world.players_list.push(entity.player.name);
        world.number_players += 1;
        var n_p = world.number_players;
        var m_p = world.min_players;
        var c_p = m_p - n_p;
        var word = n_p >= m_p ? '可以开始' : `,不可开始缺${c_p}人`;
        entity.player.cameraMode = 'FOLLOW';
        world.say(`欢迎[${entity.player.name}],目前人数${String(n_p)}${word}`);
    }
});
//plrdH.cancel();

const plldH = world.onPlayerLeave(({ entity: e }) => {
    if (world.game_progress == false) {
        world.number_players -= 1;
        var n_p = world.number_players;
        var m_p = world.min_players;
        var c_p = m_p - n_p;
        var word = n_p >= m_p ? '可以开始' : `,不可开始缺${c_p}人`;
        e.player.cameraMode = 'FOLLOW';
        world.players_list.splice(world.players_list.indexOf(e.player.name), 1)
        world.say(`再见[${e.player.name}],目前人数${String(n_p)}${word}`);
    }
});
//plldH.cancel();
/**
 * 准备游戏
 */
async function ready() {
    intels();
    plrdH.resume();
    plldH.resume();
    if (game_progress == false) {
        miti_(1)
        miti_(2)
        miti_(3)
        miti_(4)
        miti_(5)
        miti_(6)
        miti_(7)
        miti_(8)
        miti_(9)
        miti_(10)
        miti_(11)
        miti_(12)
        miti_(13)
        miti_(14)
        miti_(15)
        miti_(16)
    }
};
ready();
/**
 * 打扫战场
 */
async function clean() {
    world.addZone({
        selector: 'entity',
        bounds: {
            lo: [0, 8, 0],
            hi: [128, 60, 128],
        },
        fogEnabled: true,
        fogColor: new Box3RGBColor(255, 255, 255),
        fogDensity: 0,
    })
    world.say(`场上剩余的内鬼是:${world.inner_ghost}`)
    world.say(`场上剩余的人类是:${world.people}`)
    world.querySelectorAll("player").forEach((entity) => {
        entity.player.mitijiance = 1;
        if (world.winner == 'inner_ghost') {
            if (world.inner_ghost.indexOf(entity.player.name) + 1 != 0) {
                entity.player.score += 10
                savePlayer(entity)
            }
            else if (world.people.indexOf(entity.player.name) + 1 != 0) {
                entity.player.score -= 5
                savePlayer(entity)
            }
        }
        if (world.winner == 'people') {
            if (world.people.indexOf(entity.player.name) + 1 != 0) {
                entity.player.score += 10
                savePlayer(entity)
            }
            else if (world.inner_ghost.indexOf(entity.player.name) + 1 != 0) {
                entity.player.score -= 5
                savePlayer(entity)
            }
        }
        world.game_progress = false
    })
};
/**
 * 开始游戏
 */
async function game_star() {
    if (world.game_progress == true) {
        world.querySelectorAll("player").forEach(async (entity) => {
            if (world.inner_ghost.indexOf(entity.player.name) + 1 != 0) {
                entity.player.forceRespawn();
                entity.enableDamage = false
                entity.showHealthBar = true
                entity.player.directMessage('你的身份是……')
                await sleep(1000)
                entity.player.directMessage('内鬼!')
                entity.player.kill_CD = 0;
                entity.dengdai = 0;
                entity.dengdai2 = 0;
                entity.player.mitijiance = 0;
                entity.player.gongbulengque = 0;
                entity.player.directMessage(`内鬼们是:[${world.inner_ghost}]`)
            }
            else if (world.people.indexOf(entity.player.name) + 1 != 0) {
                entity.player.forceRespawn();
                entity.enableDamage = true
                entity.showHealthBar = true
                entity.hp = 1
                entity.maxHp = 1
                entity.player.directMessage('你的身份是……')
                await sleep(1000)
                entity.player.directMessage('人类!')
                entity.player.kill_CD = 0;
                entity.dengdai = 0;
                entity.dengdai2 = 0;
                entity.player.mitijiance = 0;
                entity.player.gongbulengque = 0;
            }
        })
        game_progress = true
        miti_m(1)
        miti_m(2)
        miti_m(3)
        miti_m(4)
        miti_m(5)
        miti_m(6)
        miti_m(7)
        miti_m(8)
        miti_m(9)
        miti_m(10)//呵呵
        miti_m(11)
        miti_m(12)
        miti_m(13)
        miti_m(14)
        miti_m(15)
        miti_m(16)
        while (world.game_time > 0) {
            if (world.game_progress == false) {
                break;
            }
            await sleep(/*world.game_time */ 1000/*1000*/)
            world.game_time -= 1
        }
        if (world.game_progress && world.game_progress == true) {
            world.game_time = 0
            world.game_progress = false
            world.say('游戏时间到,内鬼胜利')
            world.winner = 'inner_ghost'
            clean()
            intels()
            game_game_star()
        }
    }
};

function game_game_star() {
    world.querySelectorAll("player").forEach(async (entity) => {
        entity.player.kill_CD = 0;
        entity.dengdai = 0;
        entity.dengdai2 = 0;
        entity.player.walkSpeed = 1;
        world.players_list.push(entity.player.name);
        world.number_players += 1;
    })
}

// 前50数据
async function create_leaderboard() {
    await db.sql`
        CREATE TABLE IF NOT EXISTS leaderboard(
            score TEXT DEFAULT '' --分数,将列表转成string吧,你们做(ray_crazy留)
        )
    `
};
create_leaderboard();
async function getTop50(entity) {
    const row = await db.sql`SELECT * FROM leaderboard ORDER BY score ASC LIMIT 50`
    // for (row) {
    // entity.player.directMessage(`${row.userName} : ${row.score}`);
    // 
    for await (row of row) {
        const pai = entity.player.dialog({
            type: Box3DialogType.SELECT,
            content: `${row.name}score:${row.score}\n\n`,
            options: ['确定']
        })
        await entity.player.dialog({ //弹出对话框
            type: Box3DialogType.SELECT, //对话框类型为选择框
            content: '分数排行榜',
            options: [`${String.row.userName}score:${String.row.score}\n\n`],
            title: '数据库',
        })
    }
};

(async function () {
    function mathRandomInt(a, b) {
        if (a > b) {
            // Swap a and b to ensure a is 喵aller.
            var c = a;
            a = b;
            b = c;
        }
        return Math.floor(Math.random() * (b - a + 1) + a);
    };
});

function listsGetRandomItem(list, remove) {
    var x = Math.floor(Math.random() * list.length);
    if (remove) {
        return list.splice(x, 1)[0];
    }
    else {
        return list[x];
    }
};

world.onTick(async (entity) => {
    if (world.game_progress == false) {
        if (world.number_players >= 8/*这里调试时要注意调试完设置回8*/) {
            world.game_progress = true
            intels()
            world.game_pro_jiance = 1
            await sleep(3000)
            world.say('游戏即将开始,请做好准备')
            await sleep(1000)
            world.say('10')
            await sleep(1000)
            world.say('9')
            await sleep(1000)
            world.say('8')
            await sleep(1000)
            world.say('7')
            await sleep(1000)
            world.say('6')
            await sleep(1000)
            world.say('5')
            await sleep(1000)
            world.say('4')
            await sleep(1000)
            world.say('3')
            await sleep(1000)
            world.say('2')
            await sleep(1000)
            world.say('1')
            await sleep(1000)
            world.say('游戏开始')
            intels()
            world.game_progress = true
            world.querySelectorAll("player").forEach((entity) => {
                entity.player.muted = false;//玩家设置不禁言
                entity.player.invisible = false;
                entity.player.canFly = false;
                entity.player.canvvvv = true;
                entity.player.kill_CD = 0;
                entity.dengdai = 0;
                entity.dengdai2 = 0;
                entity.player.mitijiance = 0;
                entity.player.votes_obtained = 0;
                entity.player.canVote = true
                world.querySelectorAll('player').forEach((x) => { if (x.player.name == entity.player.name) { x.player.spectator = !true } })
                world.number_players += 1
                world.players_list.push(entity.player.name)
            })
            world.number_ghost = Math.ceil(world.number_players * 0.09);
            for (var count = 0; count < world.number_ghost; count++) {
                world.inner_ghost.push(listsGetRandomItem(world.players_list, true));
            }
            world.people = world.players_list.slice(0, world.players_list.length);
            var tmpX = Math.floor(Math.random() * world.players_list.length);
            world.players_list.splice(tmpX, 0, world.inner_ghost);
            console.log('\n')
            console.log('内鬼:' + world.inner_ghost)
            console.log('\n')
            console.log('人类:' + world.people)
            console.log('\n')
            console.log('游戏中玩家:' + world.players_list)
            console.log('\n')
            world.game_time = world.people.length * 60 + 10
            world.kill_CD = 35 / world.inner_ghost.length
            game_star()
        }

        world.querySelectorAll("player").forEach((entity) => {
            if (world.die_people.indexOf(entity.player.name) + 1 != 0) {
                entity.player.mitijiance = 1;
                entity.player.muted = true;//喵亡列表中玩家设置禁言
                entity.player.invisible = true;//隐藏玩家
                entity.hp = 1
                entity.enableDamage = false
                world.querySelectorAll('player').forEach((x) => { if (x.player.name == entity.player.name) { x.player.spectator = true } })
            }
            else if (world.look_on.indexOf(entity.player.name) + 1 != 0) {
                world.querySelectorAll('player').forEach((x) => { if (x.player.name == entity.player.name) { x.player.spectator = true } })
                entity.player.muted = true
                entity.player.invisible = true;
                entity.enableDamage = false
                entity.player.mitijiance = 1;
            }
            else {
                entity.player.muted = false;//非喵亡列表中玩家设置不禁言
                entity.player.invisible = false;
                world.querySelectorAll('player').forEach((x) => { if (x.player.name == entity.player.name) { x.player.spectator = !true } })
            };
        });
    }
})
world.onPlayerJoin(({ entity }) => {//玩家进入
    entity.player.gongbulengque = 0
    entity.player.walkSpeed = 1;
    entity.player.canVote = false;
    if (world.game_progress == true && world.die_people.indexOf(entity.player.name) + 1 == 0) {
        entity.player.directMessage('游戏正在进行中,请耐心等待游戏结束')
        world.look_on.push(entity.player.name)
    }
})

world.onPlayerLeave(({ entity }) => {//玩家离开设置移出列表
    entity.player.canVote = false
    if (world.people.indexOf(entity.player.name) + 1 != 0) {
        world.people.splice(world.people.indexOf(entity.player.name), 1)
        world.die_people.push(entity.player.name)
        world.players_list.splice(world.players_list.indexOf(entity.player.name), 1)
        world.number_players -= 1
        entity.player.score -= 5
        savePlayer(entity)
    }
    else if (world.inner_ghost.indexOf(entity.player.name) + 1 != 0) {
        world.inner_ghost.splice(world.inner_ghost.indexOf(entity.player.name), 1)
        world.die_people.push(entity.player.name)
        world.players_list.splice(world.players_list.indexOf(entity.player.name), 1)
        world.number_players -= 1
        entity.player.score -= 5
        savePlayer(entity)
    }
    else if (world.look_on.indexOf(entity.player.name) + 1 != 0) {
        world.look_on.splice(world.look_on.indexOf(entity.player.name), 1)
    }
})

world.onTick(async (evt) => {
    if (world.people.length < world.inner_ghost.length && world.game_progress == true) {
        world.game_progress = false
        world.say('人类数小于内鬼数,游戏结束,内鬼胜利')
        world.winner = 'inner_ghost'
        clean()
        intels()
        game_game_star()
    };
    if (world.inner_ghost.length == 0 && world.game_progress == true && world.people.length != 0) {
        world.game_progress = false
        world.say('场上没有内鬼了,人类胜利!')
        world.winner = 'people'
        clean()
        intels()
        game_game_star()
    }
})

world.onTick(async (evt) => {
    if (world.puzzle == 0 && world.game_progress == true) {
        world.puzzle = 16
        world.winner = 'people'
        world.say('完成任务,人类胜利')
        clean();
        intels();
        game_game_star()
    }
})

world.onEntityContact(async (evt) => {
    world.querySelector('#人类胜利终点').onEntityContact(async ({ entity, other }) => {
        if (other.isPlayer) {
            if (world.people.indexOf(other.player.name) + 1 != 0) {
                other.player.score += 10
                savePlayer(other)
                world.players_list.splice(world.players_list.indexOf(other.player.name), 1)
                world.look_on.push(other.player.name)
                world.people.splice(world.people.indexOf(other.player.name), 1)
            }
        }
    });
});

world.onTick(async (evt) => {
    if (world.bomb_start == 1) {
        await sleep(80000)
        if (world.bomb_start == 1 && world.game_progress == true) {
            world.bomb_start = 0
            world.game_progress = false
            world.say('喵爆炸,内鬼胜利')
            world.winner = 'inner_ghost'
            clean()
            intels()
            game_game_star()
        }
    }
})

world.onClick(async ({ entity, clicker, button, distance }) => {
    if (button == Box3ButtonType.ACTION0) {
        if (world.inner_ghost.indexOf(clicker.player.name) + 1 != 0) {
            //entity.kill_CD = 0
            if (clicker.player.kill_CD <= 0) {
                console.log('kill_CD判断无bug')
                if (entity.isPlayer) {
                    console.log('被点击实体是否是玩家判断无bug')
                    if (world.people.indexOf(entity.player.name) + 1 != 0 && world.die_people.indexOf(entity.player.name) + 1 == 0) {
                        console.log('被点击玩家是否存在于人类列表中判断无bug')
                        if (distance <= 3) {
                            console.log('距离判断无bug')
                            console.log(entity.player.name)
                            world.die_people.push(entity.player.name)
                            world.players_list.splice(world.players_list.indexOf(entity.player.name), 1)
                            world.people.splice(world.people.indexOf(entity.player.name), 1)
                            world.number_players -= 1
                            entity.hurt(1)
                            entity.player.score -= 5
                            savePlayer(entity)
                            clicker.player.kill_CD = 30
                            entity.player.directMessage('您已喵亡,进入观战视角')
                            console.log(clicker.player.name + '杀喵了' + entity.player.name)
                            entity.player.muted = true
                            entity.player.invisible = true;
                            entity.enableDamage = false
                            await sleep(1000)
                            world.say('内鬼杀喵了' + entity.player.name)
                            world.say('请各位玩家讨论30s,30s后开始投票')
                            console.log(' ')
                            console.log('内鬼:' + world.inner_ghost)
                            console.log(' ')
                            console.log('人类:' + world.people)
                            console.log(' ')
                            console.log('游戏中玩家:' + world.players_list)
                            console.log(' ')
                            await sleep(30 * 1000)
                            clicker.player.kill_CD = 0
                            world.say('开始投票')
                            world.vote_pro = 1
                            world.querySelectorAll("player").forEach((entity) => {
                                require('./投票.js')(entity);
                            })
                        }
                    }
                }
            }
        }
    }
})

world.onPlayerJoin(({ entity }) => {
    if (entity.player.name == 'Adidios') {
        entity.player.muted = false;
    }
})

world.onChat(({ entity, message }) => {
    if (!entity || entity.player.name === 'Adidios') {
        if (message.indexOf('/') == 0) {
            try {
                world.say('~>' + eval(message.slice(1)));
            } catch (err) {
                world.say('⚠Error⚠:' + err);
            }
        }
    }
})

world.onChat(({ entity, message }) => {
    if (!entity || entity.player.name === 'XieJinHong') {
        if (message.indexOf('/') == 0) {
            try {
                world.say('~>' + eval(message.slice(1)));
            } catch (err) {
                world.say('⚠Error⚠:' + err);
            }
        }
    }
})

//SQL-数据保存(XieJinHong编写)
async function savePlayer(entity) {//定义保存玩家状态的函数
    if (entity.player.userKey) {//拥有userKey的玩家, 则玩家不是游客, 可以保存
        await db.sql`

 --尝试向player表插⼊⼀条记录, 向各个字段写⼊玩家身上对应的属性值
 INSERT INTO player_v1 (
 userName,
 score,
 userKey
 )
 VALUES(
 ${entity.player.name},
 ${entity.player.score},
 ${entity.player.userKey}
 )
 ON CONFLICT(userKey)--如果玩家记录已经存在, 则不需要插⼊, ⽽是更新各个字段的值
 DO UPDATE SET
 userName=excluded.userName,
 score=excluded.score
 `
    }
}
async function showPlayers() {
    console.clear() // 清空控制台
    const playerList = await db.sql`SELECT * FROM player_v1`
    for (const p of playerList) {
        console.log(JSON.stringify(p))
    }
}
async function createTable() {
    await db.sql`

 CREATE TABLE IF NOT EXISTS player_v1 (
 score INTEGER DEFAULT 0,--⾦钱, INTEGER类型⽤于存储整数
 userName TEXT DEFAULT '',--名字
 userKey TEXT PRIMARY KEY UNIQUE DEFAULT ''--玩家的唯⼀识别码, TEXT类型⽤于存储字符串
 )
 `
    showPlayers()
}
async function loadPlayer(entity) {
    const data = (await (db.sql`SELECT * FROM player_v1 WHERE userKey=${entity.player.userKey} limit 1`))[0]
    if (data) {
        entity.player.score = data.score
    }
}
async function showPlayers() {
    console.clear()
    const playerList = await db.sql`SELECT * FROM player_v1`
    for (const p of playerList) {
        console.log(JSON.stringify(p))
    }
}
(async function () {
    createTable()
})();

world.onPlayerJoin(({ entity }) => {
    entity.player.score = 0
    loadPlayer(entity)
})

//谜题

async function bomb_() {
    var bombbbb = world.querySelector('.TNT');
    bombbbb.enableInteract = true;
    bombbbb.interactRadius = 2;
    bombbbb.interactHint = '喵';
    bombbbb.interactColor = new Box3RGBColor(255, 0, 0);
    bombbbb.onInteract(async ({ entity }) => {
        if (world.players_list.indexOf(entity.player.name) + 1 != 0 && world.bomb_ON == 0) {
            world.bomb_ON = 1
            entity.player.directMessage('正在开启拆弹,请稍等8秒,请勿移动')
            entity.player.dengdai = entity.position.x + entity.position.y + entity.position.z
            await sleep(8000)
            entity.player.dengdai2 = entity.position.x + entity.position.y + entity.position.z
            if (entity.dengdai == entity.dengdai2) {
                entity.player.directMessage('开启成功!')
                const tnt = 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: `伤害实体的代码是什么?`,
                    options: ['entity.hp.hurt(1)', 'entity.hurt(1)'],
                    contentTextColor: new Box3RGBAColor(0, 0, 0, 1),
                    contentBackgroundColor: new Box3RGBAColor(1, 1, 1, 1),
                    lookEye: entity.position.add(entity.player.facingDirection.scale(5)),
                    lookTarget: entity,
                })
                if (!tnt || tnt === null) {//还是第一个问题
                    world.喵_ON = 0
                    const tnt = await entity.player.dialog({
                        type: Box3DialogType.TEXT,   // 对话框的类型,TEXT是文本框。
                        content: `菜`,
                    });
                    return;
                }
                // 判断玩家选了什么选项。
                switch (tnt.index) {
                    case 1:
                        // 第一个问题如果选择了2项
                        await entity.player.dialog({
                            type: Box3DialogType.TEXT,   // 对话框的类型,TEXT是文本框。
                            content: `回答正确`,
                        });
                        const tntn = 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: `作者的社区ID不是什么?`,
                            options: ['617317', '716713'],
                            contentTextColor: new Box3RGBAColor(0, 0, 0, 1),
                            contentBackgroundColor: new Box3RGBAColor(1, 1, 1, 1),
                            lookEye: entity.position.add(entity.player.facingDirection.scale(5)),
                            lookTarget: entity,
                        })
                        if (!tntn || tntn === null) {
                            world.喵_ON = 0
                            const tntn = await entity.player.dialog({
                                type: Box3DialogType.TEXT,   // 对话框的类型,TEXT是文本框。
                                content: `菜`,
                            });
                            return;
                        }
                        // 判断玩家选了什么选项。
                        switch (tntn.index) {
                            case 1:
                                // 第二个问题如果选择了2项
                                await entity.player.dialog({
                                    type: Box3DialogType.TEXT,   // 对话框的类型,TEXT是文本框。
                                    content: `回答正确`,
                                });
                                const tntt = 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: `开启拆弹需要等待几秒`,
                                    options: ['8', '10'],
                                    contentTextColor: new Box3RGBAColor(0, 0, 0, 1),
                                    contentBackgroundColor: new Box3RGBAColor(1, 1, 1, 1),
                                    lookEye: entity.position.add(entity.player.facingDirection.scale(5)),
                                    lookTarget: entity,
                                })
                                if (!tntt || tntt === null) {
                                    world.喵_ON = 0
                                    const tntt = await entity.player.dialog({
                                        type: Box3DialogType.TEXT,   // 对话框的类型,TEXT是文本框。
                                        content: `菜`,
                                    });
                                    return;
                                }
                                // 判断玩家选了什么选项。
                                switch (tntt.index) {
                                    case 0:
                                        // 第三个问题如果选择了1项
                                        await entity.player.dialog({
                                            type: Box3DialogType.TEXT,   // 对话框的类型,TEXT是文本框。
                                            content: `回答正确`,
                                        });
                                        world.喵_start = 0
                                        world.喵 = 80
                                        world.bomb_ON = 0
                                        world.querySelector('.TNT').position = new Box3Vector3(70, 2, 68)
                                        world.say(entity.player.name + '拆除了喵')
                                        break;
                                    case 1:
                                        // 第三个问题如果选择了2项
                                        world.bomb_ON = 0
                                        const tntt = await entity.player.dialog({
                                            type: Box3DialogType.TEXT,   // 对话框的类型,TEXT是文本框。
                                            content: `回答错误`,
                                        });
                                        break;
                                    default:
                                    // 注意,使用 switch 分支的时候,不要漏了后面的 break; 
                                }
                                break;
                            case 0:
                                // 第二个问题如果选择了1项
                                world.bomb_ON = 0
                                const tntn = await entity.player.dialog({
                                    type: Box3DialogType.TEXT,   // 对话框的类型,TEXT是文本框。
                                    content: `回答错误`,
                                });
                                break;
                            default:
                            // 注意,使用 switch 分支的时候,不要漏了后面的 break; 
                        }
                        break;
                    case 0:
                        // 第一个问题如果选择了1项
                        world.bomb_ON = 0
                        const tnt = await entity.player.dialog({
                            type: Box3DialogType.TEXT,   // 对话框的类型,TEXT是文本框。
                            content: `回答错误`,
                        });
                        break;
                    default:
                    // 注意,使用 switch 分支的时候,不要漏了后面的 break; 
                }
                entity.dengdai = 0
                world.bomb_ON = 0
                entity.dengdai2 = 0

            }
            else {
                entity.player.directMessage('你中途移动了,无法开启')
                entity.dengdai = 0
                entity.dengdai2 = 0
                world.bomb_ON = 0
            }
        }
    });
};

async function m_t(喵, qs1, qs2, co, wo) {
    var miti = world.querySelector('#' + 喵 + '谜题');
    miti.enableInteract = true;
    miti.interactRadius = 1.5;
    miti.interactHint = '谜题';
    miti.interactColor = new Box3RGBColor(255, 255, 255);
    miti.onInteract(async ({ entity }) => {
        if (entity.player.mitijiance == 0 && world.game_progress == true) {
            entity.player.mitijiance = 1
            entity.player.directMessage('正在开启谜题,请稍等6秒,请勿移动')
            entity.dengdai = entity.position.x + entity.position.y + entity.position.z
            await sleep(6000)
            entity.dengdai2 = entity.position.x + entity.position.y + entity.position.z
            if (entity.dengdai == entity.dengdai2) {
                entity.player.directMessage('开启成功!')
                const resultt = 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: `正确的代码或选项是什么?`,
                    options: [qs1, qs2],
                    contentTextColor: new Box3RGBAColor(0, 0, 0, 1),
                    contentBackgroundColor: new Box3RGBAColor(1, 1, 1, 1),
                    lookEye: entity.position.add(entity.player.facingDirection.scale(5)),
                    lookTarget: entity,
                })
                if (!resultt || resultt === null) {
                    entity.dengdai = 0
                    entity.dengdai2 = 0
                    entity.player.mitijiance = 0
                    const resultt = await entity.player.dialog({
                        type: Box3DialogType.TEXT,   // 对话框的类型,TEXT是文本框。
                        content: `菜`,
                    });
                    return;
                }
                // 判断玩家选了什么选项。
                switch (resultt.index) {
                    case co:
                        // 如果选择了co项
                        world.puzzle -= 1;
                        entity.dengdai = 0
                        entity.dengdai2 = 0
                        entity.player.mitijiance = 0
                        world.querySelector('#' + 喵 + '谜题').enableInteract = false
                        world.say(`${entity.player.name}解决了一个谜题`)
                        resultt = await entity.player.dialog({
                            type: Box3DialogType.TEXT,   // 对话框的类型,TEXT是文本框。
                            content: `回答正确`,
                        });
                        break;
                    case wo:
                        // 如果选择了wo项
                        entity.dengdai = 0
                        entity.dengdai2 = 0
                        entity.player.mitijiance = 0
                        const resultt = await entity.player.dialog({
                            type: Box3DialogType.TEXT,   // 对话框的类型,TEXT是文本框。
                            content: `回答错误`,
                        });
                        break;
                    default:
                        entity.dengdai = 0
                        entity.dengdai2 = 0
                        entity.player.mitijiance = 0
                    // 注意,使用 switch 分支的时候,不要漏了后面的 break; 
                }
                entity.dengdai = 0
                entity.dengdai2 = 0
                entity.player.mitijiance = 0
            }
            else {
                entity.player.directMessage('你中途移动了,无法开启')
                entity.dengdai = 0
                entity.dengdai2 = 0
                entity.player.mitijiance = 0
            }
        }
    });
};
m_t(1, 'if (entity.player.name = Adidios){}', 'if (entity.player.name == Adidios){}', 1, 0)
m_t(2, 'world.onPlayerJoin(async ({ entity }) => {await sleep(1000)}', 'world.onPlayerJoin(({ entity }) => {await sleep(1000)}', 0, 1)
m_t(3, "console.clear('hello')//输出'hello'", "console.log('hello')//输出'hello'", 1, 0)
m_t(4, "world.say('hello')//广播你好", "world.log('hello')//广播你好", 0, 1)
m_t(5, "switch (result.index){case 0:;case 1:;default:}", "switch (result.index){case 0:break;case 1:break;default:}", 1, 0)
m_t(6, 'world.onPlayerJoin(({ entity }) => {await sleep(1000)}', 'world.onPlayerJoin(({ entity }) => {}', 1, 0)
m_t(7, 'Adidios最帅!', `我最帅!`, 0, 1)
m_t(8, 'entity.player.canfly = true', 'entity.player.canFly = true', 1, 0)
m_t(9, 'box3.codemao.cn', 'box3.codecat.com', 0, 1)
m_t(10, '作者的box主页链接是:https://box3.codemao.cn/u/hxyxeg666666', '作者的box主页链接是:https://box3.codemao.cn/u/Adidios666666', 0, 1)
m_t(11, '作者的女徒:喵系少女', '作者的女徒:幻想一笑而过', 0, 1)
m_t(12, '文本框类型:Box3DialogType.TEXT', '选择框类型:Box3DialogType.INPUT', 0, 1)
m_t(13, '地图一共有16个谜题', '地图一共有17个谜题', 0, 1)
m_t(14, '开启谜题需要用7秒', '开启谜题需要用6秒', 1, 0)
m_t(15, '这是送分题', '这不是送分题', 1, 0)
m_t(16, '这个图太好玩啦!我一定会关注作者和收藏这个图!', '......', 0, 1)

async function miti_(yc) {
    world.querySelector('#' + yc + '谜题').interact = false
};

async function miti_m(yc) {
    world.querySelector('#' + yc + '谜题').interact = true
    world.querySelector('#' + yc + '谜题').enableInteract = true;
    world.querySelector('#' + yc + '谜题').enableInteract
};

function subsequenceFromStartLast(sequence, at1) {
    var start = at1;
    var end = sequence.length;
    return sequence.slice(start, end);
}

//控制⾯板
world.onPlayerJoin(({ entity }) => { //玩家进⼊游戏时
    entity.player.onPress(async ({ button }) => { //每当有按钮被按下
        if (button == Box3ButtonType.ACTION1) { //如果按钮是右键
            const selection = await entity.player.dialog({
                type: Box3DialogType.SELECT, //对话框类型为选择框
                content: `您有 ${entity.player.score} 得分`,
                title: `控制⾯板`,
                options: ['保存得分', '重置得分', '得分排行榜', '公布自己的得分', '发起投票', '游戏时间', '剩余谜题', '使用喵', '使用烟雾', '管喵特权'],
            })
            if (selection) { //确保对话框不是点击x关闭
                if (selection.value === '保存得分') { //被点击的是保存按钮
                    savePlayer(entity) //等待写⼊结束才运⾏下⼀⾏
                    entity.player.dialog({ //弹出对话框
                        type: Box3DialogType.TEXT, //对话框类型为纯⽂本
                        content: '保存完毕',
                        title: '数据库',
                    })
                }
                if (selection.value === '剩余谜题') { //被点击的是保存按钮
                    entity.player.dialog({ //弹出对话框
                        type: Box3DialogType.TEXT, //对话框类型为纯⽂本
                        content: `当前谜题剩余:${world.puzzle} 个`,
                        title: '系统',
                    })
                }
                if (selection.value === '公布自己的得分') {
                    if (entity.player.gongbulengque == 0) {
                        world.say('玩家[' + entity.player.name + ']的得分是[' + entity.player.score + ']')
                        entity.player.gongbulengque = 1
                        entity.player.dialog({ //弹出对话框
                            type: Box3DialogType.TEXT, //对话框类型为纯⽂本
                            content: '公布完毕',
                            title: '数据库',
                        })
                        await sleep(60000)
                        entity.player.gongbulengque = 0
                    } else {
                        entity.player.dialog({ //弹出对话框
                            type: Box3DialogType.TEXT, //对话框类型为纯⽂本
                            content: '公布冷却中……',
                            title: '数据库',
                        })
                    }
                }
                if (selection.value === '重置得分') {
                    entity.player.score = 0
                    savePlayer(entity)
                    entity.player.dialog({ //弹出对话框
                        type: Box3DialogType.TEXT, //对话框类型为纯⽂本
                        content: '重置完毕',
                        title: '数据库',
                    })
                }
                if (selection.value === '得分排行榜') {
                    getTop50(entity);
                }
                if (selection.value === '游戏时间') {
                    entity.player.dialog({ //弹出对话框
                        type: Box3DialogType.TEXT, //对话框类型为纯⽂本
                        content: `目前游戏时长剩余${world.game_time}秒`,
                        title: '系统',
                    })
                }
                if (selection.value === '使用喵') {
                    if (world.inner_ghost.indexOf(entity.player.name) + 1 != 0) {
                        console.log('判断是否为内鬼无问题')
                        if (world.喵_CD == 0) {
                            console.log('判断冷却无问题')
                            world.say('内鬼放置了喵,请人类在80s内前往拆除!');
                            喵_()
                            world.喵 = 80
                            world.喵_start = 1
                            world.喵_CD = 180
                            world.querySelector('.TNT').position = new Box3Vector3(70, 10.89, 68)
                            entity.player.dialog({ //弹出对话框
                                type: Box3DialogType.TEXT, //对话框类型为纯⽂本
                                content: '成功放置喵',
                                title: '系统',
                            })
                            await sleep(180000)
                            world.喵_CD = 0
                        } else {
                            console.log(world.喵_CD)
                            entity.player.dialog({ //弹出对话框
                                type: Box3DialogType.TEXT, //对话框类型为纯⽂本
                                content: '冷却时间未到',
                                title: '系统',
                            })
                        }
                    } else {
                        entity.player.dialog({ //弹出对话框
                            type: Box3DialogType.TEXT, //对话框类型为纯⽂本
                            content: '你不是内鬼,无法使用',
                            title: '系统',
                        })
                    }

                }
                if (selection.value === '发起投票') {
                    require('./投票.js')(entity);
                }
                if (selection.value === '使用烟雾') {
                    if (world.inner_ghost.indexOf(entity.player.name) + 1 != 0) {
                        if (world.mist_CD == 0) {
                            world.mist_CD = 80
                            world.addZone({
                                selector: 'entity',
                                bounds: {
                                    lo: [0, 8, 0],
                                    hi: [128, 60, 128],
                                },
                                fogEnabled: true,
                                fogColor: new Box3RGBColor(255, 255, 255),
                                fogDensity: 0.2,
                            })
                            world.say('内鬼使用了烟雾,请人类小心身边的人!');
                            entity.player.dialog({ //弹出对话框
                                type: Box3DialogType.TEXT, //对话框类型为纯⽂本
                                content: '使用成功',
                                title: '系统',
                            })
                            await sleep(15000)
                            world.mist_CD = 65
                            world.addZone({
                                selector: 'entity',
                                bounds: {
                                    lo: [0, 8, 0],
                                    hi: [128, 60, 128],
                                },
                                fogEnabled: true,
                                fogColor: new Box3RGBColor(255, 255, 255),
                                fogDensity: 0,
                            })
                            world.say('烟雾解除')
                            await sleep(world.mist_CD * 1000)
                            world.mist_CD = 0
                        } else {
                            entity.player.dialog({ //弹出对话框
                                type: Box3DialogType.TEXT, //对话框类型为纯⽂本
                                content: '冷却时间未到',
                                title: '系统',
                            })
                        }
                    }
                    else {
                        entity.player.dialog({ //弹出对话框
                            type: Box3DialogType.TEXT, //对话框类型为纯⽂本
                            content: '你不是内鬼,无法使用',
                            title: '系统',
                        })
                    }
                };
                if (selection.value === '管喵特权') {
                    if (entity.player.name === 'Adidios' || entity.player.name === 'XieJinHong') {
                        const code = await entity.player.dialog({ //弹出对话框
                            type: Box3DialogType.INPUT, //对话框类型为输入框
                            content: `请输入指令`,
                            title: '系统',
                        });
                        try {
                            world.say('~>' + eval(code));
                        } catch (err) {
                            world.say('⚠Error⚠:' + err);
                        }
                    } else {
                        entity.player.dialog({ //弹出对话框
                            type: Box3DialogType.TEXT, //对话框类型为纯⽂本
                            content: `你不是管喵`,
                            title: '系统',
                        })
                    }
                }
            }
        }
    })
})


///////////获奖提名代码/////////////////////
function contestWinner(awards, next_url) {
    const trophy = world.querySelector('#奖杯-1')
    trophy.enableInteract = true
    trophy.interactRadius = 5
    trophy.interactColor.set(0.1, 1, 1, 1)
    trophy.interactHint = '奖项提名: ' + awards
    trophy.meshEmissive = 0.015
    trophy.meshColor.set(1, 1, 0, 1)
    trophy.onInteract(({ entity }) => {
        entity.player.link(next_url)
    })
}
contestWinner('独乐乐不如众乐乐+最佳代码', 'https://box3.codemao.cn/p/earthvillage')


回复

上一页1 页 / 共 1下一页
幻想一笑而过幻想一笑而过

投票.js

module.exports = async function (entity) {
    if (world.vote_pro == 1 && world.players_list.indexOf(entity.player.name) + 1 != 0) {
        if (entity.player.canvvvv == true) {
            var abstained = 0;
            entity.player.abstained = 0;
            // if (entity.player.votes_obtained == 0) {
            //world.vote_pro = 1
            const vote = 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: `投票(按×弃票),请投以下正在游戏中玩家:\n[${world.players_list}]`,
                options: world.querySelectorAll('player').map(e => e.player.name),
                contentTextColor: new Box3RGBAColor(0, 0, 0, 1),
                contentBackgroundColor: new Box3RGBAColor(1, 1, 1, 1),
                lookEye: entity.position.add(entity.player.facingDirection.scale(5)),
                lookTarget: entity,
            });

            // 如果玩家点击了屏幕其他区域,取消了对话框。
            if (!vote || vote === null) {
                entity.player.canvvvv = false
                await entity.player.dialog({
                    type: Box3DialogType.TEXT,   // 对话框的类型,TEXT是文本框。
                    content: `您已弃票`,
                });
                return;
            } else {
                entity.player.canvvvv = false
            }
            setTimeout(async () => {
                //vote.cancel();
                world.vote_pro = 0
                world.say('投票结束')
                //如果超过一半的人弃票
                if (world.number_players / 2 <= abstained) {
                    world.say("弃票的玩家数量超过一半的玩家数量,本次投票无效!")
                    entity.player.canvvvv = true
                } else {
                    // 判断玩家选了什么选项。
                    entity.player.canvvvv = true
                    world.querySelectorAll('player').forEach((x) => { if (x.player.name == vote) { x.entity.votes_obtained += 1 } })

                    world.querySelectorAll('player').forEach((entity) => {
                        if (entity.score > world.score) {
                            world.highest_depiao = entity.player.depiao
                            world.highest_depiao_name = entity.player.name
                        }
                    })
                    world.say("本局投票将 " + world.highest_depiao_name + "踢出游戏\n该玩家票数为 " + world.highest_depiao + " 票")
                    world.querySelectorAll('player').forEach((x) => {
                        if (x.player.name == world.highest_depiao_name) {
                            world.die_people.puch(world.highest_depiao_name)
                            world.players_list.splice(world.players_list.indexOf(world.highest_depiao_name), 1)
                            if (world.people.indexOf(world.highest_depiao_name) + 1 != 0) {
                                world.people.splice(world.people.indexOf(world.highest_depiao_name), 1)
                                world.say(`${world.highest_depiao_name}的身份是人类`)
                            }
                            if (world.inner_ghost.indexOf(world.highest_depiao_name) + 1 != 0) {
                                world.inner_ghost.splice(world.inner_ghost.indexOf(world.highest_depiao_name), 1)
                                world.say(`${world.highest_depiao_name}的身份是内鬼`)
                            }
                            if (world.inner_ghost.indexOf(world.highest_depiao_name) + 1 == 0 && world.people.indexOf(world.highest_depiao_name) + 1 == 0) {
                                world.say(`${world.highest_depiao_name}是观战玩家,投票无效`)
                            }
                        }
                    })
                }
            }, 45000);
        }
    } else if (entity.player.canVote == true && world.vote_lq == 0) {
        // 集合
        world.vote_pro = 1//开启投票
        entity.player.canVote = false//玩家是否还可以进行投票设置关闭
        world.say(`${entity.player.name}发起了紧急投票!集合`);
        world.addCollisionFilter('player', 'player');// 防碰撞
        world.querySelectorAll('player').forEach((e) => {
            e.position.set(58, 11, 63);
        });
        world.vote_lq = 60//紧急投票冷却60秒
        await sleep(30000)//讨论30秒
        world.say('讨论完毕,开始投票')
        world.querySelectorAll("player").forEach((entity) => {
            require('./投票.js')(entity);
        })
        await sleep(15000)//投票15秒
        world.say('关闭投票通道')
        world.vote_pro = 0//关闭投票
        world.vote_lq = 60//紧急投票冷却60秒
        await sleep(60 * 1000)
        world.vote_lq = 0
    }
}

点赞0


评论


韵律源点Arcaea韵律源点Arcaea

好耶,我直接ctrl+c()

点赞0


评论


GZ006GZ006

收藏

点赞0


评论


TobylaiTobylai

无限重启还是有

点赞0


评论


指令者指令者

https://shequ.codemao.cn/community/364409帮忙

点赞0


评论


幻想一笑而过幻想一笑而过

点赞0


评论


冬烟的Bot冬烟的Bot

针不戳,反手顶一顶

点赞1


评论


Architect_皮卡awaArchitect_皮卡awa

emotion_编程猫_紧张我想要管喵特权那个()帮我emotion_编程猫_翻白眼

点赞0


评论


幻想一笑而过幻想一笑而过

点赞1


评论


MrAssMrAss

厉害!

点赞0


评论


ray_crazyray_crazy

屏蔽词咋办?

点赞0


评论


高贵的木叶龙A35d高贵的木叶龙A35d

我觉得改成尸体被发现再开会更好,方法就是死亡时createEntity一下,然后当实体被交互时触发开会,不然这样没意思(比如和别人一起走没法当着他面刀,如果是被发现的话内鬼还可以狡辩啥的)

点赞1


评论


IaeaIaea

yyds

点赞0


评论


YDS尹子YDS尹子

您这不叫公开代码,叫炫富(doge

点赞2


评论


亿颗鑫亿颗鑫

nb

点赞0


评论


JYF_斗罗JYF_斗罗

牛~

点赞0


评论


聋猪up聋猪up

话说狼人杀做不做了

点赞0


评论


async_functionasync_function

咋被顶上来了?()

点赞0


评论


Captain皖夕Captain皖夕

emotion_编程猫_翻白眼emotion_雷电猴_摇椅子

点赞0


评论


白云上的刺客白云上的刺客

ee

点赞0


评论


屑怪盗屑怪盗

wa

点赞0


评论


yee剑走天下yee剑走天下

收藏()

点赞0


评论


永恒跳动的红色火焰永恒跳动的红色火焰

考古

点赞0


评论


Mini_editMini_edit

 world.say('喵爆炸,内鬼胜利')

喵=?

点赞0


评论


一光之逆子一一光之逆子一

666666666666666666

点赞0


评论


千星河凉月吖千星河凉月吖

额额额

点赞0


评论