1 Star 1 Fork 0

Xingyuan55/mcChater

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main.js 714 Bytes
一键复制 编辑 原始数据 按行查看 历史
Xingyuan55 提交于 2023-02-13 14:54 . Build 1000 @ chater1
const mineflayer = require("mineflayer")
const chater = mineflayer.createBot(
{
host: "mc.icraft.cc",
username: "_chater",
port: 49282,
version: "1.16.5",
}
)
function chat_to_game(msg)
{
chater.once('spawn', () => { chater.chat(msg) })
}
chater.on('chat', (username, message) => {
if(username == chater.username) return;
if(message == '1') chater.chat("/tpaccept")
})
chater.on('message', (message) => {
console.log(message.toAnsi())
})
// chater.on("login", (login) =>{
// chat_to_game("/l tt5566tt")
// })
chat_to_game("/l tt5566tt")
chat_to_game("有人吗?wanghany马上来")
chat_to_game("/tpa wanghany")
chat_to_game("/tpa wanghany")
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/XingYuan55/mcChater.git
git@gitee.com:XingYuan55/mcChater.git
XingYuan55
mcChater
mcChater
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385