用户:
老李头13zl查看:4 回复:6 评论:4 创建时间:2022-11-24T15:54:56
world.onPlayerJoin(async(entity,message) => {
while (true){
if(entity.player.name === '老李头13zl'){
if(message == '拉人进小黑屋'){
entity.player.dialog({
world.say('1')
})
}
}
}
})
求助!
谢谢!
world.onPlayerJoin(async(entity,message) => {
while (true){
if(entity.player.name === '老李头13zl'){
if(message == '拉人进小黑屋'){
entity.player.dialog({
world.say('1')
})
}
}
await sleep(100)}
})点赞0
评论
world.onPlayerJoin(async({entity,message}) => {
while (true){await sleep(100)
if(entity.player.name === '23332808'){
if(message == '拉人进小黑屋'){
entity.player.dialog({
type: Box3DialogType.TEXT,
content: `1`,
})
}
}
}
})点赞0
评论
XiaoLiQAQ你这种实现方式很笨,但是有这种编程思想还是可以的
岛三有更好的api去实现检测发送的文字: world.onChat
更好的实现:
world.onChat(async(entity,message) => {
if(entity.player.name === '老李头13zl'){
if(message == '拉人进小黑屋'){
entity.player.dialog({
type: Box3DialogType.TEXT,
content: `1`,
})
}
}
})点赞1
评论