Advertisement
Guest User

Untitled

a guest
Jan 2nd, 2017
338
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. const SteamUser = require('steam-user');
  2. const client = new SteamUser();
  3.  
  4. function sleep(delay) {
  5. var start = new Date().getTime();
  6. while (new Date().getTime() < start + delay);
  7. }
  8.  
  9. var tags = [7, 263, 775, 1799, 3847];
  10. var names = ["TDiff", "IsCool", "ShinyGoldenDiff", "ProfessorBlink"]
  11.  
  12. SteamUser.prototype.setPersona = function(state, flags, name) {
  13. this._send(SteamUser.EMsg.ClientChangeStatus, {
  14. "persona_state": state,
  15. "persona_state_flags": flags,
  16. "player_name": name
  17. });
  18. };
  19.  
  20. const logOnOptions = {
  21. accountName: process.argv[2],
  22. password: process.argv[3]
  23. };
  24.  
  25. client.logOn(logOnOptions);
  26.  
  27. client.on('loggedOn', () => {
  28. console.log("Logged In! Press CTRL and C to stop.");
  29. while (1) {
  30. for (i = 0; i <= 4; i++) {
  31. client.setPersona(SteamUser.Steam.EPersonaState.Online, tags[i], names[i]);
  32. console.log("Changed flag!");
  33. sleep(5000);
  34. }
  35. }
  36. console.log("Loop done! Press CTRL and C to stop.");
  37. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement