
Lv.1
祝各位岛民越来越好~
在 【岛3十一大更新!】七项全能争霸赛!新增超大地图! 中回复
人太多啦!
进不去的同学来:
2服:
https://box3play.codemao.cn/games/ea80fe8291d59f1bcb86
3服:
https://box3play.codemao.cn/games/561868ac0b5b9774f699
数据1、2、3服连通
2020-09-30T21:04:07 点赞:2
在 【代码岛3】SQL教程!去而复返 中回复
建议的改进:
(async function() {
console.clear();
await db.sql`CREATE TABLE IF NOT EXISTS players (
id VARCHAR(16) PRIMARY KEY UNIQUE NOT NULL,
x REAL NOT NULL,
y REAL NOT NULL,
z REAL NOT NULL
)`
}());
const joinPosition = new Box3Vector3(128,55,128);//设置玩家出生点
world.onPlayerJoin(async({entity})=>{
const rows = await db.sql`SELECT x,y,z FROM players WHERE id = ${entity.player.userKey}`;//判断玩家数据是否为空
if(rows && !rows.length){//如果玩家没有数据
entity.position = joinPosition;//将玩家移动到出生点
await db.sql`INSERT INTO players(id, x, y, z) VALUES (${entity.player.userKey}, ${joinPosition.x}, ${joinPosition.y}, ${joinPosition.z})`;//初始位置
}else{//否则
const {x, y, z} = rows[0];
entity.position.set(x,y,z);//将玩家移动到数据点
}
})
world.onPlayerLeave(({entity})=>{
db.sql`UPDATE players SET x = ${entity.position.x}, y = ${entity.position.y}, z = ${entity.position.z} WHERE id = ${entity.player.userKey}`;
})

2020-10-23T17:58:41 点赞:3
在 【🎃岛3万圣节捣蛋更新!】超粘的蜘蛛网方块、哈农飞天南瓜车! 中回复
狼人皮肤已发放完毕,
各位捣蛋鬼请查收
(*≧∪≦)
如果你没有收到,
可能是因为不按规则,
可能是因为作品太水...
如果这两个原因都不是,
不小心漏发了,
评论回复一下吉吉喵哟,
贴上喵ox3主页链接和作品截图

2020-11-02T21:53:54 点赞:0
在 【岛3 🎃万圣鬼马创作节!】送限量狼人皮肤 中回复
狼人皮肤已发放完毕,
各位捣蛋鬼请查收
(*≧∪≦)
如果你没有收到,
可能是因为不按规则,
可能是因为作品太水...
如果这两个原因都不是,
不小心漏发了,
评论回复一下吉吉喵哟,
贴上喵ox3主页链接和作品截图

2020-11-02T21:54:22 点赞:3