yolkbot 0.1.0-alpha.9 → 0.1.0
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/build/browser.js +6 -6
- package/package.json +17 -5
- package/src/api.js +97 -23
- package/src/bot/GamePlayer.js +2 -2
- package/src/bot.js +851 -484
- package/src/comm/Codes.js +73 -0
- package/src/constants/index.js +23 -1
- package/src/constants/items.js +663 -264
- package/src/constants/maps.js +57 -18
- package/src/dispatches/BootPlayerDispatch.js +1 -1
- package/src/dispatches/ChatDispatch.js +1 -1
- package/src/dispatches/GameOptionsDispatch.js +1 -1
- package/src/dispatches/GoToAmmoDispatch.js +44 -0
- package/src/dispatches/GoToCoopDispatch.js +44 -0
- package/src/dispatches/GoToGrenadeDispatch.js +44 -0
- package/src/dispatches/GoToPlayerDispatch.js +5 -1
- package/src/dispatches/GoToSpatulaDispatch.js +5 -1
- package/src/dispatches/MeleeDispatch.js +1 -1
- package/src/dispatches/PauseDispatch.js +1 -1
- package/src/dispatches/ReloadDispatch.js +14 -2
- package/src/dispatches/ReportPlayerDispatch.js +1 -1
- package/src/dispatches/SaveLoadoutDispatch.js +11 -34
- package/src/dispatches/SpawnDispatch.js +1 -1
- package/src/dispatches/SwapWeaponDispatch.js +1 -1
- package/src/dispatches/SwitchTeamDispatch.js +1 -1
- package/src/dispatches/ThrowGrenadeDispatch.js +1 -1
- package/src/dispatches/index.js +9 -0
- package/src/matchmaker.js +11 -2
- package/src/pathing/mapnode.js +83 -250
- package/src/socket.js +1 -1
- package/src/types/api.d.ts +2 -16
- package/src/types/bot/GamePlayer.d.ts +25 -21
- package/src/types/bot.d.ts +78 -54
- package/src/types/constants/guns.d.ts +240 -0
- package/src/types/constants/index.d.ts +100 -0
- package/src/types/constants/items.d.ts +21 -0
- package/src/types/constants/maps.d.ts +15 -0
- package/src/types/dispatches/GoToAmmoDispatch.d.ts +8 -0
- package/src/types/dispatches/GoToCoopDispatch.d.ts +8 -0
- package/src/types/dispatches/GoToGrenadeDispatch.d.ts +8 -0
- package/src/types/dispatches/MovementDispatch.d.ts +2 -0
- package/src/types/dispatches/index.d.ts +45 -1
- package/src/types/matchmaker.d.ts +19 -14
- package/src/types/socket.d.ts +7 -0
- package/src/types/gun.d.ts +0 -131
package/src/comm/Codes.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/*
|
|
1
2
|
const CommCode = {
|
|
2
3
|
announcement: 10, // unused
|
|
3
4
|
updateBalance: 11,
|
|
@@ -71,6 +72,78 @@ const CommCode = {
|
|
|
71
72
|
startReload: 70 // unused
|
|
72
73
|
}
|
|
73
74
|
|
|
75
|
+
*/
|
|
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
|
+
|
|
74
147
|
const CloseCode = {
|
|
75
148
|
gameNotFound: 4000,
|
|
76
149
|
gameFull: 4001,
|
package/src/constants/index.js
CHANGED
|
@@ -3,6 +3,8 @@ import { Items } from './items.js';
|
|
|
3
3
|
|
|
4
4
|
export const findItemById = (id) => Items.find(item => item.id === id);
|
|
5
5
|
|
|
6
|
+
export const ChiknWinnerDailyLimit = 3;
|
|
7
|
+
|
|
6
8
|
export const CollectTypes = {
|
|
7
9
|
AMMO: 0,
|
|
8
10
|
GRENADE: 1
|
|
@@ -78,10 +80,30 @@ export const ShellStreaks = {
|
|
|
78
80
|
MiniEgg: 32
|
|
79
81
|
}
|
|
80
82
|
|
|
83
|
+
export const SocialRewards = {
|
|
84
|
+
Discord: 'rew_1200',
|
|
85
|
+
Tiktok: 'rew_1208',
|
|
86
|
+
Instagram: 'rew_1219',
|
|
87
|
+
Steam: 'rew_1223',
|
|
88
|
+
Facebook: 'rew_1227',
|
|
89
|
+
Twitter: 'rew_1234',
|
|
90
|
+
Twitch: 'rew_twitch_social'
|
|
91
|
+
}
|
|
92
|
+
|
|
81
93
|
export const Teams = {
|
|
82
94
|
blue: 1,
|
|
83
95
|
red: 2
|
|
84
96
|
}
|
|
85
97
|
|
|
98
|
+
export const URLRewards = [
|
|
99
|
+
'giveBasketBrosReward',
|
|
100
|
+
'mercZoneFinalGift',
|
|
101
|
+
'midMonthGiveMeEggs',
|
|
102
|
+
'newYolkerSignupReward',
|
|
103
|
+
'newYolkerItemReward',
|
|
104
|
+
'newYolkerWelcomeBack',
|
|
105
|
+
'WelcomeBack'
|
|
106
|
+
]
|
|
107
|
+
|
|
86
108
|
export const UserAgent =
|
|
87
|
-
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/
|
|
109
|
+
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36'
|