forked from wmantly/mc-bot-town
end outpost
This commit is contained in:
parent
13732b1071
commit
cbf7f78604
@ -23,8 +23,6 @@ const nova = new CJbot({
|
|||||||
...conf.mc.bots.nova
|
...conf.mc.bots.nova
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log('owen', conf.mc.bots.owen)
|
|
||||||
|
|
||||||
const owen = new CJbot({
|
const owen = new CJbot({
|
||||||
host: conf.mc.server,
|
host: conf.mc.server,
|
||||||
autoConnect: false,
|
autoConnect: false,
|
||||||
@ -46,5 +44,12 @@ const jimin = new CJbot({
|
|||||||
...conf.mc.bots.jimin
|
...conf.mc.bots.jimin
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const ez = new CJbot({
|
||||||
|
host: conf.mc.server,
|
||||||
|
autoConnect: false,
|
||||||
|
__autoReConnect: false,
|
||||||
|
...conf.mc.bots.ez
|
||||||
|
});
|
||||||
|
|
||||||
module.exports = {bot, henry, owen, linda, jimin, nova};
|
|
||||||
|
module.exports = {bot, henry, owen, linda, jimin, nova, ez};
|
||||||
|
@ -4,9 +4,13 @@ const axios = require('axios');
|
|||||||
const {sleep} = require('../utils');
|
const {sleep} = require('../utils');
|
||||||
const conf = require('../conf');
|
const conf = require('../conf');
|
||||||
|
|
||||||
const {bot, henry, owen, linda, jimin, nova} = require('./mc-bot');
|
const {bot, henry, owen, linda, jimin, nova, ez} = require('./mc-bot');
|
||||||
const pink_quotes = require('../model/pink_quotes')
|
const pink_quotes = require('../model/pink_quotes')
|
||||||
|
|
||||||
|
let myAccounts = ['wmantly', 'useless666', 'tux4242']
|
||||||
|
|
||||||
|
let germans = ['YTMatze', 'mytzor']
|
||||||
|
|
||||||
let townMemebers = [
|
let townMemebers = [
|
||||||
'wmantly', 'useless666', 'tux4242',
|
'wmantly', 'useless666', 'tux4242',
|
||||||
'VinceNL',
|
'VinceNL',
|
||||||
@ -46,132 +50,89 @@ let ballOptions = [
|
|||||||
"Very doubtful.",
|
"Very doubtful.",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
let sites = {
|
||||||
|
city: {
|
||||||
|
bot: bot,
|
||||||
|
desc: 'Invite to the city',
|
||||||
|
allowed: townMemebers
|
||||||
|
},
|
||||||
|
nd: {
|
||||||
|
bot: nova,
|
||||||
|
desc: `Get an invite to New Detroit.`,
|
||||||
|
allowed: townMemebers,
|
||||||
|
},
|
||||||
|
sb: {
|
||||||
|
bot:owen,
|
||||||
|
desc: `Get an invite to the Sky Base.`,
|
||||||
|
allowed: ['wmantly', 'useless666', 'tux4242', 'owenshorts', 'VinceNL', 'Ethan63020', 'Ethan63021'],
|
||||||
|
},
|
||||||
|
fo: {
|
||||||
|
bot: jimin,
|
||||||
|
desc: `Get an invite to the Farming outpost.`,
|
||||||
|
allowed: ['wmantly', 'useless666', 'tux4242', 'pi_chef'],
|
||||||
|
},
|
||||||
|
fo2: {
|
||||||
|
bot:henry,
|
||||||
|
desc: `Get an invite to the Farming outpost 2.`,
|
||||||
|
allowed: ['wmantly', 'useless666', 'tux4242', 'pi_chef'],
|
||||||
|
},
|
||||||
|
german: {
|
||||||
|
bot:linda,
|
||||||
|
desc: `Get an invite you Germans area.`,
|
||||||
|
allowed: ['wmantly', 'useless666', 'tux4242', 'owenshorts', 'VinceNL', 'Ethan63020', 'Ethan63021', 'pi_chef', 'YTMatze', 'mytzor'],
|
||||||
|
},
|
||||||
|
foend: {
|
||||||
|
bot: ez,
|
||||||
|
desc: `Get an invite to the Farming outpost in the end.`,
|
||||||
|
allowed: ['wmantly', 'useless666', 'tux4242', 'pi_chef'],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async function offSiteInvite(from, site){
|
||||||
|
let offSiteBot = sites[site].bot
|
||||||
|
this.__unLockCommand();
|
||||||
|
await offSiteBot.connect();
|
||||||
|
await offSiteBot.bot.chat(`/invite ${from}`);
|
||||||
|
await this.whisper(from, `accept invite from ${offSiteBot.bot.entity.username} within 10 seconds...`)
|
||||||
|
let clear = setTimeout(()=>offSiteBot.quit(), 10000)
|
||||||
|
offSiteBot.on('message', (message) =>{
|
||||||
|
if(message.toString() === `${from} teleported to you.`){
|
||||||
|
offSiteBot.quit();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
bot.addCommand('inv', {
|
bot.addCommand('inv', {
|
||||||
desc: `Have bot invite you to its position.`,
|
desc: `Have bot invite you to its position.`,
|
||||||
allowed: townMemebers,
|
allowed: townMemebers,
|
||||||
async function(from){
|
async function(from, site){
|
||||||
await this.say(`/invite ${from}`);
|
await this.say(`/invite ${from}`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
bot.addCommand('inv-nd', {
|
for(const [name, site] of Object.entries(sites)){
|
||||||
desc: `Get an invite to New Detroit.`,
|
bot.addCommand(`inv-${name}`, {
|
||||||
|
...site,
|
||||||
ignoreLock: true,
|
ignoreLock: true,
|
||||||
allowed: townMemebers,
|
|
||||||
async function(from){
|
async function(from){
|
||||||
this.__unLockCommand();
|
this.__unLockCommand();
|
||||||
await nova.connect();
|
await site.bot.connect();
|
||||||
await nova.bot.chat(`/invite ${from}`);
|
await site.bot.bot.chat(`/invite ${from}`);
|
||||||
await this.whisper(from, `accept invite from ${nova.bot.entity.username} in 10 seconds...`)
|
await this.whisper(from, `accept invite from ${site.bot.bot.entity.username} within 10 seconds...`)
|
||||||
let clear = setTimeout(()=>nova.quit(), 10000)
|
let clear = setTimeout(()=>site.bot.quit(), 10000)
|
||||||
nova.on('message', (message) =>{
|
site.bot.on('message', (message) =>{
|
||||||
console.log(message.toString())
|
|
||||||
if(message.toString() === `${from} teleported to you.`){
|
if(message.toString() === `${from} teleported to you.`){
|
||||||
nova.quit();
|
site.bot.quit();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
|
}
|
||||||
bot.addCommand('inv-sb', {
|
|
||||||
desc: `Get an invite to the Sky Base.`,
|
|
||||||
ignoreLock: true,
|
|
||||||
allowed: ['wmantly', 'useless666', 'tux4242', 'owenshorts', 'VinceNL', 'Ethan63020', 'Ethan63021'],
|
|
||||||
async function(from){
|
|
||||||
this.__unLockCommand();
|
|
||||||
await owen.connect();
|
|
||||||
await owen.bot.chat(`/invite ${from}`);
|
|
||||||
await this.whisper(from, `accept invite from ${owen.bot.entity.username} in 10 seconds...`)
|
|
||||||
let clear = setTimeout(()=>owen.quit(), 10000)
|
|
||||||
owen.on('message', (message) =>{
|
|
||||||
console.log(message.toString())
|
|
||||||
if(message.toString() === `${from} teleported to you.`){
|
|
||||||
owen.quit();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
bot.addCommand('inv-german', {
|
|
||||||
desc: `Get an invite you Germans.`,
|
|
||||||
ignoreLock: true,
|
|
||||||
allowed: ['wmantly', 'useless666', 'tux4242', 'owenshorts', 'VinceNL', 'Ethan63020', 'Ethan63021', 'pi_chef'],
|
|
||||||
async function(from){
|
|
||||||
this.__unLockCommand();
|
|
||||||
await linda.connect();
|
|
||||||
await linda.bot.chat(`/invite ${from}`);
|
|
||||||
await this.whisper(from, `accept invite from ${linda.bot.entity.username} in 10 seconds...`)
|
|
||||||
let clear = setTimeout(()=>linda.quit(), 10000)
|
|
||||||
linda.on('message', (message) =>{
|
|
||||||
console.log(message.toString())
|
|
||||||
if(message.toString() === `${from} teleported to you.`){
|
|
||||||
linda.quit();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
bot.addCommand('inv-fo', {
|
|
||||||
desc: `Get an invite to the Farming outpost.`,
|
|
||||||
ignoreLock: true,
|
|
||||||
allowed: ['wmantly', 'useless666', 'tux4242', 'pi_chef'],
|
|
||||||
async function(from){
|
|
||||||
this.__unLockCommand();
|
|
||||||
await jimin.connect();
|
|
||||||
await jimin.bot.chat(`/invite ${from}`);
|
|
||||||
await this.whisper(from, `accept invite from ${jimin.bot.entity.username} in 10 seconds...`)
|
|
||||||
let clear = setTimeout(()=>jimin.quit(), 10000)
|
|
||||||
jimin.on('message', (message) =>{
|
|
||||||
console.log(message.toString())
|
|
||||||
if(message.toString() === `${from} teleported to you.`){
|
|
||||||
jimin.quit();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
bot.addCommand('inv-fo', {
|
|
||||||
desc: `Get an invite to the Farming outpost.`,
|
|
||||||
ignoreLock: true,
|
|
||||||
allowed: ['wmantly', 'useless666', 'tux4242', 'pi_chef'],
|
|
||||||
async function(from){
|
|
||||||
this.__unLockCommand();
|
|
||||||
await jimin.connect();
|
|
||||||
await jimin.bot.chat(`/invite ${from}`);
|
|
||||||
await this.whisper(from, `accept invite from ${jimin.bot.entity.username} in 10 seconds...`)
|
|
||||||
let clear = setTimeout(()=>jimin.quit(), 10000)
|
|
||||||
jimin.on('message', (message) =>{
|
|
||||||
console.log(message.toString())
|
|
||||||
if(message.toString() === `${from} teleported to you.`){
|
|
||||||
jimin.quit();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
bot.addCommand('inv-fo2', {
|
|
||||||
desc: `Get an invite to the Farming outpost 2.`,
|
|
||||||
ignoreLock: true,
|
|
||||||
allowed: ['wmantly', 'useless666', 'tux4242', 'pi_chef'],
|
|
||||||
async function(from){
|
|
||||||
this.__unLockCommand();
|
|
||||||
await henry.connect();
|
|
||||||
await henry.bot.chat(`/invite ${from}`);
|
|
||||||
await this.whisper(from, `accept invite from ${henry.bot.entity.username} in 10 seconds...`)
|
|
||||||
let clear = setTimeout(()=>henry.quit(), 10000)
|
|
||||||
henry.on('message', (message) =>{
|
|
||||||
console.log(message.toString())
|
|
||||||
if(message.toString() === `${from} teleported to you.`){
|
|
||||||
henry.quit();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
bot.addCommand('.invite', {
|
bot.addCommand('.invite', {
|
||||||
desc: `The bot will /accept an /invite from you.`,
|
desc: `The bot will /accept an /invite from you.`,
|
||||||
allowed: ['wmantly', 'useless666', 'tux4242', 'owenshorts', 'BobinaBlu'],
|
allowed: ['wmantly', 'useless666', 'tux4242', 'owenshorts', 'BobinaBlu', 'pi_chef'],
|
||||||
async function(from){
|
async function(from){
|
||||||
await this.whisper('Coming');
|
await this.whisper('Coming');
|
||||||
await this.say(`/accept`);
|
await this.say(`/accept`);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user