steamutils 1.4.58 → 1.4.60
Sign up to get free protection for your applications and to get access to all the features.
- package/SteamClient.js +33 -6
- package/package.json +1 -1
package/SteamClient.js
CHANGED
@@ -393,7 +393,7 @@ function SteamClient({ username, password, cookie, clientJsToken, isAutoRequestF
|
|
393
393
|
* Get a list of lobbies (* = Unsure description could be wrong)
|
394
394
|
* @param {Boolean} prime
|
395
395
|
* @param {Number|String} rank
|
396
|
-
* @param {Competitive|Wingman|Premier} game_type
|
396
|
+
* @param {Competitive|Wingman|Premier} game_type Premier is not working
|
397
397
|
* @param {Number} timeout
|
398
398
|
* @returns {Promise.<Array>}
|
399
399
|
*/
|
@@ -1994,11 +1994,38 @@ function SteamClient({ username, password, cookie, clientJsToken, isAutoRequestF
|
|
1994
1994
|
}
|
1995
1995
|
|
1996
1996
|
async function playCSGO() {
|
1997
|
-
|
1998
|
-
|
1999
|
-
|
2000
|
-
|
2001
|
-
|
1997
|
+
games = 730;
|
1998
|
+
isInvisible = false;
|
1999
|
+
isAutoPlay = true;
|
2000
|
+
isPartyRegister = false;
|
2001
|
+
const online = await new Promise((resolve) => {
|
2002
|
+
onEvent(
|
2003
|
+
SteamClientEvents.csgoOnline,
|
2004
|
+
function () {
|
2005
|
+
resolve(true);
|
2006
|
+
},
|
2007
|
+
true,
|
2008
|
+
);
|
2009
|
+
onEvent(
|
2010
|
+
SteamClientEvents.error,
|
2011
|
+
function () {
|
2012
|
+
resolve(false);
|
2013
|
+
},
|
2014
|
+
true,
|
2015
|
+
);
|
2016
|
+
onEvent(
|
2017
|
+
SteamClientEvents.playingState,
|
2018
|
+
function ({ playing_blocked, playing_app }) {
|
2019
|
+
if (playing_blocked) {
|
2020
|
+
resolve(false);
|
2021
|
+
}
|
2022
|
+
},
|
2023
|
+
true,
|
2024
|
+
);
|
2025
|
+
init();
|
2026
|
+
});
|
2027
|
+
offAllEvent();
|
2028
|
+
return online;
|
2002
2029
|
}
|
2003
2030
|
|
2004
2031
|
function doFakeGameScore() {
|