Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var readline = require('readline');
- var fs = require('fs');
- var color = require("ansi-color").set;
- var mc = require('minecraft-protocol');
- var states = mc.states;
- var util = require('util');
- var sleep = require('sleep');
- var sleep = require('system-sleep');
- var fs = require('fs');
- var array = fs.readFileSync('path/acc.txt').toString().split("\n");
- var workingarray = []
- for(i in array) {
- var usernameandpassword = array[i]
- var usnmpswd = usernameandpassword.split(':')
- console.log("user: " +usnmpswd[0])
- console.log("pass: " +usnmpswd[1])
- function print_help() {
- console.log("usage: node mcclient_chat.js <hostname> <port> <user> [<password>]");
- }
- var host = "d1.teqnix.dk"
- var port = 25566
- if(host.indexOf(':') != -1) {
- port = host.substring(host.indexOf(':') + 1);
- host = host.substring(0, host.indexOf(':'));
- }
- console.log("connecting to " + host + ":" + port);
- var mcclient = new mc.createClient({
- host: host,
- port: port,
- username: usnmpswd[0],
- password: usnmpswd[1],
- version: '1.10'
- });
- mcclient.on('connect', function() {
- console.info(color('Successfully connected to ' + host + ':' + port, "blink+green"));
- console.info("Sucess")
- workingarray.push(usernameandpassword)
- });
- mcclient.on('error', function(err) {
- console.log("Error occured");
- console.log(err);
- //process.exit(1);
- });
- sleep(20000)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement