Advertisement
Guest User

Untitled

a guest
Feb 26th, 2018
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.84 KB | None | 0 0
  1. const SteamUser = require('steam-user');
  2. const SteamTotp = require('steam-totp');
  3. const SteamCommunity = require ( 'steamcommunity' );
  4. const community = new SteamCommunity ();
  5.  
  6.  
  7. const client = new SteamUser();
  8.  
  9.  
  10. var antispam = 0;
  11. var banid = 0;
  12. var timerban = 60;
  13. var avastats = 0;
  14. var comstats = 0;
  15. var invblock = 0;
  16. var invgame = 0;
  17. var newfriend = 0;
  18. var spamik = 0;
  19. var n1;
  20. var osh=0;
  21.  
  22. var SteamID = require('steamid');
  23. var sid = new SteamID('76561198149012500'); //steamid jertva
  24. var bid = new SteamID('76561198121188476'); //outo steamid
  25. var vid = new SteamID('76561198149012500');//vladid
  26. var did = new SteamID('76561198193076493');//deadfrog
  27.  
  28. function spamtimer() { //when called, it will reset
  29. spam = 0;
  30.  
  31. }
  32.  
  33. function spamcd() { //when called, it will reset
  34. if (spamik = 1 ) {
  35. community.getSteamUser(sid, function(ERR, USER) {
  36. if (ERR) {
  37.  
  38. console.log("## An error occurred while getting user profile: " + ERR);
  39. } else {
  40. setTimeout(function () { USER.comment('Sieg outo!', (ERR) => {
  41.  
  42.  
  43. if (ERR) {
  44. osh = osh + 1;
  45. client.chatMessage(bid, "osh=" + osh);
  46. console.log("## An error occurred while commenting on user profile: " + ERR);
  47. } else {
  48. client.chatMessage(bid, "!say qq");
  49.  
  50. comstats = comstats + 1;
  51. console.log('comment was posted ' + comstats );
  52.  
  53.  
  54. };
  55. }); } , 200);
  56. USER.comment('<3', (ERR) => {
  57.  
  58.  
  59. if (ERR) {
  60. osh = osh + 1;
  61. client.chatMessage(bid, "osh=" + osh);
  62. console.log("## An error occurred while commenting on user profile: " + ERR);
  63. } else {
  64. comstats = comstats + 1;
  65. client.chatMessage(bid, "!comstats=" + comstats);
  66. console.log('comment was posted ' + comstats );
  67.  
  68.  
  69. };
  70. });
  71.  
  72. }
  73. });
  74. };
  75. }
  76.  
  77.  
  78. require('events').EventEmitter.defaultMaxListeners = 150;
  79.  
  80.  
  81. const logOnOptions = {
  82. accountName: 'sosipisos2',
  83. password: '14881337',
  84.  
  85. };
  86.  
  87. client.logOn(logOnOptions);
  88.  
  89. client.on('loggedOn', () => {
  90. console.log('Logged into Steam');
  91. client.setPersona(SteamUser.Steam.EPersonaState.Online);
  92.  
  93. });
  94.  
  95.  
  96.  
  97. client.on('webSession', function(sessionID, cookies) {
  98.  
  99. community.setCookies(cookies);
  100. });
  101.  
  102. setInterval(spamtimer, 60000);
  103. setInterval(spamcd, 120000);
  104.  
  105.  
  106.  
  107. client.on('friendMessage', function(steamID, message) {
  108. if(message.indexOf("!say ") === 0) {
  109. var n = (message.replace(/^!say ?/, ""));
  110. client.chatMessage(steamID, "" + n);
  111.  
  112. }
  113.  
  114. });
  115.  
  116.  
  117.  
  118.  
  119.  
  120. client.on('friendMessage', function(steamID, message, name) {
  121. if(message.indexOf("!comment1488 ") === 0) {
  122. var n1 = (message.replace(/^!comment1488 ?/, ""));
  123. community.getSteamUser(steamID, function(ERR, USER) {
  124. if (ERR) {
  125. client.chatMessage(steamID, "Error. Pls check privacy profile/comments.");
  126. console.log("## An error occurred while getting user profile: " + ERR);
  127. } else {
  128. USER.comment(n1, (ERR) => {
  129. if (ERR) {
  130. client.chatMessage(steamID, "Error. Pls check privacy profile/comments.Or try later.");
  131. console.log("## An error occurred while commenting on user profile: " + ERR);
  132. } else {
  133. console.log('comment was posted ' + steamID + ' ' + USER.name);
  134. client.chatMessage(steamID, "Gotovo :ccVeryHappy:");
  135. comstats = comstats + 1;
  136. }
  137. });
  138. }
  139. });
  140.  
  141.  
  142. };
  143.  
  144. });
  145.  
  146.  
  147. client.on('friendMessage', function(steamID, message, name) {
  148. if(message == "!commentspam") {
  149. client.chatMessage(steamID, "!say !comment1488 node.js forever.");
  150. client.chatMessage(steamID, "!say !comment1488 node.js forever.");
  151. client.chatMessage(steamID, "!say !comment1488 node.js forever.");
  152. client.chatMessage(steamID, "!say !comment1488 node.js forever.");
  153. client.chatMessage(steamID, "!say !comment1488 node.js forever.");
  154. client.chatMessage(steamID, "!say !comment1488 node.js forever.");
  155. };
  156.  
  157. });
  158.  
  159.  
  160.  
  161.  
  162.  
  163. client.on('friendMessage', function(steamID, message, name) {
  164. if(message == "!stopspam") {
  165. client.chatMessage(steamID, "Done.");
  166. process.exit(-1);
  167.  
  168. }
  169. });
  170.  
  171. client.on('friendMessage', function(steamID, message, name) {
  172. if(message == "zzz" && comstats == 60 && comstats == 61 && comstats == 62 && osh == 3 && osh == 4 ) {
  173. client.chatMessage(sid, "stop me pls. Write !stopspam");
  174. process.exit(-1);
  175.  
  176. }
  177. });
  178.  
  179. client.on('friendMessage', function(steamID, message, name) {
  180. if(message == "qq" ) {
  181. client.chatMessage(sid, 'osh=' + osh);
  182.  
  183.  
  184. }
  185. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement