猫史档案馆


@一个人的聊天区。。。

用户:卫道士32_32*2没了卫道士32_32*2没了查看:14 回复:15 评论:14 创建时间:2020-11-07T18:46:18


world.onPlayerJoin(({entity})=>{
    entity.chatdt='无'
})
world.onChat(async({entity,message})=>{if(message=="chat"){
    const result1 = await entity.player.dialog({
        type: Box3DialogType.INPUT,
        title: '聊天区',
        content: `${entity.player.name},请输入要发给的玩家(id)`,
    });
    const result = await entity.player.dialog({
        type: Box3DialogType.INPUT,
        title: '聊天区',
        content: `${entity.player.name},请输入要说的内容`,
    });
    x=world.querySelector('.'+result1);try{
    x.chatdt+=entity.player.name+':'+result+'(id:'+entity.player.boxId+')\n'
    x.player.directMessage('您有新的消息!')}catch{}
    entity.player.directMessage('发送成功!')
}else if (message=='look'){
    entity.player.dialog({
        type: Box3DialogType.TEXT,
        title: "聊天内容",
        content:entity.chatdt
    });
}else if (message=='clear'){
    entity.chatdt='无'
    entity.player.directMessage('清除成功')
}
})
world.onPlayerJoin(({entity})=>{
    entity.addTag(entity.player.boxId)
})

无bug,拷进去即可


回复

上一页1 页 / 共 1下一页
传说云(已退)传说云(已退)

worid.say("代表全体人:咋用?")

点赞0


评论


卫道士32_32*2没了卫道士32_32*2没了

world.onPlayerJoin(({entity})=>{
    entity.chatdt='无'
})
world.onChat(async({entity,message})=>{if(message=="chat"){
    c喵t result1 = await entity.player.dialog({
        type: Box3DialogType.INPUT,
        title: '聊天区',
        content: `${entity.player.name},请输入要发给的玩家(id)`,
    });
    c喵t result = await entity.player.dialog({
        type: Box3DialogType.INPUT,
        title: '聊天区',
        content: `${entity.player.name},请输入要说的内容`,
    });
    x=world.querySelector('.'+result1);try{
    x.chatdt+=entity.player.name+':'+result+'(id:'+entity.player.boxId+')\n'
    x.player.directMessage('您有新的消息!')}catch{}
    entity.player.directMessage('发送成功!')
}else if (message=='look'){
    entity.player.dialog({
        type: Box3DialogType.TEXT,
        title: "聊天内容",
        content:entity.chatdt
    });
}else if (message=='clear'){
    entity.chatdt='无'
    entity.player.directMessage('清除成功')
}
})
world.onPlayerJoin(({entity})=>{
    entity.addTag(entity.player.boxId)
    entity.player.directMessage('输入clear清空私信区,输入chat私信别人,输入look查看私信区')
})

点赞0


评论


传说云(已退)传说云(已退)

ID...................

点赞0


评论


传说云(已退)传说云(已退)

无语

点赞0


评论


传说云(已退)传说云(已退)

能把ID改成名字吗?

emotion_编程猫_谢谢老板

点赞0


评论


传说云(已退)传说云(已退)

用不了

点赞0


评论


传说云(已退)传说云(已退)

eeee

点赞0


评论


卫道士32_32*2没了卫道士32_32*2没了

world.onPlayerJoin(({entity})=>{
    entity.chatdt='无'
})
world.onChat(async({entity,message})=>{if(message=="chat"){
    const result1 = await entity.player.dialog({
        type: Box3DialogType.INPUT,
        title: '聊天区',
        content: `${entity.player.name},请输入要发给的玩家`,
    });
    const result = await entity.player.dialog({
        type: Box3DialogType.INPUT,
        title: '聊天区',
        content: `${entity.player.name},请输入要说的内容`,
    });
    x=world.querySelector('.'+result1);try{
    if(x.chatdt='无'){x.chatdt=entity.player.name+':'+result+'(id:'+entity.player.boxId+')\n'}
    x.chatdt+=entity.player.name+':'+result+'(id:'+entity.player.boxId+')\n'
    x.player.directMessage('您有新的消息!')}catch{}
    entity.player.directMessage('发送成功!')
}else if (message=='look'){
    entity.player.dialog({
        type: Box3DialogType.TEXT,
        title: "聊天内容",
        content:entity.chatdt
    });
}else if (message=='clear'){
    entity.chatdt='无'
    entity.player.directMessage('清除成功')
}
})
world.ambientSound.sample='audio/n.mp3'
world.onPlayerJoin(({entity})=>{
    entity.a喵Tag(entity.player.name)
    entity.player.directMessage('输入clear清空私信区,输入chat私信别人,输入look查看私信区')
})

点赞0


评论


开心地小电鼠开心地小电鼠

hi

点赞0


评论


卫道士32_32*2没了卫道士32_32*2没了

点赞0


评论


卫道士32_32*2没了卫道士32_32*2没了

点赞0


评论


指令者指令者

dd

点赞0


评论


卫道士32_32*2没了卫道士32_32*2没了

点赞0


评论


卫道士32_32*2没了卫道士32_32*2没了

点赞0


评论


卫道士32_32*2没了卫道士32_32*2没了

点赞1


评论