Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var i = 0,
- length = bots.length;
- start(i);
- function start(i) {
- var botObj = bots[i];
- common.log('Bot #' + i + ' Connecting');
- bots[i] = vapor();
- var secret = botObj.login.sharedSecret;
- bots[i].init({
- username: botObj.login.username,
- password: botObj.login.password
- });
- bots[i].use(vapor.plugins.autoReconnect);
- bots[i].use(vapor.plugins.autoResponder, 'oi u jabbo cunt');
- bots[i].use(vapor.plugins.declineFriendRequests);
- bots[i].use(vapor.plugins.declineGroupInvites);
- bots[i].use(vapor.plugins.essentials);
- bots[i].use(vapor.plugins.fs, 'storage/bot-' + i);
- bots[i].use(vapor.plugins.offlineMessages);
- bots[i].use(vapor.plugins.presence, {
- displayName: 'CSGO-Flux Bot #' + i,
- state: 'trade'
- });
- var k = i;
- bots[i].use({
- name: 'accountManagement',
- plugin: function(VaporAPI) {
- VaporAPI.registerHandler({
- emitter: 'vapor',
- event: 'steamGuard'
- }, function(callback){
- var code = codeGen.generateAuthCode(secret);
- common.log('Attempting Steamguard: ' + code);
- callback(code);
- });
- VaporAPI.registerHandler({
- emitter: 'vapor',
- event: 'disconnected'
- }, function(error) {
- common.log('Bot #' + k + ' Disconnected');
- common.log(error.message);
- });
- VaporAPI.registerHandler({
- emitter: 'vapor',
- event: 'ready'
- }, function() {
- common.log('Bot #' + k + ' Connected');
- });
- var steamUser = VaporAPI.getHandler('steamUser');
- managers[i] = new trade({
- domain: 'csgo-flux.com',
- steam: steamUser,
- language: 'en'
- });
- if(i < length-1) {
- i++;
- start(i);
- }
- }
- });
- bots[i].connect();
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement