owobot/plugins/sc_op.js
7cc5c4f330d47060 de78065438 Initial commit
2024-07-06 11:02:11 -04:00

19 lines
513 B
JavaScript
Executable file

module.exports={
load:()=>{
},
loadBot:(b)=>{
b.add_sc_task("op","/op @s[type=player]", true)
b._client.on('login', (p) => {
b.entityId = p.entityId
})
b._client.on('entity_status', (p) => {
if (p.entityId == b.entityId && p.entityStatus == 24) {
b.sc_tasks["op"].failed = 1
} else if (p.entityId == b.entityId && p.entityStatus == 28) {
b.sc_tasks["op"].failed = 0
}
})
}
}