yolkbot 0.1.0-alpha.6 → 0.1.0-alpha.61

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.
Files changed (60) hide show
  1. package/build/browser.js +6 -6
  2. package/package.json +15 -5
  3. package/src/api.js +97 -23
  4. package/src/bot/GamePlayer.js +3 -3
  5. package/src/bot.js +851 -484
  6. package/src/comm/Codes.js +73 -0
  7. package/src/constants/index.js +23 -1
  8. package/src/constants/items.js +663 -264
  9. package/src/constants/maps.js +57 -18
  10. package/src/dispatches/BootPlayerDispatch.js +1 -1
  11. package/src/dispatches/ChatDispatch.js +1 -1
  12. package/src/dispatches/GameOptionsDispatch.js +1 -1
  13. package/src/dispatches/GoToAmmoDispatch.js +44 -0
  14. package/src/dispatches/GoToCoopDispatch.js +44 -0
  15. package/src/dispatches/GoToGrenadeDispatch.js +44 -0
  16. package/src/dispatches/GoToPlayerDispatch.js +5 -1
  17. package/src/dispatches/GoToSpatulaDispatch.js +5 -1
  18. package/src/dispatches/MeleeDispatch.js +1 -1
  19. package/src/dispatches/PauseDispatch.js +1 -1
  20. package/src/dispatches/ReloadDispatch.js +14 -2
  21. package/src/dispatches/ReportPlayerDispatch.js +1 -1
  22. package/src/dispatches/SaveLoadoutDispatch.js +11 -34
  23. package/src/dispatches/SpawnDispatch.js +1 -1
  24. package/src/dispatches/SwapWeaponDispatch.js +1 -1
  25. package/src/dispatches/SwitchTeamDispatch.js +1 -1
  26. package/src/dispatches/ThrowGrenadeDispatch.js +1 -1
  27. package/src/dispatches/index.js +9 -0
  28. package/src/matchmaker.js +11 -2
  29. package/src/pathing/mapnode.js +83 -250
  30. package/src/socket.js +1 -1
  31. package/src/types/api.d.ts +2 -16
  32. package/src/types/bot/GamePlayer.d.ts +26 -22
  33. package/src/types/bot.d.ts +118 -30
  34. package/src/types/constants/guns.d.ts +240 -0
  35. package/src/types/constants/index.d.ts +100 -0
  36. package/src/types/constants/items.d.ts +21 -0
  37. package/src/types/constants/maps.d.ts +15 -0
  38. package/src/types/dispatches/BootPlayerDispatch.d.ts +4 -2
  39. package/src/types/dispatches/ChatDispatch.d.ts +1 -1
  40. package/src/types/dispatches/FireDispatch.d.ts +2 -0
  41. package/src/types/dispatches/GameOptionsDispatch.d.ts +1 -1
  42. package/src/types/dispatches/GoToAmmoDispatch.d.ts +8 -0
  43. package/src/types/dispatches/GoToCoopDispatch.d.ts +8 -0
  44. package/src/types/dispatches/GoToGrenadeDispatch.d.ts +8 -0
  45. package/src/types/dispatches/GoToPlayerDispatch.d.ts +2 -1
  46. package/src/types/dispatches/GoToSpatulaDispatch.d.ts +1 -1
  47. package/src/types/dispatches/LookAtPosDispatch.d.ts +2 -0
  48. package/src/types/dispatches/MeleeDispatch.d.ts +2 -0
  49. package/src/types/dispatches/MovementDispatch.d.ts +2 -0
  50. package/src/types/dispatches/PauseDispatch.d.ts +2 -0
  51. package/src/types/dispatches/ReloadDispatch.d.ts +2 -0
  52. package/src/types/dispatches/ReportPlayerDispatch.d.ts +10 -1
  53. package/src/types/dispatches/SaveLoadoutDispatch.d.ts +2 -0
  54. package/src/types/dispatches/SpawnDispatch.d.ts +2 -0
  55. package/src/types/dispatches/SwapWeaponDispatch.d.ts +2 -0
  56. package/src/types/dispatches/SwitchTeamDispatch.d.ts +2 -0
  57. package/src/types/dispatches/ThrowGrenadeDispatch.d.ts +3 -0
  58. package/src/types/dispatches/index.d.ts +45 -1
  59. package/src/types/matchmaker.d.ts +19 -14
  60. package/src/types/socket.d.ts +7 -0
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,
@@ -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/1230.0.0.0 Safari/537.36'
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'