Skip to content

Instantly share code, notes, and snippets.

@fs-c
fs-c / steam-activity.js
Last active August 4, 2017 18:28
Basic stuff. Made to fit my needs, but I feel like others will be able to have fun with it too. I run this on a server, but can be run wherever. Requires NodeJS and the steam-user and steam-totp modules.
// By default requires a JSON file with your steam account data,
// defined with the PATH variable.
// See steamdata.json for formatting.
// You can just define the accounts object yourself, just make sure
// to use the correct property names.
require('console-stamp')(console, 'HH:MM:ss.l')
const SteamUser = require('steam-user')
const steamtotp = require('steam-totp')
client.on('loggedOn', details => {
console.log(`Logged on with ${client.steamID.getSteamID64()}.`)
client.setPersona(SteamUser.EPersonaState.Online)
client.gamesPlayed([730]) // Set game to csgo.
client.on('friendMessage', (steamID, message) => {
console.log(config.options.chatResponse.commands[message])
client.chatMessage(id, config.options.chatResponse.unknownCommand)
})
const SteamUser = require('steam-user') // npm install steam-user
const MSG = `Default message.`
const ACCOUNT = {
accountName: '',
password: ''
}
let client = new SteamUser()
@fs-c
fs-c / whitespacer.js
Last active July 30, 2017 10:51
Input anything and the script will add enough spaces to make it appear centered on a FullHD steam client. The result is saved in the clipboard and output in the console. This is a proof of concept or whatever.
// On FullHD in steam client, a custom info box is 90 spaces wide.
// This code WORKS, but it's ugly and not well thought out.
// Look at this as a proof of concept if you will.
const SPACE = ' '
const cp = require('copy-paste')
const rl = require('readline').createInterface({
input: process.stdin,
output: process.stdout
})
{
"eins": "one",
"zwei": "two",
"drei": "three"
}