zack is a big nerd / he is wierd and annoying / why is he so strange?
3
   
Utmerkelse
Favoritt
Favoritter
Fjern som favoritt
Last ned
"/*
del avatar.js
type Z:Workpdl-idlermiscavatar.js > avatar.js
node avatar.js %*
*/
, names = [
'STUFF','JUNK','CRAP','BUNK','SCRAP','FOOD','MISC','WASTE','CHAOS','OFFAL',
'CHAFF','SLOP','LEAK','GEAR', 'ODDS','ENDS','DIRT','MIX','DRECK' ]
, emojis = [
[ '🌂','🎈','🏓','🏀','📕','👹','💗','💄','🐠','🌸','💃','🍖','🌋','🚗', ],
[ '🎄','🎍','⛳','🔋','📗','👽','💚','🐊','🐛','🌳','🥒','🥗','🕺','🚙', ],
[ '🐟','🎫','🎽','👔','📘','👾','💙','💎','🐳','🍇','🍆','🍧','🌏','🚘', ],
[ '⚡','🎁','📣','📀','📒','😺','💛','👑','🐝','👃','🌽','🥞','👳','🚕', ],]
, errors = 0;
account.user.on('loggedOn', (details, parental) => {
console.log('logged on');
account.user.gamesPlayed([399080,399220,399480]);
});
(function group_avatar_changer(index) {
if (index == avatars.length) {
index = 0;
shuffle_array(avatars);
shuffle_array(names);
}
setTimeout(function() {
if (account.user.client.loggedOn) {
account.user.setPersona(SteamUser.EPersonaState.Offline,
names[index] + "[" + emojis[0][Math.floor(Math.random()*14)] +
emojis[1][Math.floor(Math.random()*14)] +
emojis[2][Math.floor(Math.random()*14)] +
emojis[3][Math.floor(Math.random()*14)] + "]");
account.community.uploadAvatar("./group/" + avatars[index], null, function(err) {
if (err) {
if (++errors == 6) {
errors = 0;
account.user.webLogOn();
return console.log('restarting...');
}
return console.log('ERROR, uploadAvatar:' + err);
}
errors = 0;
console.log('uploadAvatar (' + names[index] + '): ' + index + " " + new Date().toString());
});
}
group_avatar_changer(index+1);
}, (60-new Date().getSeconds())*1000);
})(avatars.length);
SteamCommunity.prototype.uploadAvatar = function(image, format, callback) {
fs.readFile(image, function(err, file) {
if (err) {
return callback(err);
}
account.community.httpRequestPost({
"uri": "https://steamproxy.net/actions/FileUploader",
"formData": {
"MAX_FILE_SIZE": file.length,
"type": "group_avatar_image",
"gId": '103582791432273268',
"sessionid": account.community.getSessionID(),
"doSub": 1,
"json": 1,
"avatar": {
"value": file,
"options": {
"filename": 'avatar.jpg',
"contentType": 'image/jpeg'
}
}
},
"json": true
}, function(err, response, body) {
if (err) {
return callback(err);
} else if (body && !body.success && body.message) {
return callback(new Error(body.message));
} else if (response.statusCode != 200) {
return callback(new Error("HTTP error " + response.statusCode));
} else if (!body || !body.success) {
return callback(new Error("Malformed response"));
}
callback(null, body.images.full);
}, "steamcommunity");
})
};"