도움이 필요하십니까? 문제를 열지 마십시오 - Gitter Room에서 물어보십시오.
카운터 스트라이크를위한 노드 스팀 플러그인 : 글로벌 공격.
rjacksonm1에 의한 Node-dota2에 기초합니다
이 목록이 너무 길어지고 있습니다. 그것에 있고 싶습니까? Gitter에게 메시지를 보내 주시면 이야기하겠습니다. -Joshuaferrara
매개 변수 :
steamUser
스팀 사용자 인스턴스를 전달하여 현재 상태를 변경하십시오 (게임 내/NOT).steamGC
GC 메시지를 보내고받는 데 사용하기 위해 SteamGameCoordinator 인스턴스를 전달합니다.debug
- 콘솔 작업에 대한 정보를 인쇄할지 여부에 주목하는 부울. var Steam = require ( 'steam' ) ,
steamClient = new Steam . SteamClient ( ) ,
steamUser = new Steam . SteamUser ( steamClient ) ,
steamGC = new Steam . SteamGameCoordinator ( steamClient , 730 ) ,
csgo = require ( 'csgo' ) ,
CSGO = new csgo . CSGOClient ( steamUser , steamGC , false ) ;
모든 방법은 스팀 클리어 인스턴스를 로그온해야합니다.
launch()
Steam에 대한 보고서는 Coun
exit()
Steam에게 CS : GO를 재생하지 않는다고 말합니다.
ToAccountID(steamId)
64 비트 증기 ID를 계정 ID로 변환합니다.
ToSteamID(accountId)
계정 ID를 64 비트 증기 ID로 변환합니다.
Rank.getString(int rank_id)
정수 Rank_id를 문자열로 변환합니다. 예 : CSGO.Rank.getString(1) = "Silver I"
Level.getString(int player_level)
정수 플레이어 _level을 문자열로 변환합니다. 예 : CSGO.Level.getString(1) = "Recruit"
matchmakingStatsRequest()
게임 코디네이터에게 일부 매치 메이킹 통계를 요청하는 메시지를 보냅니다. 게임 코디네이터의 응답에 대한 matchmakingStatsData
이벤트를 들어보십시오. GC를 준비해야합니다 (전화하기 전에 ready
이벤트를 듣습니다).
requestRecentGames()
현재 로그인 한 계정에 대한 최근 게임 목록을 요청합니다. 게임 코디네이터의 응답에 대한 matchList
이벤트를 들어보십시오.
requestLiveGameForUser(accountId)
주어진 사용자에 대한 현재 라이브 게임 정보를 요청합니다. 게임 코디네이터의 응답에 대한 matchList
이벤트를 들어보십시오.
requestGame(string matchid, string outcomeid, int token)
게임에 대한 MatchId, AccomeId 및 토큰이 주어진 게임에 대한 정보를 요청합니다 (팁 : ShareCode 디코더에서 찾을 수 있음). 게임 코디네이터의 응답에 대한 matchList
이벤트를 들어보십시오.
requestWatchInfoFriends(arguments)
게임에 대한 시청 가능한 정보를 요청합니다. 논쟁 :
int request_id ; //Not enough tests yet
account_ids [ array_of_csgo_accounts ] ; //Not enough tests yet
long serverid ; //ServerID of match.
long matchid ; //MatchID of match.
예:
CSGO . requestWatchInfoFriends ( {
serverid : new Long ( - 569600767 , - 2130640678 , true ) . toString ( ) ,
matchid : new Long ( 39 , 719230023 , true ) . toString ( )
} ) ;
요구 사항 : 게임은 살아야합니다.
게임 코디네이터의 응답에 대한 watchList
이벤트를 들어보십시오.
requestCurrentLiveGames()
현재 라이브 게임 목록을 요청합니다. 게임 코디네이터의 응답에 대한 matchList
이벤트를 들어보십시오.
playerProfileRequest(accountId)
accountId
는 플레이어의 계정 ID입니다 (플레이어의 SteamID64는 CSGO.ToAccountID(steamid)
를 사용하여 계정 ID로 변환 할 수 있습니다.
게임 코디네이터에게 플레이어의 프로필을 요청합니다. 플레이어는 온라인 상태이고 CS : Go를 플레이해야합니다. 게임 코디네이터의 응답에 대한 playerProfile
이벤트를 들어보십시오.
참고 : 풍부한 존재를 더 이상 임의의 현으로 설정할 수 없습니다. 오히려 게임은 이제 표시 될 수있는 최대 20 개의 풍부한 존재 값 목록을 정의합니다. 자세한 내용은이 문서의
SetRichPresence
메소드를 참조하십시오.
richPresenceUpload(richPresenceObject)
현재 로그인 한 사용자의 Rich Presence 객체를 설정합니다. 풍부한 존재는 게임에서하고있는 일에 대한 친구에게 정보를 제공하는 밸브의 솔루션입니다. 예를 들어, 다른 Friends 매치 메이킹 게임 (지도 및 점수)에 대한 정보를 볼 때 풍부한 존재를 사용하여 설정됩니다. 이 방법을 사용하는 방법의 예는 example.js에서 찾을 수 있습니다.
itemDataRequest(string s, string a, string d, string m)
지정된 CSGO 항목에 대한 항목 데이터 요청 링크 매개 변수를 검사합니다. 매개 변수 s
검사 링크가 인벤토리에서 나온 경우 값이 있습니다. 마찬가지로, 매개 변수 m
검사 링크가 시장에서 나올 때 값이 있습니다. 검사 링크에서 주어진 매개 변수에 대한 값이 없으면 "0"
으로 설정하십시오.
게임 코디네이터의 응답에 대한 itemData
이벤트를 들어보십시오.
인벤토리 예제 CSGO 항목에 대한 링크 검사
// steam://rungame/730/76561202255233023/+csgo_econ_action_preview%20S76561198084749846A6768147729D12557175561287951743
CSGO . itemDataRequest ( "76561198084749846" , "6768147729" , "12557175561287951743" , "0" ) ;
시장에 대한 예제 CSGO 품목에 대한 링크 검사 링크
// steam://rungame/730/76561202255233023/+csgo_econ_action_preview%20M563330426657599553A6710760926D9406593057029549017
CSGO . itemDataRequest ( "0" , "6710760926" , "9406593057029549017" , "563330426657599553" ) ;
new CSGO.SharecodeDecoder(string code);
ShareCodedeCoder 클래스를 인스턴스화하여 ShareCodes를 해독합니다.
SharecodeDecoder
의 decode()
메소드를 호출하면 디코딩 된 정보가있는 객체를 반환합니다.
console . log ( new CSGO . SharecodeDecoder ( "CSGO-U6MWi-hYFWJ-opPwD-JciHm-qOijD" ) . decode ( ) )
{ matchId : '3106049990460440633' ,
outcomeId : '3106056003414655216' ,
tokenId : '11842' }
ready
GC가 메시지를받을 준비가되었을 때 방출됩니다. unready
이벤트에서 이벤트 핸들러를 무효화 할 수 있어야하므로 익명 기능을 이벤트 처리기로 선언하지 않도록주의하십시오.
unready
GC에 대한 연결 상태가 변경 될 때 방출되고 라이브러리가 상호 작용할 수 없게됩니다. 여기에서 ready
이벤트에서 설정 한 모든 이벤트 핸들러를 지우십시오. 그렇지 않으면 새 ready
이벤트가 전송 될 때마다 각 메시지에 대해 여러 개의 처리기가 있습니다.
exited
.exit()
의도적 인 출구시 취급자를 지우기위한 편의로 호출 될 때 방출됩니다.
itemData
( itemDataResponse
) {
"iteminfo" :
{
"accountid" : null ,
"itemid" : Long { "low" : - 1821786863 , "high" : 1 , "unsigned" : true } ,
"defindex" : 7 ,
"paintindex" : 474 ,
"rarity" : 6 ,
"quality" : 4 ,
"paintwear" : 1054492909 ,
"paintseed" : 183 ,
"killeaterscoretype" : null ,
"killeatervalue" : null ,
"customname" : null ,
"stickers" : [ ] ,
"inventory" : 3221225475 ,
"origin" : 8 ,
"questid" : null ,
"dropreason" : null ,
"floatvalue" : 0.4263376295566559
}
}
게임 코디네이터가 itemDataRequest
메소드에 응답 할 때 방출됩니다.
matchmakingStatsData
( matchmakingStatsResponse
)matchmakingStatsResponse
원시 응답 개체. 아래의 예제 응답. {
"account_id" : 137013074 ,
"ongoingmatch" : { // Only populated when logged in user is in a match
"serverid" : 90112014586923017 ,
"direct_udp_ip" : 2734604850 ,
"direct_udp_port" : 27035 ,
"reservationid" : 18374688715512210549 ,
"reservation" : {
"game_type" : 520 ,
"match_id" : 3245263802660290728 ,
"tournament_event" : null ,
"pre_match_data" : null
} ,
"map" : "de_dust2" ,
"server_address" : "=[A:1:153428969:9318]:0"
} ,
"global_stats" : {
"players_online" : 423480 ,
"servers_online" : 132472 ,
"players_searching" : 4212 ,
"servers_available" : 65497 ,
"ongoing_matches" : 17016 ,
"search_time_avg" : 46530 ,
"search_statistics" : [
{
"game_type" : 264 ,
"search_time_avg" : 128555 ,
"players_searching" : 148
} ,
{
"game_type" : 520 ,
"search_time_avg" : 31962 ,
"players_searching" : 1768
} ,
{
"game_type" : 1032 ,
"search_time_avg" : 122353 ,
"players_searching" : 426
} ,
{
"game_type" : 2056 ,
"search_time_avg" : 136133 ,
"players_searching" : 160
} ,
{
"game_type" : 4104 ,
"search_time_avg" : 62643 ,
"players_searching" : 1069
} ,
{
"game_type" : 8200 ,
"search_time_avg" : 70380 ,
"players_searching" : 563
} ,
{
"game_type" : 16392 ,
"search_time_avg" : 115923 ,
"players_searching" : 132
} ,
{
"game_type" : 32776 ,
"search_time_avg" : 54906 ,
"players_searching" : 1248
} ,
{
"game_type" : 65544 ,
"search_time_avg" : 116871 ,
"players_searching" : 183
} ,
{
"game_type" : 131080 ,
"search_time_avg" : 82308 ,
"players_searching" : 145
} ,
{
"game_type" : 262152 ,
"search_time_avg" : 209331 ,
"players_searching" : 105
} ,
{
"game_type" : 524296 ,
"search_time_avg" : 270376 ,
"players_searching" : 110
} ,
{
"game_type" : 1048584 ,
"search_time_avg" : 64499 ,
"players_searching" : 1020
} ,
{
"game_type" : 268435464 ,
"search_time_avg" : 84615 ,
"players_searching" : 642
} ,
{
"game_type" : 536870920 ,
"search_time_avg" : 104965 ,
"players_searching" : 478
} ,
{
"game_type" : 2097160 ,
"search_time_avg" : 198734 ,
"players_searching" : 228
} ,
{
"game_type" : 134217736 ,
"search_time_avg" : 147703 ,
"players_searching" : 203
} ,
{
"game_type" : 8388616 ,
"search_time_avg" : 538828 ,
"players_searching" : 138
} ,
{
"game_type" : 16777224 ,
"search_time_avg" : 232350 ,
"players_searching" : 192
} ,
{
"game_type" : 4194312 ,
"search_time_avg" : 237269 ,
"players_searching" : 151
} ,
{
"game_type" : 33554440 ,
"search_time_avg" : 203183 ,
"players_searching" : 181
}
] ,
"main_post_url" : "" ,
"required_appid_version" : 13494 ,
"pricesheet_version" : 1438240620 ,
"twitch_streams_version" : 2 ,
"active_tournament_eventid" : 6 ,
"active_survey_id" : 0
} ,
"penalty_seconds" : null , // Contains amount of time logged in account has an MM cooldown
"penalty_reason" : null , // Integer representing reason for MM cooldown
"vac_banned" : 0 ,
"ranking" : {
"account_id" : 137013074 ,
"rank_id" : 11 ,
"wins" : 192 ,
"rank_change" : null
} ,
"commendation" : {
"cmd_friendly" : 3 ,
"cmd_teaching" : 3 ,
"cmd_leader" : 3
} ,
"medals" : {
"medal_team" : 0 ,
"medal_combat" : 0 ,
"medal_weapon" : 0 ,
"medal_global" : 0 ,
"medal_arms" : 0 ,
"display_items_defidx" : [ ] ,
"featured_display_item_defidx" : null
} ,
"my_current_event" : null ,
"my_current_event_teams" : [ ] ,
"my_current_team" : null ,
"my_current_event_stages" : [ ] ,
"survey_vote" : null ,
"activity" : null ,
"player_level" : 3 ,
"player_cur_xp" : 327684342 ,
"player_xp_bonus_flags" : null
}
게임 코디네이터가 matchmakingStatsRequest
메소드에 응답 할 때 방출됩니다.
playerProfile
( playerProfileRequest
에 대한 응답) {
"request_id" : null ,
"account_profiles" : [
{
"account_id" : 137013074 ,
"ongoingmatch" : null ,
"global_stats" : null ,
"penalty_seconds" : null ,
"penalty_reason" : null ,
"vac_banned" : null ,
"ranking" : {
"account_id" : 137013074 ,
"rank_id" : 11 ,
"wins" : 192 ,
"rank_change" : null
},
"commendation" : {
"cmd_friendly" : 3 ,
"cmd_teaching" : 3 ,
"cmd_leader" : 3
},
"medals" : {
"medal_team" : 0 ,
"medal_combat" : 0 ,
"medal_weapon" : 0 ,
"medal_global" : 0 ,
"medal_arms" : 0 ,
"display_items_defidx" : [],
"featured_display_item_defidx" : null
},
"my_current_event" : null ,
"my_current_event_teams" : [],
"my_current_team" : null ,
"my_current_event_stages" : [],
"survey_vote" : null ,
"activity" : null ,
"player_level" : 3 ,
"player_cur_xp" : 327684342 ,
"player_xp_bonus_flags" : null
}
]
}
게임 코디네이터가 playerProfileRequest
메소드에 응답 할 때 방출됩니다.
matchList
( requestRecentGames
에 대한 응답)전체 응답은 README에 비해 너무 커서 브라우저가 충돌했습니다. 이로 인해, 나는 반환 된 것에 대한 발췌를 포함시켰다.
{
"reservationid" : {
"low" : 65 ,
"high" : 715485165 ,
"unsigned" : true
},
"reservation" : {
"account_ids" : [
2879081 ,
182261908 ,
225695551 ,
30039512 ,
90132590 ,
94815387 ,
37671978 ,
31906737 ,
137013074 ,
61347894
],
"game_type" : 1032 ,
"match_id" : null ,
"server_version" : null ,
"rankings" : [],
"encryption_key" : null ,
"encryption_key_pub" : null ,
"party_ids" : [],
"whitelist" : [],
"tv_master_steamid" : null ,
"tournament_event" : null ,
"tournament_teams" : [],
"tournament_casters_account_ids" : [],
"tv_relay_steamid" : null ,
"pre_match_data" : null
},
"map" : " http://replay124.valve.net/730/003072985384448163905_0699089210.dem.bz2 " ,
"round" : null ,
"kills" : [
21 ,
22 ,
15 ,
15 ,
12 ,
37 ,
20 ,
23 ,
17 ,
15
],
"assists" : [
5 ,
5 ,
1 ,
3 ,
4 ,
2 ,
3 ,
2 ,
6 ,
7
],
"deaths" : [
22 ,
22 ,
24 ,
23 ,
21 ,
13 ,
13 ,
19 ,
20 ,
20
],
"scores" : [
55 ,
54 ,
40 ,
39 ,
37 ,
79 ,
65 ,
59 ,
41 ,
37
],
"pings" : [],
"round_result" : null ,
"match_result" : 2 ,
"team_scores" : [
11 ,
16
],
"confirm" : null ,
"reservation_stage" : null ,
"match_duration" : 2332 ,
"enemy_kills" : [
21 ,
22 ,
15 ,
15 ,
12 ,
37 ,
20 ,
23 ,
17 ,
15
],
"enemy_headshots" : [
12 ,
11 ,
4 ,
2 ,
3 ,
9 ,
6 ,
9 ,
3 ,
12
],
"enemy_3ks" : [],
"enemy_4ks" : [],
"enemy_5ks" : [],
"mvps" : [
4 ,
3 ,
1 ,
1 ,
2 ,
4 ,
5 ,
2 ,
3 ,
2
],
"spectators_count" : null ,
"spectators_count_tv" : null ,
"spectators_count_lnk" : null ,
"enemy_kills_agg" : []
}
requestRecentGames
, requestGame
, requestLiveGameForUser
, requestCurrentLiveGames
가 응답 할 때 방출됩니다.
watchList
( requestWatchInfoFriends
에 대한 응답)예:
{
"request_id" : 0 ,
"account_ids" : [],
"watchable_match_infos" : [
{
"server_ip" : 2453839835 ,
"tv_port" : 28056 ,
"tv_spectators" : 1 ,
"tv_time" : 417 ,
"tv_watch_password" : {
"buffer" : {
"type" : " Buffer " ,
"data" : [ ]
},
"offset" : 21 ,
"markedOffset" : -1 ,
"limit" : 53 ,
"littleEndian" : true ,
"noAssert" : false
},
"cl_decryptdata_key" : null ,
"cl_decryptdata_key_pub" : {
"low" : -249571153 ,
"high" : 1941167002 ,
"unsigned" : true
},
"game_type" : 32776 ,
"game_mapgroup" : " mg_de_mirage " ,
"game_map" : " de_mirage " ,
"server_id" : {
"low" : 2054631424 ,
"high" : 20977258 ,
"unsigned" : true
},
"match_id" : {
"low" : 32 ,
"high" : 719254593 ,
"unsigned" : true
},
"reservation_id" : null
}
],
"extended_timeout" : null
}