yolkbot 0.1.1-alpha.30 → 0.1.1-alpha.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/build/global.js +2 -2
- package/browser/build/module.js +2 -2
- package/package.json +1 -1
- package/src/bot.js +1 -1
- package/src/comm/Codes.js +1 -74
- package/src/comm/index.js +1 -1
- package/src/constants/codes.js +40 -0
- package/src/packet.js +1 -1
package/package.json
CHANGED
package/src/bot.js
CHANGED
|
@@ -2,7 +2,7 @@ import { createAccount, loginAnonymously, loginWithCredentials, loginWithRefresh
|
|
|
2
2
|
|
|
3
3
|
import CommIn from './comm/CommIn.js';
|
|
4
4
|
import CommOut from './comm/CommOut.js';
|
|
5
|
-
import { CommCode } from './
|
|
5
|
+
import { CommCode } from './constants/codes.js';
|
|
6
6
|
|
|
7
7
|
import GamePlayer from './bot/GamePlayer.js';
|
|
8
8
|
import Matchmaker from './matchmaker.js';
|
package/src/comm/Codes.js
CHANGED
|
@@ -74,76 +74,6 @@ const CommCode = {
|
|
|
74
74
|
|
|
75
75
|
*/
|
|
76
76
|
|
|
77
|
-
const CommCode = {
|
|
78
|
-
swapWeapon: 0,
|
|
79
|
-
joinGame: 0,
|
|
80
|
-
refreshGameState: 0,
|
|
81
|
-
spawnItem: 0,
|
|
82
|
-
observeGame: 0,
|
|
83
|
-
ping: 0,
|
|
84
|
-
bootPlayer: 0,
|
|
85
|
-
banPlayer: 0,
|
|
86
|
-
loginRequired: 0,
|
|
87
|
-
gameLocked: 0,
|
|
88
|
-
reportPlayer: 0,
|
|
89
|
-
banned: 0,
|
|
90
|
-
createPrivateGame: 0,
|
|
91
|
-
switchTeam: 0,
|
|
92
|
-
changeCharacter: 0,
|
|
93
|
-
pause: 0,
|
|
94
|
-
gameOptions: 0,
|
|
95
|
-
gameAction: 0,
|
|
96
|
-
requestGameOptions: 0,
|
|
97
|
-
gameJoined: 0,
|
|
98
|
-
socketReady: 0,
|
|
99
|
-
addPlayer: 0,
|
|
100
|
-
removePlayer: 0,
|
|
101
|
-
fire: 0,
|
|
102
|
-
melee: 0,
|
|
103
|
-
throwGrenade: 0,
|
|
104
|
-
info: 0,
|
|
105
|
-
eventModifier: 0,
|
|
106
|
-
hitThem: 0,
|
|
107
|
-
hitMe: 0,
|
|
108
|
-
collectItem: 0,
|
|
109
|
-
chlgPlayerRerollInGame: 0,
|
|
110
|
-
playerInGameReward: 0,
|
|
111
|
-
playerRewards: 0,
|
|
112
|
-
chat: 0,
|
|
113
|
-
syncThem: 0,
|
|
114
|
-
syncAmmo: 0,
|
|
115
|
-
die: 0,
|
|
116
|
-
beginShellStreak: 0,
|
|
117
|
-
endShellStreak: 0,
|
|
118
|
-
startReload: 0,
|
|
119
|
-
announcement: 0,
|
|
120
|
-
updateBalance: 0,
|
|
121
|
-
reload: 0,
|
|
122
|
-
respawn: 0,
|
|
123
|
-
respawnDenied: 0,
|
|
124
|
-
pong: 0,
|
|
125
|
-
clientReady: 0,
|
|
126
|
-
requestRespawn: 0,
|
|
127
|
-
joinPublicGame: 0,
|
|
128
|
-
joinPrivateGame: 0,
|
|
129
|
-
switchTeamFail: 0,
|
|
130
|
-
expireUpgrade: 0,
|
|
131
|
-
metaGameState: 0,
|
|
132
|
-
syncMe: 0,
|
|
133
|
-
explode: 0,
|
|
134
|
-
keepAlive: 0,
|
|
135
|
-
musicInfo: 0,
|
|
136
|
-
hitMeHardBoiled: 0,
|
|
137
|
-
playerInfo: 0,
|
|
138
|
-
challengeCompleted: 0
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
let ih = 1;
|
|
142
|
-
|
|
143
|
-
Object.keys(CommCode).forEach(e => {
|
|
144
|
-
CommCode[e] = ih++;
|
|
145
|
-
});
|
|
146
|
-
|
|
147
77
|
const CloseCode = {
|
|
148
78
|
gameNotFound: 4000,
|
|
149
79
|
gameFull: 4001,
|
|
@@ -166,7 +96,4 @@ const CloseCode = {
|
|
|
166
96
|
locked: 4023
|
|
167
97
|
}
|
|
168
98
|
|
|
169
|
-
export {
|
|
170
|
-
CommCode,
|
|
171
|
-
CloseCode
|
|
172
|
-
}
|
|
99
|
+
export { CloseCode }
|
package/src/comm/index.js
CHANGED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
export const CommCode = {
|
|
3
|
+
"syncMe": 54,
|
|
4
|
+
"swapWeapon": 0,
|
|
5
|
+
"pause": 15,
|
|
6
|
+
"eventModifier": 27,
|
|
7
|
+
"gameOptions": 16,
|
|
8
|
+
"reload": 43,
|
|
9
|
+
"changeCharacter": 14,
|
|
10
|
+
"melee": 24,
|
|
11
|
+
"updateBalance": 42,
|
|
12
|
+
"gameAction": 17,
|
|
13
|
+
"requestGameOptions": 18,
|
|
14
|
+
"musicInfo": 57,
|
|
15
|
+
"challengeCompleted": 60,
|
|
16
|
+
"throwGrenade": 25,
|
|
17
|
+
"switchTeam": 13,
|
|
18
|
+
"ping": 5,
|
|
19
|
+
"endShellStreak": 39,
|
|
20
|
+
"metaGameState": 53,
|
|
21
|
+
"die": 37,
|
|
22
|
+
"socketReady": 20,
|
|
23
|
+
"joinGame": 1,
|
|
24
|
+
"gameJoined": 19,
|
|
25
|
+
"clientReady": 47,
|
|
26
|
+
"reportPlayer": 10,
|
|
27
|
+
"bootPlayer": 6,
|
|
28
|
+
"hitThem": 28,
|
|
29
|
+
"spawnItem": 3,
|
|
30
|
+
"collectItem": 30,
|
|
31
|
+
"beginShellStreak": 38,
|
|
32
|
+
"hitMe": 29,
|
|
33
|
+
"requestRespawn": 48,
|
|
34
|
+
"chat": 34,
|
|
35
|
+
"removePlayer": 22,
|
|
36
|
+
"respawnDenied": 45,
|
|
37
|
+
"syncThem": 35,
|
|
38
|
+
"respawn": 44,
|
|
39
|
+
"keepAlive": 56
|
|
40
|
+
};
|
package/src/packet.js
CHANGED