yolkbot 1.3.10 → 1.4.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.
Files changed (65) hide show
  1. package/README.md +7 -7
  2. package/browser/build/global.js +1 -123
  3. package/browser/build/module.js +1 -123
  4. package/dist/api.js +1 -3
  5. package/dist/bot/GamePlayer.js +1 -3
  6. package/dist/bot.js +1 -3
  7. package/dist/comm/CommIn.js +1 -3
  8. package/dist/comm/CommOut.js +1 -3
  9. package/dist/comm/index.js +1 -3
  10. package/dist/constants/CloseCode.js +1 -3
  11. package/dist/constants/CommCode.js +1 -3
  12. package/dist/constants/challenges.js +1 -3
  13. package/dist/constants/guns.js +1 -3
  14. package/dist/constants/index.js +1 -3
  15. package/dist/constants/items.js +1 -3
  16. package/dist/constants/maps.js +1 -3
  17. package/dist/constants/regions.js +1 -3
  18. package/dist/dispatches/BanPlayerDispatch.js +1 -3
  19. package/dist/dispatches/BootPlayerDispatch.js +1 -3
  20. package/dist/dispatches/ChatDispatch.js +1 -3
  21. package/dist/dispatches/FireDispatch.js +1 -3
  22. package/dist/dispatches/GameOptionsDispatch.js +1 -3
  23. package/dist/dispatches/GoToAmmoDispatch.js +1 -3
  24. package/dist/dispatches/GoToCoopDispatch.js +1 -3
  25. package/dist/dispatches/GoToGrenadeDispatch.js +1 -3
  26. package/dist/dispatches/GoToPlayerDispatch.js +1 -3
  27. package/dist/dispatches/GoToSpatulaDispatch.js +1 -3
  28. package/dist/dispatches/LookAtDispatch.js +1 -3
  29. package/dist/dispatches/LookAtPosDispatch.js +1 -3
  30. package/dist/dispatches/MeleeDispatch.js +1 -3
  31. package/dist/dispatches/MovementDispatch.js +1 -3
  32. package/dist/dispatches/PauseDispatch.js +1 -3
  33. package/dist/dispatches/ReloadDispatch.js +1 -3
  34. package/dist/dispatches/ReportPlayerDispatch.js +1 -3
  35. package/dist/dispatches/ResetGameDispatch.js +1 -3
  36. package/dist/dispatches/SaveLoadoutDispatch.js +1 -3
  37. package/dist/dispatches/SpawnDispatch.js +1 -3
  38. package/dist/dispatches/SwapWeaponDispatch.js +1 -3
  39. package/dist/dispatches/SwitchTeamDispatch.js +1 -3
  40. package/dist/dispatches/ThrowGrenadeDispatch.js +1 -3
  41. package/dist/dispatches/index.js +1 -3
  42. package/dist/env/fetch.js +10 -12
  43. package/dist/env/globals.js +1 -3
  44. package/dist/index.js +2 -10
  45. package/dist/matchmaker.js +1 -3
  46. package/dist/pathing/astar.js +1 -3
  47. package/dist/pathing/binaryheap.js +1 -3
  48. package/dist/pathing/mapnode.js +1 -3
  49. package/dist/socket.js +1 -3
  50. package/dist/types/api.d.ts +1 -1
  51. package/dist/types/matchmaker.d.ts +1 -1
  52. package/dist/types/wasm/bytes.d.ts +1 -0
  53. package/dist/types/wasm/direct.d.ts +3 -0
  54. package/dist/types/wasm/legacy.d.ts +63 -0
  55. package/dist/types/wasm/util.d.ts +9 -0
  56. package/dist/util.js +1 -3
  57. package/dist/wasm/bytes.js +1 -3
  58. package/dist/wasm/direct.js +1 -0
  59. package/dist/wasm/legacy.js +1 -0
  60. package/dist/wasm/util.js +1 -0
  61. package/package.json +17 -8
  62. package/dist/types/wasm/wrapper.d.ts +0 -10
  63. package/dist/wasm/imports.js +0 -125
  64. package/dist/wasm/utils.js +0 -3
  65. package/dist/wasm/wrapper.js +0 -3
package/dist/api.js CHANGED
@@ -1,3 +1 @@
1
- /* eslint-disable */
2
-
3
- var f=Object.defineProperty;var n=(d,e)=>f(d,"name",{value:e,configurable:!0});import c from"./env/globals.js";import p from"./socket.js";import{FirebaseKey as l,UserAgent as u}from"./constants/index.js";const h={origin:"https://shellshock.io","user-agent":u,"x-client-version":"Chrome/JsCore/9.17.2/FirebaseCore-web","x-firebase-locale":"en"};class y{static{n(this,"API")}constructor(e={}){this.proxy=e.proxy,this.instance=e.instance||"shellshock.io",this.protocol=e.protocol||"wss",this.maxRetries=e.maxRetries||5,this.suppressErrors=e.suppressErrors||!1,this.connectionTimeout=e.connectionTimeout||5e3}queryServices=n(async e=>{const r=new p(`${this.protocol}://${this.instance}/services/`,this.proxy);return r.connectionTimeout=this.connectionTimeout,!await r.tryConnect(-2)||r.socket.readyState<1?"websocket_connect_fail":new Promise(t=>{let s=!1;r.onmessage=i=>{s=!0;try{const a=JSON.parse(i.data);t(a)}catch{this.suppressErrors||(console.error("queryServices: Bad API JSON response with call: "+e.cmd+" and data:",JSON.stringify(e)),console.error("queryServices: Full data sent: ",JSON.stringify(e))),t("bad_json")}r.close()},r.onerror=()=>!s&&t("unknown_socket_error"),r.onclose=()=>!s&&t("services_closed_early"),r.send(JSON.stringify(e))})},"queryServices");#e=n(async(e,r,o)=>{if(!e||!r)return"firebase_no_credentials";let t,s;try{t=await(await c.fetch(`https://identitytoolkit.googleapis.com/v1/accounts:${o}?key=${l}`,{method:"POST",body:JSON.stringify({email:e,password:r,returnSecureToken:!0}),headers:{...h,"content-type":"application/json"},proxy:this.proxy})).json(),s=t.idToken}catch(a){return a.code==="auth/network-request-failed"?(this.suppressErrors||console.error("loginWithCredentials: Network req failed (auth/network-request-failed)"),"firebase_network_failed"):a.code==="auth/missing-email"?"firebase_no_credentials":a.code==="ERR_BAD_REQUEST"?(this.suppressErrors||console.error("loginWithCredentials: Error:",e,r),this.suppressErrors||console.error("loginWithCredentials: Error:",t||a),"firebase_bad_request"):(this.suppressErrors||console.error("loginWithCredentials: Error:",e,r,a),"firebase_unknown_error")}if(!s)return this.suppressErrors||console.error("loginWithCredentials: the game sent no idToken",t),"firebase_no_token";this.idToken=s;const i=await this.queryServices({cmd:"auth",firebaseToken:s});return typeof i=="object"?{firebase:t,...i}:i},"#authWithEmailPass");createAccount=n(async(e,r)=>await this.#e(e,r,"signUp"),"createAccount");loginWithCredentials=n(async(e,r)=>await this.#e(e,r,"signInWithPassword"),"loginWithCredentials");loginWithRefreshToken=n(async e=>{if(!e)return"firebase_no_credentials";const r=new URLSearchParams;r.append("grant_type","refresh_token"),r.append("refresh_token",e);let o,t;try{o=await(await c.fetch(`https://securetoken.googleapis.com/v1/token?key=${l}`,{method:"POST",body:r,headers:{...h,"content-type":"application/x-www-form-urlencoded"},proxy:this.proxy})).json(),t=o.id_token}catch(i){return i.code==="auth/network-request-failed"?(this.suppressErrors||console.error("loginWithRefreshToken: Network req failed (auth/network-request-failed)"),"firebase_network_failed"):i.code==="auth/missing-email"?"firebase_no_credentials":(this.suppressErrors||console.error("loginWithRefreshToken: Error:",i,e),"firebase_unknown_error")}if(!t)return this.suppressErrors||console.error("loginWithRefreshToken: the game sent no idToken",o),"firebase_no_token";this.idToken=t;const s=await this.queryServices({cmd:"auth",firebaseToken:t});return typeof s=="object"?{firebase:o,...s}:s},"loginWithRefreshToken");loginAnonymously=n(async()=>{const r=await(await c.fetch("https://identitytoolkit.googleapis.com/v1/accounts:signUp?key="+l,{method:"POST",body:JSON.stringify({returnSecureToken:!0}),headers:{...h,"content-type":"application/json"},proxy:this.proxy})).json(),o=r.idToken;if(!o)return this.suppressErrors||console.error("loginAnonymously: the game sent no idToken",r),"firebase_no_token";this.idToken=o;const t=await this.queryServices({cmd:"auth",firebaseToken:o});return typeof t=="object"?{firebase:r,...t}:t},"loginAnonymously");sendEmailVerification=n(async(e=this.idToken)=>{if(!e)return"no_idtoken_passed";const o=await(await c.fetch("https://identitytoolkit.googleapis.com/v1/accounts:sendOobCode?key="+l,{method:"POST",body:JSON.stringify({requestType:"VERIFY_EMAIL",idToken:e}),headers:{...h,"content-type":"application/json"},proxy:this.proxy})).json();return o.kind!=="identitytoolkit#GetOobConfirmationCodeResponse"?(this.suppressErrors||console.error("sendEmailVerification: the game sent an invalid response",o),"firebase_invalid_response"):{email:o.email}},"sendEmailVerification");verifyOobCode=n(async e=>{if(!e)return"no_oob_code_passed";const o=await(await c.fetch("https://www.googleapis.com/identitytoolkit/v3/relyingparty/setAccountInfo?key="+l,{method:"POST",body:JSON.stringify({oobCode:e}),headers:{...h,"x-client-version":"Chrome/JsCore/3.7.5/FirebaseCore-web",referer:"https://shellshockio-181719.firebaseapp.com/","content-type":"application/json"},proxy:this.proxy})).json();return o.emailVerified?o.email:(this.suppressErrors||console.error("verifyOobCode: the game sent an invalid response",o),"firebase_invalid_response")},"verifyOobCode")}var m=y;export{y as API,m as default};
1
+ import a from"./env/globals.js";import h from"./socket.js";import{FirebaseKey as c,UserAgent as d}from"./constants/index.js";const l={origin:"https://shellshock.io","user-agent":d,"x-client-version":"Chrome/JsCore/9.17.2/FirebaseCore-web","x-firebase-locale":"en"};export class API{constructor(e={}){this.proxy=e.proxy;this.instance=e.instance||"shellshock.io";this.protocol=e.protocol||"wss";this.maxRetries=e.maxRetries||5;this.suppressErrors=e.suppressErrors||!1;this.connectionTimeout=e.connectionTimeout||5000}queryServices=async(e)=>{const r=new h(`${this.protocol}://${this.instance}/services/`,this.proxy);r.connectionTimeout=this.connectionTimeout;if(!await r.tryConnect(-2)||r.socket.readyState!==1)return"websocket_connect_fail";return new Promise((t)=>{let s=!1;r.onmessage=(i)=>{s=!0;try{const n=JSON.parse(i.data);t(n)}catch{if(!this.suppressErrors){console.error("queryServices: Bad API JSON response with call:",e.cmd,"and data:",JSON.stringify(e));console.error("queryServices: Full data sent:",JSON.stringify(e))}t("bad_json")}r.close()};r.onerror=()=>!s&&t("unknown_socket_error");r.onclose=()=>!s&&t("services_closed_early");r.send(JSON.stringify(e))})};#e=async(e,r,o)=>{if(!e||!r)return"firebase_no_credentials";let t,s;try{t=await(await a.fetch(`https://identitytoolkit.googleapis.com/v1/accounts:${o}?key=${c}`,{method:"POST",body:JSON.stringify({email:e,password:r,returnSecureToken:!0}),headers:{...l,"content-type":"application/json"},proxy:this.proxy})).json();s=t.idToken}catch(n){if(n.code==="auth/network-request-failed"){if(!this.suppressErrors)console.error("loginWithCredentials: Network req failed (auth/network-request-failed)");return"firebase_network_failed"}else if(n.code==="auth/missing-email")return"firebase_no_credentials";else if(n.code==="ERR_BAD_REQUEST"){if(!this.suppressErrors)console.error("loginWithCredentials: Error:",e,r);if(!this.suppressErrors)console.error("loginWithCredentials: Error:",t||n);return"firebase_bad_request"}if(!this.suppressErrors)console.error("loginWithCredentials: Error:",e,r,n);return"firebase_unknown_error"}if(!s){if(!this.suppressErrors)console.error("loginWithCredentials: the game sent no idToken",t);return"firebase_no_token"}this.idToken=s;const i=await this.queryServices({cmd:"auth",firebaseToken:s});return typeof i==="object"?{firebase:t,...i}:i};createAccount=async(e,r)=>await this.#e(e,r,"signUp");loginWithCredentials=async(e,r)=>await this.#e(e,r,"signInWithPassword");loginWithRefreshToken=async(e)=>{if(!e)return"firebase_no_credentials";const r=new URLSearchParams;r.append("grant_type","refresh_token");r.append("refresh_token",e);let o,t;try{o=await(await a.fetch(`https://securetoken.googleapis.com/v1/token?key=${c}`,{method:"POST",body:r,headers:{...l,"content-type":"application/x-www-form-urlencoded"},proxy:this.proxy})).json();t=o.id_token}catch(i){if(i.code==="auth/network-request-failed"){if(!this.suppressErrors)console.error("loginWithRefreshToken: Network req failed (auth/network-request-failed)");return"firebase_network_failed"}else if(i.code==="auth/missing-email")return"firebase_no_credentials";if(!this.suppressErrors)console.error("loginWithRefreshToken: Error:",i,e);return"firebase_unknown_error"}if(!t){if(!this.suppressErrors)console.error("loginWithRefreshToken: the game sent no idToken",o);return"firebase_no_token"}this.idToken=t;const s=await this.queryServices({cmd:"auth",firebaseToken:t});return typeof s==="object"?{firebase:o,...s}:s};loginAnonymously=async()=>{const r=await(await a.fetch(`https://identitytoolkit.googleapis.com/v1/accounts:signUp?key=${c}`,{method:"POST",body:JSON.stringify({returnSecureToken:!0}),headers:{...l,"content-type":"application/json"},proxy:this.proxy})).json(),o=r.idToken;if(!o){if(!this.suppressErrors)console.error("loginAnonymously: the game sent no idToken",r);return"firebase_no_token"}this.idToken=o;const t=await this.queryServices({cmd:"auth",firebaseToken:o});return typeof t==="object"?{firebase:r,...t}:t};sendEmailVerification=async(e=this.idToken)=>{if(!e)return"no_idtoken_passed";const o=await(await a.fetch(`https://identitytoolkit.googleapis.com/v1/accounts:sendOobCode?key=${c}`,{method:"POST",body:JSON.stringify({requestType:"VERIFY_EMAIL",idToken:e}),headers:{...l,"content-type":"application/json"},proxy:this.proxy})).json();if(o.kind!=="identitytoolkit#GetOobConfirmationCodeResponse"){if(!this.suppressErrors)console.error("sendEmailVerification: the game sent an invalid response",o);return"firebase_invalid_response"}return{email:o.email}};verifyOobCode=async(e)=>{if(!e)return"no_oob_code_passed";const o=await(await a.fetch(`https://www.googleapis.com/identitytoolkit/v3/relyingparty/setAccountInfo?key=${c}`,{method:"POST",body:JSON.stringify({oobCode:e}),headers:{...l,"x-client-version":"Chrome/JsCore/3.7.5/FirebaseCore-web",referer:"https://shellshockio-181719.firebaseapp.com/","content-type":"application/json"},proxy:this.proxy})).json();if(!o.emailVerified){if(!this.suppressErrors)console.error("verifyOobCode: the game sent an invalid response",o);return"firebase_invalid_response"}return o.email}}export default API;
@@ -1,3 +1 @@
1
- /* eslint-disable */
2
-
3
- var d=Object.defineProperty;var h=(t,s)=>d(t,"name",{value:s,configurable:!0});import{GunList as u,Movement as n,ShellStreak as c,SocialMedia as f}from"../constants/index.js";import{Cluck9mm as l}from"../constants/guns.js";const r=Object.fromEntries(Object.entries(f).map(([t,s])=>[s,t.toLowerCase()]));class g{static{h(this,"GamePlayer")}constructor(s,e=null){this.id=s.id,this.uniqueId=s.uniqueId,this.name=s.name,this.safeName=s.safeName,this.team=s.team,this.playing=s.playing,this.socials=s.social&&JSON.parse(s.social),this.socials&&this.socials.forEach(i=>i.type=r[i.id]),this.isVip=s.upgradeProductId>0,this.showBadge=!s.hideBadge||!1,this.streak=s.score,this.streakRewards=Object.values(c).filter(i=>s.activeShellStreaks&i),this.scale=this.streakRewards.includes(c.MiniEgg)?.5:1,this.position={x:s.x,y:s.y,z:s.z},this.jumping=s.$controlKeys&n.Jump,this.scoping=s.$controlKeys&n.Scope,this.climbing=!1,this.view={yaw:s.yaw,pitch:s.pitch},this.updateKotcZone(e),this.character={eggColor:s.shellColor,primaryGun:s.primaryWeaponItem,secondaryGun:s.secondaryWeaponItem,stamp:s.stampItem,hat:s.hatItem,grenade:s.grenadeItem,melee:s.meleeItem,stampPos:{x:s.stampPosX,y:s.stampPosY}},this.stats={totalKills:s.totalKills,totalDeaths:s.totalDeaths,bestStreak:s.bestStreak},this.activeGun=s.weaponIdx,this.selectedGun=s.charClass,this.weapons=[],this.character.primaryGun&&(this.weapons[0]=new u[this.selectedGun],this.weapons[1]=new l),this.grenades=1,this.hp=s.hp,this.hpShield=0,this.spawnShield=s.shield,this.randomSeed=0}updateKotcZone(s){if(!s)return this.inKotcZone=!1;const e=Math.floor(this.position.x),i=Math.floor(this.position.y),m=Math.floor(this.position.z);this.inKotcZone=s.some(o=>o.x===e&&o.y===i&&o.z===m)&&this.playing}}var x=g;export{g as GamePlayer,x as default};
1
+ import{GunList as c,Movement as o,ShellStreak as h,SocialMedia as m}from"../constants/index.js";import{Cluck9mm as d}from"../constants/guns.js";const u=Object.fromEntries(Object.entries(m).map(([s,t])=>[t,s.toLowerCase()]));export class GamePlayer{constructor(s,t=null){this.id=s.id;this.uniqueId=s.uniqueId;this.name=s.name;this.safeName=s.safeName;this.team=s.team;this.playing=s.playing;this.socials=s.social&&JSON.parse(s.social);if(this.socials)this.socials.forEach((i)=>i.type=u[i.id]);this.isVip=s.upgradeProductId>0;this.showBadge=!s.hideBadge||!1;this.streak=s.score;this.streakRewards=Object.values(h).filter((i)=>s.activeShellStreaks&i);this.scale=this.streakRewards.includes(h.MiniEgg)?0.5:1;this.position={x:s.x,y:s.y,z:s.z};this.jumping=s.$controlKeys&o.Jump;this.scoping=s.$controlKeys&o.Scope;this.climbing=!1;this.view={yaw:s.yaw,pitch:s.pitch};this.updateKotcZone(t);this.character={eggColor:s.shellColor,primaryGun:s.primaryWeaponItem,secondaryGun:s.secondaryWeaponItem,stamp:s.stampItem,hat:s.hatItem,grenade:s.grenadeItem,melee:s.meleeItem,stampPos:{x:s.stampPosX,y:s.stampPosY}};this.stats={totalKills:s.totalKills,totalDeaths:s.totalDeaths,bestStreak:s.bestStreak};this.activeGun=s.weaponIdx;this.selectedGun=s.charClass;this.weapons=[];if(this.character.primaryGun){this.weapons[0]=new c[this.selectedGun];this.weapons[1]=new d}this.grenades=1;this.hp=s.hp;this.hpShield=0;this.spawnShield=s.shield;this.randomSeed=0}updateKotcZone(s){if(!s)return this.inKotcZone=!1;const t=Math.floor(this.position.x),i=Math.floor(this.position.y),n=Math.floor(this.position.z);this.inKotcZone=s.some((e)=>e.x===t&&e.y===i&&e.z===n)&&this.playing}}export default GamePlayer;
package/dist/bot.js CHANGED
@@ -1,3 +1 @@
1
- /* eslint-disable */
2
-
3
- var j=Object.defineProperty;var P=(k,e)=>j(k,"name",{value:e,configurable:!0});import Z from"./api.js";import s from"./comm/CommIn.js";import y from"./comm/CommOut.js";import $ from"./constants/CloseCode.js";import c from"./constants/CommCode.js";import E from"./bot/GamePlayer.js";import q from"./matchmaker.js";import Y from"./socket.js";import{ChiknWinnerDailyLimit as V,CollectType as R,CoopState as G,findItemById as p,FramesBetweenSyncs as _,GameAction as N,GameMode as d,GameOptionFlag as X,GunList as J,ItemType as Q,Movement as S,PlayType as A,ShellStreak as u,StateBufferSize as T}from"./constants/index.js";import M from"./dispatches/LookAtPosDispatch.js";import L from"./dispatches/MovementDispatch.js";import tt from"./env/globals.js";import{NodeList as et}from"./pathing/mapnode.js";import{coords as st}from"./wasm/wrapper.js";import{fetchMap as at,initKotcZones as it}from"./util.js";import{Challenges as nt}from"./constants/challenges.js";import{Maps as B}from"./constants/maps.js";import{Regions as D}from"./constants/regions.js";const K=Object.fromEntries(Object.entries(d).map(([k,e])=>[e,k])),H=Object.fromEntries(Object.entries(X).map(([k,e])=>[k[0].toLowerCase()+k.slice(1),e])),z={CHALLENGES:1,BOT_STATS:2,PATHFINDING:3,PING:5,COSMETIC_DATA:6,PLAYER_HEALTH:7,PACKET_HOOK:8,LOG_PACKETS:10,NO_LOGIN:11,DEBUG_BUFFER:12,NO_AFK_KICK:16,LOAD_MAP:17,OBSERVE_GAME:18,NO_REGION_CHECK:19,NO_EXIT_ON_ERROR:20,RENEW_SESSION:21,VIP_HIDE_BADGE:22},x=P((k,e)=>(k%e+e)%e,"mod");class ot{static{P(this,"Bot")}static Intents=z;Intents=z;#s=[];#t={};#i=[];#e;#n;constructor(e={}){e.proxy&&tt.isBrowser&&this.processError("proxies do not work and hence are not supported in the browser"),this.intents=e.intents||[],this.intents.includes(this.Intents.COSMETIC_DATA)&&(p(1001)||this.processError("you cannot use the COSMETIC_DATA intent inside of the singlefile browser bundles")),this.instance=e.instance||"shellshock.io",this.protocol=e.protocol||"wss",this.proxy=e.proxy||"",this.connectionTimeout=e.connectionTimeout||5e3,this.state={name:"yolkbot",weaponIdx:0,inGame:!1,chatLines:0,yaw:0,pitch:0,controlKeys:0,reloading:!1,swappingGun:!1,usingMelee:!1,stateIdx:0,serverStateIdx:0,shotsFired:0,buffer:[],left:!1},this.players={},this.me=new E({}),this.game={raw:{},code:"",socket:null,gameModeId:0,gameMode:K[0],mapIdx:0,map:{filename:"",hash:"",name:"",modes:{FFA:!1,Teams:!1,Spatula:!1,King:!1},availability:"both",numPlayers:"18",raw:{},nodes:{},zones:[]},playerLimit:0,isGameOwner:!1,isPrivate:!0,options:{gravity:1,damage:1,healthRegen:1,locked:!1,noTeamChange:!1,noTeamShuffle:!1,weaponsDisabled:Array(7).fill(!1),mustUseSecondary:!1},collectables:[[],[]],teamScore:[0,0,0],spatula:{coords:{x:0,y:0,z:0},controlledBy:0,controlledByTeam:0},stage:G.Capturing,zoneNumber:0,activeZone:[],capturing:0,captureProgress:0,numCapturing:0,capturePercent:0},this.#n=this.game,this.account={id:0,firebase:{idToken:"",refreshToken:"",expiresIn:"3600",localId:""},firebaseId:"",sessionId:"",session:0,email:"",password:"",cw:{atLimit:!1,limit:0,secondsUntilPlay:0,canPlayAgain:Date.now()},loadout:{hatId:null,meleeId:0,stampId:null,classIdx:0,colorIdx:0,grenadeId:0,primaryId:[3100,3600,3400,3800,4e3,4200,4500],secondaryId:new Array(7).fill(3e3),stampPositionX:0,stampPositionY:0},ownedItemIds:[],vip:!1,emailVerified:!1,isAged:!1,eggBalance:0,adminRoles:0,rawLoginData:{},isDoubleEggWeeknd:P(()=>{const t=new Date().getUTCDay(),a=new Date().getUTCHours();return t>=5&&a>=20||t===6||t===0},"isDoubleEggWeeknd")},this.#e=this.account,this.matchmaker=null,this.api=new Z({proxy:this.proxy,protocol:this.protocol,instance:this.instance,maxRetries:e?.apiMaxRetries,connectionTimeout:this.connectionTimeout}),this.ping=0,this.lastPingTime=-1,this.lastDeathTime=-1,this.lastUpdateTick=0,this.pathing={nodeList:null,followingPath:!1,activePath:null,activeNode:null,activeNodeIdx:0},this.hasQuit=!1,this.intents.includes(this.Intents.NO_AFK_KICK)&&(this.afkKickInterval=0),this.intents.includes(this.Intents.RENEW_SESSION)&&(this.renewSessionInterval=0)}dispatch(e){return e.validate(this)?(e.check(this)?e.execute(this):this.#s.push(e),!0):!1}async createAccount(e,t){this.account=this.#e,this.account.email=e,this.account.password=t;const a=await this.api.createAccount(e,t);return this.processLoginData(a)}async login(e,t){this.account=this.#e,this.account.email=e,this.account.password=t;const a=await this.api.loginWithCredentials(e,t);return this.processLoginData(a)}async loginWithRefreshToken(e){this.account=this.#e;const t=await this.api.loginWithRefreshToken(e);return this.processLoginData(t)}async loginAnonymously(){this.account=this.#e;const e=await this.api.loginAnonymously();return this.processLoginData(e)}processLoginData(e){return typeof e!="object"?(this.emit("authFail",e),e):e.banRemaining?(this.emit("banned",e.banRemaining),"account_banned"):e.playerOutput?(this.account.firebase=e.firebase||{},e=e.playerOutput,this.account.rawLoginData=e,this.account.adminRoles=e.adminRoles||0,this.account.eggBalance=e.currentBalance,this.account.emailVerified=e.emailVerified,this.account.firebaseId=e.firebaseId,this.account.id=e.id,this.account.isAged=new Date(e.dateCreated).getTime()<17145468e5,this.account.loadout=e.loadout,this.account.ownedItemIds=e.ownedItemIds,this.account.session=e.session,this.account.sessionId=e.sessionId,this.account.vip=e.active_sub==="IsVIP",this.intents.includes(this.Intents.BOT_STATS)&&(this.account.stats={lifetime:e.statsLifetime,monthly:e.statsCurrent}),this.intents.includes(this.Intents.CHALLENGES)&&this.#a(e.challenges),this.emit("authSuccess",this.account),this.intents.includes(this.Intents.RENEW_SESSION)&&(this.renewSessionInterval=setInterval(async()=>{if(!this.account?.sessionId)return clearInterval(this.renewSessionInterval);(await this.api.queryServices({cmd:"renewSession",sessionId:this.account.sessionId})).data!=="renewed"&&this.emit("sessionExpired")},6e5)),this.account):(this.emit("authFail",e),e)}#a(e){this.account.challenges=[];for(const t of e){const a=nt.find(i=>i.id===t.challengeId);a&&(delete t.playerId,this.account.challenges.push({raw:{challengeInfo:a,challengeData:t},id:t.challengeId,name:a.loc.title,desc:a.loc.desc,rewardEggs:a.reward,isRerolled:!!t.reset,isClaimed:!!t.claimed,isCompleted:!!t.completed,progressNum:t.progress,goalNum:a.goal}))}}async initMatchmaker(){if(!this.account.sessionId&&!this.intents.includes(this.Intents.NO_LOGIN)){const e=await this.loginAnonymously();if(typeof e!="object")return e}if(!this.matchmaker){if(this.matchmaker=new q({api:this.api,proxy:this.proxy,protocol:this.protocol,instance:this.instance,sessionId:this.account.sessionId,connectionTimeout:this.connectionTimeout,noLogin:this.intents.includes(this.Intents.NO_LOGIN)}),!await this.matchmaker.ws.tryConnect())return"matchmaker_tryconnect_failed";this.matchmaker.on("authFail",t=>this.emit("authFail",t)),this.matchmaker.on("error",t=>this.processError(t))}return!0}async findPublicGame(e,t){return typeof e!="string"?"no_region_passed":!D.find(i=>i.id===e)&&!this.intents.includes(this.Intents.NO_REGION_CHECK)?"invalid_region_passed":typeof t!="number"?"no_mode_passed":Object.values(d).indexOf(t)===-1?"invalid_mode_passed":await this.initMatchmaker()?await new Promise(i=>{const o=P(n=>{if(n.command!=="notice"){if(this.matchmaker.off("msg",o),n.command==="gameFound")return i(n);if(n.error==="sessionNotFound")return i("internal_session_error");this.processError("unknown matchmaker response "+JSON.stringify(n))}},"listener");this.matchmaker.on("msg",o),this.matchmaker.send({command:"findGame",region:e,playType:A.JoinPublic,gameType:t,sessionId:this.account.sessionId})}):"matchmaker_init_fail"}async createPrivateGame(e,t,a){if(typeof e!="string")return"no_region_passed";if(!D.find(n=>n.id===e)&&!this.intents.includes(this.Intents.NO_REGION_CHECK))return"invalid_region_passed";if(typeof t!="number")return"no_mode_passed";if(Object.values(d).indexOf(t)===-1)return"invalid_mode_passed";if(typeof a!="string")return"no_map_passed";const i=B.findIndex(n=>n.name.toLowerCase()===a.toLowerCase());return i===-1?"invalid_map_passed":await this.initMatchmaker()?await new Promise(n=>{const r=P(h=>{if(h.command!=="notice"){if(this.matchmaker.off("msg",r),h.command==="gameFound")return n(h);if(h.error==="sessionNotFound")return n("internal_session_error");this.processError("unknown matchmaker response "+JSON.stringify(h))}},"listener");this.matchmaker.on("msg",r),this.matchmaker.send({command:"findGame",region:e,playType:A.CreatePrivate,gameType:t,sessionId:this.account.sessionId,noobLobby:!1,map:i})}):"matchmaker_init_fail"}async join(e,t){if(this.state.name=e||"yolkbot",typeof t=="string"){if(t.includes("#")&&(t=t.split("#")[1]),!await this.initMatchmaker())return"matchmaker_init_fail";if(await new Promise(n=>{const r=P(h=>{if(h.command==="gameFound"&&(this.matchmaker.off("msg",r),this.game.raw=h,this.game.code=h.id,n(h.id)),h.error&&h.error==="gameNotFound")return this.processError(`game "${t}" not found, it may have expired.`),this.leave(),"gameNotFound"},"listener");this.matchmaker.on("msg",r),this.matchmaker.send({command:"joinGame",id:t,observe:!1,sessionId:this.account.sessionId})})==="gameNotFound")return"game_not_found";if(!this.game.raw.id)return this.processError("an internal error occured while joining the game, please report this to developers")}if(typeof t=="object"&&(this.account.id===0&&await this.loginAnonymously(),this.game.raw=t,this.game.code=this.game.raw.id,!this.game.raw.id||!this.game.raw.subdomain||!this.game.raw.uuid))return"invalid_game_object";const a=this.game.raw.host||(this.instance.startsWith("localhost:")?this.instance:`${this.game.raw.subdomain}.${this.instance}`);return this.game.socket=new Y(`${this.protocol}://${a}/game/${this.game.raw.id}`,this.proxy),this.game.socket.binaryType="arraybuffer",this.game.socket.connectionTimeout=this.connectionTimeout,this.game.socket.onBeforeConnect=()=>{this.game.socket.onmessage=o=>this.processPacket(o.data),this.game.socket.onclose=o=>{this.state.left?this.state.left=!1:(this.emit("close",o.code),this.leave(-1))}},await this.game.socket.tryConnect()?!0:"websocket_tryconnect_fail"}#o(){if(Object.entries(this.me.position).map(t=>Math.floor(t[1])).join(",")===this.pathing.activePath[this.pathing.activePath.length-1].positionStr)this.pathing.followingPath=!1,this.pathing.activePath=null,this.pathing.activeNode=null,this.pathing.activeNodeIdx=0,this.dispatch(new L(0));else{let t;this.pathing.activeNodeIdx<this.pathing.activePath.length-1?(t=this.pathing.activePath[this.pathing.activeNodeIdx+1].flatCenter(),this.dispatch(new M(t))):(t=this.pathing.activePath[this.pathing.activeNodeIdx].flatCenter(),this.dispatch(new M(t)));for(const a of this.pathing.activePath)if(a.flatRadialDistance(this.me.position)<.1&&a.position.y===Math.floor(this.me.position.y)&&this.pathing.activePath.indexOf(a)>=this.pathing.activeNodeIdx){this.pathing.activeNodeIdx=this.pathing.activePath.indexOf(a)+1,this.pathing.activeNode=this.pathing.activePath[this.pathing.activeNodeIdx];break}this.state.controlKeys&S.Forward||this.dispatch(new L(S.Forward))}}update(){if(this.hasQuit)return;this.pathing.followingPath&&this.intents.includes(this.Intents.PATHFINDING)&&this.#o();for(let t=0;t<this.#s.length;t++){const a=this.#s[t];a.check(this)&&(a.execute(this),this.#s.splice(t,1))}if(this.state.chatLines=Math.max(0,this.state.chatLines-1/120),this.me.playing){const t=this.state.stateIdx;if(this.intents.includes(this.Intents.DEBUG_BUFFER)&&(console.log("setting buffer for idx",t),console.log("checking...shotsFired",this.state.shotsFired)),this.me.jumping=!!(this.state.controlKeys&S.Jump),this.state.buffer[t]={controlKeys:this.state.controlKeys,yaw:this.state.yaw,pitch:this.state.pitch,shotsFired:this.state.shotsFired},this.state.shotsFired=0,this.lastUpdateTick>=2){this.emit("tick");const a=new y;a.packInt8(c.syncMe),a.packInt8(this.state.stateIdx),a.packInt8(this.state.serverStateIdx);const i=x(this.state.stateIdx-_+1,T);for(let o=0;o<_;o++){const n=x(i+o,T),r=this.state.buffer[n]||{},h=r.controlKeys||0,g=r.shotsFired||0,f=r.yaw??this.state.yaw,l=r.pitch??this.state.pitch;this.intents.includes(this.Intents.DEBUG_BUFFER)&&console.log("going with",this.state.stateIdx,i,n,r),a.packInt8(h),a.packInt8(g),a.packString(st(f,l)),a.packInt8(100)}a.send(this.game.socket),this.state.buffer=[],this.lastUpdateTick=0}else this.lastUpdateTick++;this.state.stateIdx=x(this.state.stateIdx+1,T)}if(!this.intents.includes(this.Intents.PLAYER_HEALTH))return;const e=.1*(this.game.isPrivate?this.game.options.healthRegen:1);for(const t of Object.values(this.players)){if(t.playing&&t.hp>0){const a=t.streakRewards.includes(u.OverHeal);t.hp+=a?-e:e,t.hp=a?Math.max(100,t.hp):Math.min(100,t.hp)}t.spawnShield>0&&(t.spawnShield-=6)}}on(e,t){Object.keys(this.#t).includes(e)?this.#t[e].push(t):this.#t[e]=[t]}once(e,t){const a=P((...i)=>{t(...i),this.off(e,a)},"onceCb");this.on(e,a)}onAny(e){this.#i.push(e)}off(e,t){t?this.#t[e]=this.#t[e].filter(a=>a!==t):this.#t[e]=[]}emit(e,...t){if(!this.hasQuit){if(this.#t[e])for(const a of this.#t[e])a(...t);for(const a of this.#i)a(e,...t)}}#c(){const e=s.unPackInt8U(),t=s.unPackInt8U(),a=s.unPackString().valueOf(),i=this.players[e];this.emit("chat",i,a,t)}#r(){const e=s.unPackInt8U(),t=this.intents.includes(this.Intents.COSMETIC_DATA),a={id:e,uniqueId:s.unPackString(),name:s.unPackString(),safeName:s.unPackString(),charClass:s.unPackInt8U(),team:s.unPackInt8U(),primaryWeaponItem:t?p(s.unPackInt16U()):s.unPackInt16U(),secondaryWeaponItem:t?p(s.unPackInt16U()):s.unPackInt16U(),shellColor:s.unPackInt8U(),hatItem:t?p(s.unPackInt16U()):s.unPackInt16U(),stampItem:t?p(s.unPackInt16U()):s.unPackInt16U(),stampPosX:s.unPackInt8(),stampPosY:s.unPackInt8(),grenadeItem:t?p(s.unPackInt16U()):s.unPackInt16U(),meleeItem:t?p(s.unPackInt16U()):s.unPackInt16U(),x:s.unPackFloat(),y:s.unPackFloat(),z:s.unPackFloat(),$dx:s.unPackFloat(),$dy:s.unPackFloat(),$dz:s.unPackFloat(),yaw:s.unPackRadU(),pitch:s.unPackRad(),score:s.unPackInt32U(),$kills:s.unPackInt16U(),$deaths:s.unPackInt16U(),$streak:s.unPackInt16U(),totalKills:s.unPackInt32U(),totalDeaths:s.unPackInt32U(),bestStreak:s.unPackInt16U(),$bestOverallStreak:s.unPackInt16U(),shield:s.unPackInt8U(),hp:s.unPackInt8U(),playing:s.unPackInt8U(),weaponIdx:s.unPackInt8U(),$controlKeys:s.unPackInt8U(),upgradeProductId:s.unPackInt8U(),activeShellStreaks:s.unPackInt8U(),social:s.unPackLongString(),hideBadge:s.unPackInt8U()};this.game.mapIdx=s.unPackInt8U(),this.game.isPrivate=s.unPackInt8U()===1,this.game.gameModeId=s.unPackInt8U();const i=new E(a,this.game.gameMode===d.KOTC?this.game.activeZone:null);this.players[a.id]||(this.players[a.id]=i),this.emit("playerJoin",i),this.me.id===a.id&&(this.me=i,this.emit("botJoin",this.me))}#h(){const e=s.unPackInt8U(),t=s.unPackInt16U(),a=s.unPackFloat(),i=s.unPackFloat(),o=s.unPackFloat(),n=s.unPackInt8U(),r=s.unPackInt8U(),h=s.unPackInt8U(),g=s.unPackInt8U(),f=s.unPackInt8U(),l=this.players[e];l&&(l.playing=!0,l.randomSeed=t,l.weapons[0]&&l.weapons[0].ammo&&(l.weapons[0].ammo.rounds=n),l.weapons[0]&&l.weapons[0].ammo&&(l.weapons[0].ammo.store=r),l.weapons[1]&&l.weapons[1].ammo&&(l.weapons[1].ammo.rounds=h),l.weapons[1]&&l.weapons[1].ammo&&(l.weapons[1].ammo.store=g),l.grenades=f,l.position={x:a,y:i,z:o},l.spawnShield=120,this.emit("playerRespawn",l))}#l(){const e=s.unPackInt8U(),t=s.unPackFloat(),a=s.unPackFloat(),i=s.unPackFloat(),o=s.unPackInt8U(),n=this.players[e];if(!n||n.id===this.me.id){for(let w=0;w<_;w++)s.unPackInt8U(),s.unPackRadU(),s.unPackRad(),s.unPackInt8U();return}for(let w=0;w<_;w++){const C=s.unPackInt8U();C&S.Jump?n.jumping=!0:n.jumping=!1,C&S.Scope?n.scoping=!0:n.scoping=!1;const U={...n.view};n.view.yaw=s.unPackRadU(),n.view.pitch=s.unPackRad(),(n.view.yaw!==U.yaw||n.view.pitch!==U.pitch)&&this.emit("playerRotate",n,U,n.view),n.scale=s.unPackInt8U()}const r=n.position,h=r.x!==t||r.y!==a||r.z!==i,g=n.climbing!==o,f=h||g,l=f?{...r}:null;if(r.x!==t&&(r.x=t),r.z!==i&&(r.z=i),(!n.jumping||Math.abs(r.y-a)>.5)&&(r.y=a),g&&(n.climbing=o),!f||(this.emit("playerMove",n,l,r),this.game.gameModeId!==d.KOTC))return;const I=this.game.activeZone,v=!!n.inKotcZone;if(!I&&v){n.inKotcZone=!1,this.emit("playerLeaveZone",n);return}n.updateKotcZone(I);const b=!!n.inKotcZone;v!==b&&(n.inKotcZone=b,this.emit(b?"playerEnterZone":"playerLeaveZone",n))}#m(){const e=s.unPackInt8U(),t=this.players[e];t&&(t.playing=!1,t.streakRewards&&(t.streakRewards=[]),this.emit("playerPause",t),t.inKotcZone&&(t.inKotcZone=!1,this.emit("playerLeaveZone",t)))}#u(){const e=s.unPackInt8U(),t=s.unPackInt8U(),a=this.players[e];a&&(a.activeGun=t,this.emit("playerSwapWeapon",a,t))}#d(){const e=s.unPackInt8U(),t=s.unPackInt8U();s.unPackInt8U(),s.unPackInt8U();const a=s.unPackInt8U(),i=this.players[e],o=this.players[t],n=i?{...i}:null;i&&(i.id===this.me.id&&(this.lastDeathTime=Date.now()),i.playing=!1,i.streak=0,i.hp=100,i.spawnShield=0,i.stats.totalDeaths++,i.inKotcZone=!1,this.emit("playerLeaveZone",i)),o&&(o.streak++,o.stats.totalKills++,o.streak>o.stats.bestStreak&&(o.stats.bestStreak=o.streak)),this.emit("playerDeath",i,o,n,a)}#p(){const e=s.unPackInt8U(),t={posX:s.unPackFloat(),posY:s.unPackFloat(),posZ:s.unPackFloat(),dirX:s.unPackFloat(),dirY:s.unPackFloat(),dirZ:s.unPackFloat()},a=this.players[e];if(!a)return;const i=a.weapons[a.activeGun];i&&i.ammo&&(i.ammo.rounds--,this.emit("playerFire",a,i,t))}#g(){const e=s.unPackInt16U(),t=s.unPackInt8U(),a=s.unPackFloat(),i=s.unPackFloat(),o=s.unPackFloat();this.game.collectables[t].push({id:e,x:a,y:i,z:o}),this.emit("spawnItem",t,{x:a,y:i,z:o},e)}#k(){const e=s.unPackInt8U(),t=s.unPackInt8U(),a=s.unPackInt8U(),i=s.unPackInt16U(),o=this.players[e];if(o){if(this.game.collectables[t]=this.game.collectables[t].filter(n=>n.id!==i),t===R.Ammo){const n=o.weapons[a];n&&n.ammo&&(n.ammo.store=Math.min(n.ammo.storeMax,n.ammo.store+n.ammo.pickup),this.emit("playerCollectAmmo",o,n,i))}t===R.Grenade&&(o.grenades++,o.grenades>3&&(o.grenades=3),this.emit("playerCollectGrenade",o,i))}}#I(){const e=s.unPackInt8U(),t=s.unPackInt8U(),a=this.players[e];if(!a)return;const i=a.hp;a.hp=t,this.emit("playerDamage",a,i,a.hp)}#f(){const e=s.unPackInt8U();s.unPackFloat(),s.unPackFloat();const t=this.me.hp;this.me.hp=e,this.emit("playerDamage",this.me,t,this.me.hp)}#P(){const e=s.unPackInt8U(),t=this.players[e];s.unPackInt8U();const a=s.unPackInt8U(),i=s.unPackFloat(),o=s.unPackFloat(),n=s.unPackFloat();if(this.me.climbing=!!s.unPackInt8U(),s.unPackInt8U(),s.unPackInt8U(),!t)return;this.state.serverStateIdx=a;const r=t.position.x,h=t.position.y,g=t.position.z;t.position.x=i,t.position.y=o,t.position.z=n,(r!==i||h!==o||g!==n)&&this.emit("playerMove",t,{x:r,y:h,z:g},{x:i,y:o,z:n})}#y(){const e=new y;e.packInt8(c.eventModifier),e.send(this.game.socket)}#w(){const e=s.unPackInt8U(),t={...this.players[e]};delete this.players[e.toString()],this.emit("playerLeave",t)}#b(){if(this.game.gameModeId===d.Spatula){const e={...this.game};this.game.teamScore[1]=s.unPackInt16U(),this.game.teamScore[2]=s.unPackInt16U();const t={x:s.unPackFloat(),y:s.unPackFloat(),z:s.unPackFloat()},a=s.unPackInt8U(),i=s.unPackInt8U();this.game.spatula={coords:t,controlledBy:a,controlledByTeam:i},this.emit("gameStateChange",e,this.game)}else if(this.game.gameModeId===d.KOTC){const e={...this.game};this.game.stage=s.unPackInt8U(),this.game.zoneNumber=s.unPackInt8U(),this.game.capturing=s.unPackInt8U(),this.game.captureProgress=s.unPackInt16U(),this.game.numCapturing=s.unPackInt8U(),this.game.teamScore[1]=s.unPackInt8U(),this.game.teamScore[2]=s.unPackInt8U(),this.game.capturePercent=this.game.captureProgress/1e3,this.game.activeZone=this.game.map.zones?this.game.map.zones[this.game.zoneNumber-1]:null;const t=Object.values(this.players).filter(a=>a.inKotcZone&&a.playing);this.game.activeZone&&Object.values(this.players).forEach(a=>a.updateKotcZone(this.game.activeZone)),this.game.numCapturing<=0&&Object.values(this.players).forEach(a=>{a.inKotcZone=!1,this.emit("playerLeaveZone",a)}),this.emit("gameStateChange",e,this.game,t)}else this.game.gameModeId===d.Team&&(this.game.teamScore[1]=s.unPackInt16U(),this.game.teamScore[2]=s.unPackInt16U());this.game.gameModeId!==d.Spatula&&delete this.game.spatula,this.game.gameModeId!==d.KOTC&&(delete this.game.stage,delete this.game.zoneNumber,delete this.game.capturing,delete this.game.captureProgress,delete this.game.numCapturing,delete this.game.numCapturing,delete this.game.activeZone),this.game.gameModeId===d.FFA&&delete this.game.teamScore}#U(){const e=s.unPackInt8U(),t=s.unPackInt8U(),a=this.players[e];if(a){switch(t){case u.HardBoiled:e===this.me.id&&(this.me.shieldHp=100),a.streakRewards.push(u.HardBoiled);break;case u.EggBreaker:a.streakRewards.push(u.EggBreaker);break;case u.Restock:{a.grenades=3,a.weapons[0]&&a.weapons[0].ammo&&(a.weapons[0].ammo.rounds=a.weapons[0].ammo.capacity,a.weapons[0].ammo.store=a.weapons[0].ammo.storeMax),a.weapons[1]&&a.weapons[1].ammo&&(a.weapons[1].ammo.rounds=a.weapons[1].ammo.capacity,a.weapons[1].ammo.store=a.weapons[1].ammo.storeMax);break}case u.OverHeal:a.hp=Math.min(200,a.hp+100),a.streakRewards.push(u.OverHeal);break;case u.DoubleEggs:a.streakRewards.push(u.DoubleEggs);break;case u.MiniEgg:a.scale=.5,a.streakRewards.push(u.MiniEgg);break}this.emit("playerBeginStreak",a,t)}}#S(){const e=s.unPackInt8U(),t=s.unPackInt8U(),a=this.players[e];if(!a)return;[u.EggBreaker,u.OverHeal,u.DoubleEggs,u.MiniEgg].includes(t)&&a.streakRewards.includes(t)&&(a.streakRewards=a.streakRewards.filter(o=>o!==t)),t===u.MiniEgg&&(a.scale=1),this.emit("playerEndStreak",a,t)}#v(){const e=s.unPackInt8U(),t=s.unPackInt8U(),a=s.unPackFloat(),i=s.unPackFloat();this.me&&(this.me.shieldHp=e,this.me.hp=t,this.me.shieldHp<=0?(this.me.streakRewards=this.me.streakRewards.filter(o=>o!==u.HardBoiled),this.emit("selfShieldLost",this.me.hp,{dx:a,dz:i})):this.emit("selfShieldHit",this.me.shieldHp,this.me.hp,{dx:a,dz:i}))}#C(){const e={...this.game.options};let t=s.unPackInt8U(),a=s.unPackInt8U(),i=s.unPackInt8U();(t<1||t>4)&&(t=4),(a<0||a>8)&&(a=4),i>16&&(i=4),this.game.options.gravity=t/4,this.game.options.damage=a/4,this.game.options.healthRegen=i/4;const o=s.unPackInt8U();Object.keys(H).forEach(n=>{const r=o&H[n]?1:0;this.game.options[n]=r}),this.game.options.weaponsDisabled=Array.from({length:7},()=>s.unPackInt8U()===1),this.game.options.mustUseSecondary=this.game.options.weaponsDisabled.every(n=>n),this.emit("gameOptionsChange",e,this.game.options)}#_(){const e=s.unPackInt8U();e===N.Pause&&(this.emit("gameForcePause"),setTimeout(()=>this.me.playing=!1,3e3)),e===N.Reset&&(Object.values(this.players).forEach(t=>t.streak=0),this.game.gameModeId!==d.FFA&&(this.game.teamScore=[0,0,0]),this.game.gameModeId===d.Spatula&&(this.game.spatula.controlledBy=0,this.game.spatula.controlledByTeam=0,this.game.spatula.coords={x:0,y:0,z:0}),this.game.gameModeId===d.KOTC&&(this.game.stage=G.Capturing,this.game.zoneNumber=0,this.game.activeZone=null,this.game.capturing=0,this.game.captureProgress=0,this.game.numCapturing=0,this.game.capturePercent=0),this.emit("gameReset"))}#E(){if(!this.intents.includes(this.Intents.PING))return;const e=this.ping;this.ping=Date.now()-this.lastPingTime,this.emit("pingUpdate",e,this.ping),setTimeout(()=>{const t=new y;t.packInt8(c.ping),t.send(this.game.socket),this.lastPingTime=Date.now()},1e3)}#T(){const e=s.unPackInt8U(),t=s.unPackInt8U(),a=this.players[e];if(!a)return;const i=a.team;a.team=t,a.streak=0,this.emit("playerSwitchTeam",a,i,t)}#x(){const e=s.unPackInt8U(),t=s.unPackInt8U(),a=s.unPackInt16U(),i=s.unPackInt16U(),o=s.unPackInt8U(),n=s.unPackInt16U(),r=s.unPackInt16U(),h=s.unPackInt16U(),g=s.unPackInt16U(),f=s.unPackInt8(),l=s.unPackInt8(),I=this.intents.includes(this.Intents.COSMETIC_DATA),v=I?p(a):a,b=I?p(i):i,w=I?p(n):n,C=I?p(r):r,U=I?p(h):h,W=I?p(g):g,m=this.players[e];if(m){const O={...m.character},F=m.selectedGun;m.character.eggColor=o,m.character.primaryGun=v,m.character.secondaryGun=b,m.character.stamp=C,m.character.hat=w,m.character.grenade=U,m.character.melee=W,m.character.stampPos.x=f,m.character.stampPos.y=l,m.selectedGun=t,m.weapons[0]=new J[t],F!==m.selectedGun&&this.emit("playerChangeGun",m,F,m.selectedGun),O!==m.character&&this.emit("playerChangeCharacter",m,O,m.character)}}#O(){const e=s.unPackInt32U(),t=this.account.eggBalance;this.account.eggBalance=e,this.emit("balanceUpdate",t,e)}#F(){this.me.playing=!1,this.emit("respawnDenied")}#R(){const e=s.unPackInt8U(),t=this.players[e];t&&this.emit("playerMelee",t)}#G(){const e=s.unPackInt8U(),t=this.players[e];if(!t)return;const a=t.weapons[t.activeGun];if(a.ammo){const i=Math.min(Math.min(a.ammo.capacity,a.ammo.reload)-a.ammo.rounds,a.ammo.store);a.ammo.rounds+=i,a.ammo.store-=i}this.emit("playerReload",t,a)}updateGameOptions(){const e=new y;e.packInt8(c.gameOptions),e.packInt8(this.game.options.gravity*4),e.packInt8(this.game.options.damage*4),e.packInt8(this.game.options.healthRegen*4);const t=(this.game.options.locked?1:0)|(this.game.options.noTeamChange?2:0)|(this.game.options.noTeamShuffle?4:0);e.packInt8(t),this.game.options.weaponsDisabled.forEach(a=>{e.packInt8(a?1:0)}),e.send(this.game.socket)}#N(){this.game.isPrivate=!0,this.updateGameOptions()}#A(){const e=s.unPackInt8U();let t=s.unPackInt16U();const a=s.unPackFloat(),i=s.unPackFloat(),o=s.unPackFloat(),n=s.unPackInt8U(),r=s.unPackFloat();this.intents.includes(this.Intents.COSMETIC_DATA)&&(t=p(t)),e===Q.Grenade?this.emit("grenadeExplode",t,{x:a,y:i,z:o},n,r):this.emit("rocketHit",{x:a,y:i,z:o},n,r)}#M(){const e=s.unPackInt8U(),t=s.unPackFloat(),a=s.unPackFloat(),i=s.unPackFloat(),o=s.unPackFloat(),n=s.unPackFloat(),r=s.unPackFloat(),h=this.players[e];h&&(h.grenades--,this.emit("playerThrowGrenade",h,{x:t,y:a,z:i},{x:o,y:n,z:r}))}#L(){const e=s.unPackInt8U(),t=s.unPackInt8U(),a=this.players[e];if(!a)return;if(!this.intents.includes(this.Intents.CHALLENGES))return this.emit("challengeComplete",a,t);const i=this.account.challenges.find(o=>o.id===t);this.emit("challengeComplete",a,i),a.id===this.me.id&&this.refreshChallenges()}#B(){const e=new y;e.packInt8(this.intents.includes(this.Intents.OBSERVE_GAME)?c.observeGame:c.joinGame),e.packString(this.game.raw.uuid),e.packInt8(+this.intents.includes(this.Intents.VIP_HIDE_BADGE)),e.packInt8(this.state.weaponIdx||this.account?.loadout?.classIdx||0),e.packString(this.state.name),e.packInt32(this.account.session),e.packString(this.account.sessionId),e.packString(this.account.firebaseId),e.send(this.game.socket)}async#D(){if(this.me.id=s.unPackInt8U(),this.me.team=s.unPackInt8U(),this.game.gameModeId=s.unPackInt8U(),this.game.gameMode=K[this.game.gameModeId],this.game.mapIdx=s.unPackInt8U(),this.game.map=B[this.game.mapIdx],this.game.playerLimit=s.unPackInt8U(),this.game.isGameOwner=s.unPackInt8U()===1,this.game.isPrivate=s.unPackInt8U()===1||this.game.isGameOwner,s.unPackInt8U(),this.intents.includes(this.Intents.LOAD_MAP)||this.intents.includes(this.Intents.PATHFINDING)){if(this.game.map.raw=await at(this.game.map.filename,this.game.map.hash),this.emit("mapLoad",this.game.map.raw),this.game.gameModeId===d.KOTC){const t=this.game.map.raw.data["DYNAMIC.capture-zone.none"];t?(this.game.map.zones=it(t),this.game.activeZone||(this.game.activeZone=this.game.map.zones[this.game.zoneNumber-1])):delete this.game.map.zones}this.intents.includes(this.Intents.PATHFINDING)&&(this.pathing.nodeList=new et(this.game.map.raw))}this.state.inGame=!0,this.lastDeathTime=Date.now();const e=new y;if(e.packInt8(c.clientReady),e.send(this.game.socket),this.updateIntervalId=setInterval(()=>this.update(),100/3),this.intents.includes(this.Intents.PING)){this.lastPingTime=Date.now();const t=new y;t.packInt8(c.ping),t.send(this.game.socket)}this.intents.includes(this.Intents.NO_AFK_KICK)&&(this.afkKickInterval=setInterval(()=>{if(this.state.inGame&&!this.me.playing&&Date.now()-this.lastDeathTime>=15e3){const t=new y;t.packInt8(c.keepAlive),t.send(this.game.socket)}},15e3)),this.emit("gameReady")}#K(){const e=s.unPackInt8U(),t=s.unPackString(128),a=s.unPackString(32),i=this.players[e];i&&(i.admin={ip:a,dbId:t},this.emit("playerInfo",i,a,t))}processPacket(e){s.init(e),this.intents.includes(this.Intents.PACKET_HOOK)&&this.emit("packet",e);let t=0,a=0,i=!1;for(;s.isMoreDataAvailable()&&!i;){const o=s.unPackInt8U();switch(o){case c.syncThem:this.#l();break;case c.fire:this.#p();break;case c.hitThem:this.#I();break;case c.syncMe:this.#P();break;case c.hitMe:this.#f();break;case c.swapWeapon:this.#u();break;case c.collectItem:this.#k();break;case c.respawn:this.#h();break;case c.die:this.#d();break;case c.pause:this.#m();break;case c.chat:this.#c();break;case c.addPlayer:this.#r();break;case c.removePlayer:this.#w();break;case c.eventModifier:this.#y();break;case c.metaGameState:this.#b();break;case c.beginShellStreak:this.#U();break;case c.endShellStreak:this.#S();break;case c.hitMeHardBoiled:this.#v();break;case c.gameOptions:this.#C();break;case c.ping:this.#E();break;case c.switchTeam:this.#T();break;case c.changeCharacter:this.#x();break;case c.reload:this.#G();break;case c.explode:this.#A();break;case c.throwGrenade:this.#M();break;case c.spawnItem:this.#g();break;case c.melee:this.#R();break;case c.updateBalance:this.#O();break;case c.challengeCompleted:this.#L();break;case c.socketReady:this.#B();break;case c.gameJoined:this.#D();break;case c.gameAction:this.#_();break;case c.requestGameOptions:this.#N();break;case c.respawnDenied:this.#F();break;case c.playerInfo:this.#K();break;case c.expireUpgrade:case c.clientReady:break;case c.musicInfo:s.unPackLongString();break;default:console.error(`processPacket: I got but couldn't identify a: ${Object.keys(c).find(n=>c[n]===o)} ${o}`),t&&console.error(`processPacket: It may be a result of the ${t} command (${a}).`),i=!0;break}t=Object.keys(c).find(n=>c[n]===o),a=o,this.intents.includes(this.Intents.LOG_PACKETS)&&console.log(`[LOG_PACKETS] Packet ${t}: ${a}`)}}async checkChiknWinner(){const e=await this.api.queryServices({cmd:"chicknWinnerReady",id:this.account.id,sessionId:this.account.sessionId});return typeof e=="string"?e:(this.account.cw.limit=e.limit,this.account.cw.atLimit=e.limit>=4,this.account.cw.secondsUntilPlay=(this.account.cw.atLimit?e.period:e.span)||0,this.account.cw.canPlayAgain=Date.now()+this.account.cw.secondsUntilPlay*1e3,this.account.cw)}async playChiknWinner(e=!0){if(this.account.cw.atLimit||this.account.cw.limit>V)return"hit_daily_limit";if(this.account.cw.canPlayAgain>Date.now()&&e)return"on_cooldown";const t=await this.api.queryServices({cmd:"incentivizedVideoReward",firebaseId:this.account.firebaseId,id:this.account.id,sessionId:this.account.sessionId,token:null});return typeof t=="string"?t:t.error?t.error==="RATELIMITED"||t.error==="RATELMITED"?(await this.checkChiknWinner(),"on_cooldown"):t.error==="SESSION_EXPIRED"?(this.emit("sessionExpired"),"session_expired"):(console.error("Unknown Chikn Winner response, report this on Github:",t),"unknown_error"):t.reward?(this.account.eggBalance+=t.reward.eggsGiven,t.reward.itemIds.forEach(a=>this.account.ownedItemIds.push(a)),await this.checkChiknWinner(),t.reward):(console.error("Unknown Chikn Winner response, report this on Github:",t),"unknown_error")}async resetChiknWinner(){if(this.account.eggBalance<200)return"not_enough_eggs";if(!this.account.cw.atLimit)return"not_at_limit";const e=await this.api.queryServices({cmd:"chwReset",sessionId:this.account.sessionId});return typeof e=="string"?e:e.result!=="SUCCESS"?(console.error("Unknown Chikn Winner reset response, report this on Github:",e),"unknown_error"):(this.account.eggBalance-=200,await this.checkChiknWinner(),this.account.cw)}canSee(e){return this.intents.includes(this.Intents.PATHFINDING)?this.pathing.nodeList.hasLineOfSight(this.me.position,e.position):this.processError("You must have the PATHFINDING intent to use this method.")}async refreshChallenges(){const e=await this.api.queryServices({cmd:"challengeGetDaily",sessionId:this.account.sessionId,playerId:this.account.id});return typeof e=="string"?e:(this.#a(e),this.account.challenges)}async rerollChallenge(e){const t=await this.api.queryServices({cmd:"challengeRerollSlot",sessionId:this.account.sessionId,slotId:e});return typeof t=="string"?t:(this.#a(t),this.account.challenges)}async claimChallenge(e){const t=await this.api.queryServices({cmd:"challengeClaimReward",sessionId:this.account.sessionId,slotId:e});return typeof t=="string"?t:(this.#a(t.challenges),t.reward>0&&(this.account.eggBalance+=t.reward),{eggReward:t.reward,updatedChallenges:this.account.challenges})}async refreshBalance(){const e=await this.api.queryServices({cmd:"checkBalance",firebaseId:this.account.firebaseId,sessionId:this.account.sessionId});return typeof e=="string"?e:(this.account.eggBalance=e.currentBalance,e.currentBalance)}async redeemCode(e){const t=await this.api.queryServices({cmd:"redeem",firebaseId:this.account.firebaseId,sessionId:this.account.sessionId,id:this.account.id,code:e});return typeof t=="string"?t:t.result==="SUCCESS"?(this.account.eggBalance=t.eggs_given,t.item_ids.forEach(a=>this.account.ownedItemIds.push(a)),{result:t,eggsGiven:t.eggs_given,itemIds:t.item_ids}):t}async claimURLReward(e){const t=await this.api.queryServices({cmd:"urlRewardParams",firebaseId:this.account.firebaseId,sessionId:this.account.sessionId,reward:e});return typeof t=="string"||t.result==="SUCCESS"&&(this.account.eggBalance+=t.eggsGiven,t.itemIds.forEach(a=>this.account.ownedItemIds.push(a))),t}async claimSocialReward(e){const t=await this.api.queryServices({cmd:"reward",firebaseId:this.account.firebaseId,sessionId:this.account.sessionId,rewardTag:e});return typeof t=="string"||t.result==="SUCCESS"&&(this.account.eggBalance+=t.eggsGiven,t.itemIds.forEach(a=>this.account.ownedItemIds.push(a))),t}async buyItem(e){const t=await this.api.queryServices({cmd:"buy",firebaseId:this.account.firebaseId,sessionId:this.account.sessionId,itemId:e,save:!0});return typeof t=="string"||t.result==="SUCCESS"&&(this.account.eggBalance=t.currentBalance,this.account.ownedItemIds.push(t.itemId)),t}processError(e){this.#t.error&&this.#t.error.length?this.emit("error",e):(console.error(e),this.intents.includes(this.Intents.NO_EXIT_ON_ERROR)||process.exit(1))}leave(e=$.mainMenu){this.hasQuit||(e>-1&&(this.game?.socket?.close(e),this.state.left=!0,this.emit("leave",e)),clearInterval(this.updateIntervalId),this.#s=[],this.state.inGame=!1,this.state.chatLines=0,this.state.reloading=!1,this.state.swappingGun=!1,this.state.usingMelee=!1,this.state.stateIdx=0,this.state.serverStateIdx=0,this.state.shotsFired=0,this.state.buffer=[],this.players={},this.me=new E({}),this.game=this.#n,this.ping=0,this.lastPingTime=-1,this.lastDeathTime=-1,this.lastUpdateTick=0,this.pathing={nodeList:null,followingPath:!1,activePath:null,activeNode:null,activeNodeIdx:0})}logout(){this.account=this.#e,this.intents.includes(this.Intents.RENEW_SESSION)&&clearInterval(this.renewSessionInterval)}quit(e=!1){this.hasQuit||(this.leave(),this.matchmaker&&(this.matchmaker.close(),e||delete this.matchmaker),e||(delete this.account,delete this.api,delete this.game,delete this.me,delete this.pathing,delete this.players,delete this.state,this.#e={},this.#n={},this.#t={},this.#i=[],this.#s=[]),this.intents.includes(this.Intents.NO_AFK_KICK)&&clearInterval(this.afkKickInterval),this.intents.includes(this.Intents.RENEW_SESSION)&&clearInterval(this.renewSessionInterval),this.hasQuit=!0)}}var Ct=ot;export{ot as Bot,Ct as default};
1
+ import y from"./api.js";import J from"./comm/CommIn.js";import R from"./comm/CommOut.js";import d from"./constants/CloseCode.js";import $ from"./constants/CommCode.js";import T from"./bot/GamePlayer.js";import s from"./matchmaker.js";import n from"./socket.js";import{ChiknWinnerDailyLimit as t,CollectType as C,CoopState as k,findItemById as V,FramesBetweenSyncs as z,GameAction as x,GameMode as O,GameOptionFlag as o,GunList as p,ItemType as r,Movement as B,PlayType as v,ShellStreak as K,StateBufferSize as b}from"./constants/index.js";import h from"./dispatches/LookAtPosDispatch.js";import D from"./dispatches/MovementDispatch.js";import l from"./env/globals.js";import{NodeList as a}from"./pathing/mapnode.js";import{coords as e}from"./wasm/direct.js";import{fetchMap as jj,initKotcZones as Ej}from"./util.js";import{Challenges as Jj}from"./constants/challenges.js";import{Maps as I}from"./constants/maps.js";import{Regions as u}from"./constants/regions.js";const c=Object.fromEntries(Object.entries(O).map(([E,j])=>[j,E])),m=Object.fromEntries(Object.entries(o).map(([E,j])=>[E[0].toLowerCase()+E.slice(1),j])),g={CHALLENGES:1,BOT_STATS:2,PATHFINDING:3,PING:5,COSMETIC_DATA:6,PLAYER_HEALTH:7,PACKET_HOOK:8,LOG_PACKETS:10,NO_LOGIN:11,DEBUG_BUFFER:12,NO_AFK_KICK:16,LOAD_MAP:17,OBSERVE_GAME:18,NO_REGION_CHECK:19,NO_EXIT_ON_ERROR:20,RENEW_SESSION:21,VIP_HIDE_BADGE:22},f=(E,j)=>(E%j+j)%j;export class Bot{static Intents=g;Intents=g;#J=[];#j={};#Q=[];#E;#U;constructor(E={}){if(E.proxy&&l.isBrowser)this.processError("proxies do not work and hence are not supported in the browser");this.intents=E.intents||[];if(this.intents.includes(this.Intents.COSMETIC_DATA)){if(!V(1001))this.processError("you cannot use the COSMETIC_DATA intent inside of the singlefile browser bundles")}this.instance=E.instance||"shellshock.io";this.protocol=E.protocol||"wss";this.proxy=E.proxy||"";this.connectionTimeout=E.connectionTimeout||5000;this.state={name:"yolkbot",weaponIdx:0,inGame:!1,chatLines:0,yaw:0,pitch:0,controlKeys:0,reloading:!1,swappingGun:!1,usingMelee:!1,stateIdx:0,serverStateIdx:0,shotsFired:0,buffer:[],left:!1};this.players={};this.me=new T({});this.game={raw:{},code:"",socket:null,gameModeId:0,gameMode:c[0],mapIdx:0,map:{filename:"",hash:"",name:"",modes:{FFA:!1,Teams:!1,Spatula:!1,King:!1},availability:"both",numPlayers:"18",raw:{},nodes:{},zones:[]},playerLimit:0,isGameOwner:!1,isPrivate:!0,options:{gravity:1,damage:1,healthRegen:1,locked:!1,noTeamChange:!1,noTeamShuffle:!1,weaponsDisabled:Array(7).fill(!1),mustUseSecondary:!1},collectables:[[],[]],teamScore:[0,0,0],spatula:{coords:{x:0,y:0,z:0},controlledBy:0,controlledByTeam:0},stage:k.Capturing,zoneNumber:0,activeZone:[],capturing:0,captureProgress:0,numCapturing:0,capturePercent:0};this.#U=this.game;this.account={id:0,firebase:{idToken:"",refreshToken:"",expiresIn:"3600",localId:""},firebaseId:"",sessionId:"",session:0,email:"",password:"",cw:{atLimit:!1,limit:0,secondsUntilPlay:0,canPlayAgain:Date.now()},loadout:{hatId:null,meleeId:0,stampId:null,classIdx:0,colorIdx:0,grenadeId:0,primaryId:[3100,3600,3400,3800,4000,4200,4500],secondaryId:Array(7).fill(3000),stampPositionX:0,stampPositionY:0},ownedItemIds:[],vip:!1,emailVerified:!1,isAged:!1,eggBalance:0,adminRoles:0,rawLoginData:{},isDoubleEggWeeknd:()=>{const j=new Date().getUTCDay(),M=new Date().getUTCHours();return j>=5&&M>=20||j===6||j===0}};this.#E=this.account;this.matchmaker=null;this.api=new y({proxy:this.proxy,protocol:this.protocol,instance:this.instance,maxRetries:E?.apiMaxRetries,connectionTimeout:this.connectionTimeout});this.ping=0;this.lastPingTime=-1;this.lastDeathTime=-1;this.lastUpdateTick=0;this.pathing={nodeList:null,followingPath:!1,activePath:null,activeNode:null,activeNodeIdx:0};this.hasQuit=!1;if(this.intents.includes(this.Intents.NO_AFK_KICK))this.afkKickInterval=0;if(this.intents.includes(this.Intents.RENEW_SESSION))this.renewSessionInterval=0}dispatch(E){if(E.validate(this)){if(E.check(this))E.execute(this);else this.#J.push(E);return!0}return!1}async createAccount(E,j){this.account=this.#E;this.account.email=E;this.account.password=j;const M=await this.api.createAccount(E,j);return this.processLoginData(M)}async login(E,j){this.account=this.#E;this.account.email=E;this.account.password=j;const M=await this.api.loginWithCredentials(E,j);return this.processLoginData(M)}async loginWithRefreshToken(E){this.account=this.#E;const j=await this.api.loginWithRefreshToken(E);return this.processLoginData(j)}async loginAnonymously(){this.account=this.#E;const E=await this.api.loginAnonymously();return this.processLoginData(E)}processLoginData(E){if(typeof E!=="object"){this.emit("authFail",E);return E}if(E.banRemaining){this.emit("banned",E.banRemaining);return"account_banned"}if(!E.playerOutput){this.emit("authFail",E);return E}this.account.firebase=E.firebase||{};E=E.playerOutput;this.account.rawLoginData=E;this.account.adminRoles=E.adminRoles||0;this.account.eggBalance=E.currentBalance;this.account.emailVerified=E.emailVerified;this.account.firebaseId=E.firebaseId;this.account.id=E.id;this.account.isAged=new Date(E.dateCreated).getTime()<1714546800000;this.account.loadout=E.loadout;this.account.ownedItemIds=E.ownedItemIds;this.account.session=E.session;this.account.sessionId=E.sessionId;this.account.vip=E.active_sub==="IsVIP";if(this.intents.includes(this.Intents.BOT_STATS))this.account.stats={lifetime:E.statsLifetime,monthly:E.statsCurrent};if(this.intents.includes(this.Intents.CHALLENGES))this.#M(E.challenges);this.emit("authSuccess",this.account);if(this.intents.includes(this.Intents.RENEW_SESSION))this.renewSessionInterval=setInterval(async()=>{if(!this.account?.sessionId)return clearInterval(this.renewSessionInterval);if((await this.api.queryServices({cmd:"renewSession",sessionId:this.account.sessionId})).data!=="renewed")this.emit("sessionExpired")},600000);return this.account}#M(E){this.account.challenges=[];for(const j of E){const M=Jj.find((Q)=>Q.id===j.challengeId);if(!M)continue;delete j.playerId;this.account.challenges.push({raw:{challengeInfo:M,challengeData:j},id:j.challengeId,name:M.loc.title,desc:M.loc.desc,rewardEggs:M.reward,isRerolled:!!j.reset,isClaimed:!!j.claimed,isCompleted:!!j.completed,progressNum:j.progress,goalNum:M.goal})}}async initMatchmaker(){if(!this.account.sessionId&&!this.intents.includes(this.Intents.NO_LOGIN)){const E=await this.loginAnonymously();if(typeof E!=="object")return E}if(!this.matchmaker){this.matchmaker=new s({api:this.api,proxy:this.proxy,protocol:this.protocol,instance:this.instance,sessionId:this.account.sessionId,connectionTimeout:this.connectionTimeout,noLogin:this.intents.includes(this.Intents.NO_LOGIN)});if(!await this.matchmaker.ws.tryConnect())return"matchmaker_tryconnect_failed";this.matchmaker.on("authFail",(j)=>this.emit("authFail",j));this.matchmaker.on("error",(j)=>this.processError(j))}return!0}async findPublicGame(E,j){if(typeof E!=="string")return"no_region_passed";if(!u.find((Q)=>Q.id===E)&&!this.intents.includes(this.Intents.NO_REGION_CHECK))return"invalid_region_passed";if(typeof j!=="number")return"no_mode_passed";if(Object.values(O).indexOf(j)===-1)return"invalid_mode_passed";if(!await this.initMatchmaker())return"matchmaker_init_fail";return await new Promise((Q)=>{const _=(U)=>{if(U.command==="notice")return;this.matchmaker.off("msg",_);if(U.command==="gameFound")return Q(U);if(U.error==="sessionNotFound")return Q("internal_session_error");this.processError("unknown matchmaker response",JSON.stringify(U))};this.matchmaker.on("msg",_);this.matchmaker.send({command:"findGame",region:E,playType:v.JoinPublic,gameType:j,sessionId:this.account.sessionId})})}async createPrivateGame(E,j,M){if(typeof E!=="string")return"no_region_passed";if(!u.find((U)=>U.id===E)&&!this.intents.includes(this.Intents.NO_REGION_CHECK))return"invalid_region_passed";if(typeof j!=="number")return"no_mode_passed";if(Object.values(O).indexOf(j)===-1)return"invalid_mode_passed";if(typeof M!=="string")return"no_map_passed";const Q=I.findIndex((U)=>U.name.toLowerCase()===M.toLowerCase());if(Q===-1)return"invalid_map_passed";if(!await this.initMatchmaker())return"matchmaker_init_fail";return await new Promise((U)=>{const q=(L)=>{if(L.command==="notice")return;this.matchmaker.off("msg",q);if(L.command==="gameFound")return U(L);if(L.error==="sessionNotFound")return U("internal_session_error");this.processError("unknown matchmaker response",JSON.stringify(L))};this.matchmaker.on("msg",q);this.matchmaker.send({command:"findGame",region:E,playType:v.CreatePrivate,gameType:j,sessionId:this.account.sessionId,noobLobby:!1,map:Q})})}async join(E,j){this.state.name=E||"yolkbot";if(typeof j==="string"){if(j.includes("#"))j=j.split("#")[1];if(!await this.initMatchmaker())return"matchmaker_init_fail";if(await new Promise((U)=>{const q=(L)=>{if(L.command==="gameFound"){this.matchmaker.off("msg",q);this.game.raw=L;this.game.code=L.id;U(L.id)}if(L.error&&L.error==="gameNotFound"){this.processError(`game "${j}" not found, it may have expired.`);this.leave();return"gameNotFound"}};this.matchmaker.on("msg",q);this.matchmaker.send({command:"joinGame",id:j,observe:!1,sessionId:this.account.sessionId})})==="gameNotFound")return"game_not_found";if(!this.game.raw.id)return this.processError("an internal error occured while joining the game, please report this to developers")}if(typeof j==="object"){if(this.account.id===0)await this.loginAnonymously();this.game.raw=j;this.game.code=this.game.raw.id;if(!this.game.raw.id)return"invalid_game_object";if(!this.game.raw.subdomain)return"invalid_game_object";if(!this.game.raw.uuid)return"invalid_game_object"}const M=this.game.raw.host||(this.instance.startsWith("localhost:")?this.instance:`${this.game.raw.subdomain}.${this.instance}`);this.game.socket=new n(`${this.protocol}://${M}/game/${this.game.raw.id}`,this.proxy);this.game.socket.binaryType="arraybuffer";this.game.socket.connectionTimeout=this.connectionTimeout;this.game.socket.onBeforeConnect=()=>{this.game.socket.onmessage=(_)=>this.processPacket(_.data);this.game.socket.onclose=(_)=>{if(this.state.left)this.state.left=!1;else{this.emit("close",_.code);this.leave(-1)}}};if(!await this.game.socket.tryConnect())return"websocket_tryconnect_fail";return!0}#_(){if(Object.entries(this.me.position).map((j)=>Math.floor(j[1])).join(",")===this.pathing.activePath[this.pathing.activePath.length-1].positionStr){this.pathing.followingPath=!1;this.pathing.activePath=null;this.pathing.activeNode=null;this.pathing.activeNodeIdx=0;this.dispatch(new D(0))}else{let j;if(this.pathing.activeNodeIdx<this.pathing.activePath.length-1){j=this.pathing.activePath[this.pathing.activeNodeIdx+1].flatCenter();this.dispatch(new h(j))}else{j=this.pathing.activePath[this.pathing.activeNodeIdx].flatCenter();this.dispatch(new h(j))}for(const M of this.pathing.activePath)if(M.flatRadialDistance(this.me.position)<0.1&&M.position.y===Math.floor(this.me.position.y)){if(this.pathing.activePath.indexOf(M)>=this.pathing.activeNodeIdx){this.pathing.activeNodeIdx=this.pathing.activePath.indexOf(M)+1;this.pathing.activeNode=this.pathing.activePath[this.pathing.activeNodeIdx];break}}if(!(this.state.controlKeys&B.Forward))this.dispatch(new D(B.Forward))}}update(){if(this.hasQuit)return;if(this.pathing.followingPath&&this.intents.includes(this.Intents.PATHFINDING))this.#_();for(let j=0;j<this.#J.length;j++){const M=this.#J[j];if(M.check(this)){M.execute(this);this.#J.splice(j,1)}}this.state.chatLines=Math.max(0,this.state.chatLines-0.008333333333333333);if(this.me.playing){const j=this.state.stateIdx;if(this.intents.includes(this.Intents.DEBUG_BUFFER)){console.log("setting buffer for idx",j);console.log("checking...shotsFired",this.state.shotsFired)}this.me.jumping=!!(this.state.controlKeys&B.Jump);this.state.buffer[j]={controlKeys:this.state.controlKeys,yaw:this.state.yaw,pitch:this.state.pitch,shotsFired:this.state.shotsFired};this.state.shotsFired=0;if(this.lastUpdateTick>=2){this.emit("tick");const M=new R;M.packInt8($.syncMe);M.packInt8(this.state.stateIdx);M.packInt8(this.state.serverStateIdx);const Q=f(this.state.stateIdx-z+1,b);for(let _=0;_<z;_++){const U=f(Q+_,b),q=this.state.buffer[U]||{},L=q.controlKeys||0,N=q.shotsFired||0,H=q.yaw??this.state.yaw,S=q.pitch??this.state.pitch;if(this.intents.includes(this.Intents.DEBUG_BUFFER))console.log("going with",this.state.stateIdx,Q,U,q);M.packInt8(L);M.packInt8(N);M.packString(e(H,S));M.packInt8(100)}M.send(this.game.socket);this.state.buffer=[];this.lastUpdateTick=0}else this.lastUpdateTick++;this.state.stateIdx=f(this.state.stateIdx+1,b)}if(!this.intents.includes(this.Intents.PLAYER_HEALTH))return;const E=0.1*(this.game.isPrivate?this.game.options.healthRegen:1);for(const j of Object.values(this.players)){if(j.playing&&j.hp>0){const M=j.streakRewards.includes(K.OverHeal);j.hp+=M?-E:E;j.hp=M?Math.max(100,j.hp):Math.min(100,j.hp)}if(j.spawnShield>0)j.spawnShield-=6}}on(E,j){if(Object.keys(this.#j).includes(E))this.#j[E].push(j);else this.#j[E]=[j]}once(E,j){const M=(...Q)=>{j(...Q);this.off(E,M)};this.on(E,M)}onAny(E){this.#Q.push(E)}off(E,j){if(j)this.#j[E]=this.#j[E].filter((M)=>M!==j);else this.#j[E]=[]}emit(E,...j){if(this.hasQuit)return;if(this.#j[E])for(const M of this.#j[E])M(...j);for(const M of this.#Q)M(E,...j)}#$(){const E=J.unPackInt8U(),j=J.unPackInt8U(),M=J.unPackString().valueOf(),Q=this.players[E];this.emit("chat",Q,M,j)}#q(){const E=J.unPackInt8U(),j=this.intents.includes(this.Intents.COSMETIC_DATA),M={id:E,uniqueId:J.unPackString(),name:J.unPackString(),safeName:J.unPackString(),charClass:J.unPackInt8U(),team:J.unPackInt8U(),primaryWeaponItem:j?V(J.unPackInt16U()):J.unPackInt16U(),secondaryWeaponItem:j?V(J.unPackInt16U()):J.unPackInt16U(),shellColor:J.unPackInt8U(),hatItem:j?V(J.unPackInt16U()):J.unPackInt16U(),stampItem:j?V(J.unPackInt16U()):J.unPackInt16U(),stampPosX:J.unPackInt8(),stampPosY:J.unPackInt8(),grenadeItem:j?V(J.unPackInt16U()):J.unPackInt16U(),meleeItem:j?V(J.unPackInt16U()):J.unPackInt16U(),x:J.unPackFloat(),y:J.unPackFloat(),z:J.unPackFloat(),$dx:J.unPackFloat(),$dy:J.unPackFloat(),$dz:J.unPackFloat(),yaw:J.unPackRadU(),pitch:J.unPackRad(),score:J.unPackInt32U(),$kills:J.unPackInt16U(),$deaths:J.unPackInt16U(),$streak:J.unPackInt16U(),totalKills:J.unPackInt32U(),totalDeaths:J.unPackInt32U(),bestStreak:J.unPackInt16U(),$bestOverallStreak:J.unPackInt16U(),shield:J.unPackInt8U(),hp:J.unPackInt8U(),playing:J.unPackInt8U(),weaponIdx:J.unPackInt8U(),$controlKeys:J.unPackInt8U(),upgradeProductId:J.unPackInt8U(),activeShellStreaks:J.unPackInt8U(),social:J.unPackLongString(),hideBadge:J.unPackInt8U()};this.game.mapIdx=J.unPackInt8U();this.game.isPrivate=J.unPackInt8U()===1;this.game.gameModeId=J.unPackInt8U();const Q=new T(M,this.game.gameMode===O.KOTC?this.game.activeZone:null);if(!this.players[M.id])this.players[M.id]=Q;this.emit("playerJoin",Q);if(this.me.id===M.id){this.me=Q;this.emit("botJoin",this.me)}}#L(){const E=J.unPackInt8U(),j=J.unPackInt16U(),M=J.unPackFloat(),Q=J.unPackFloat(),_=J.unPackFloat(),U=J.unPackInt8U(),q=J.unPackInt8U(),L=J.unPackInt8U(),N=J.unPackInt8U(),H=J.unPackInt8U(),S=this.players[E];if(S){S.playing=!0;S.randomSeed=j;if(S.weapons[0]&&S.weapons[0].ammo)S.weapons[0].ammo.rounds=U;if(S.weapons[0]&&S.weapons[0].ammo)S.weapons[0].ammo.store=q;if(S.weapons[1]&&S.weapons[1].ammo)S.weapons[1].ammo.rounds=L;if(S.weapons[1]&&S.weapons[1].ammo)S.weapons[1].ammo.store=N;S.grenades=H;S.position={x:M,y:Q,z:_};S.spawnShield=120;this.emit("playerRespawn",S)}}#S(){const E=J.unPackInt8U(),j=J.unPackFloat(),M=J.unPackFloat(),Q=J.unPackFloat(),_=J.unPackInt8U(),U=this.players[E];if(!U||U.id===this.me.id){for(let X=0;X<z;X++){J.unPackInt8U();J.unPackRadU();J.unPackRad();J.unPackInt8U()}return}for(let X=0;X<z;X++){const P=J.unPackInt8U();if(P&B.Jump)U.jumping=!0;else U.jumping=!1;if(P&B.Scope)U.scoping=!0;else U.scoping=!1;const Z={...U.view};U.view.yaw=J.unPackRadU();U.view.pitch=J.unPackRad();if(U.view.yaw!==Z.yaw||U.view.pitch!==Z.pitch)this.emit("playerRotate",U,Z,U.view);U.scale=J.unPackInt8U()}const q=U.position,L=q.x!==j||q.y!==M||q.z!==Q,N=U.climbing!==_,H=L||N,S=H?{...q}:null;if(q.x!==j)q.x=j;if(q.z!==Q)q.z=Q;if(!U.jumping||Math.abs(q.y-M)>0.5)q.y=M;if(N)U.climbing=_;if(!H)return;this.emit("playerMove",U,S,q);if(this.game.gameModeId!==O.KOTC)return;const F=this.game.activeZone,A=!!U.inKotcZone;if(!F&&A){U.inKotcZone=!1;this.emit("playerLeaveZone",U);return}U.updateKotcZone(F);const Y=!!U.inKotcZone;if(A!==Y){U.inKotcZone=Y;this.emit(Y?"playerEnterZone":"playerLeaveZone",U)}}#G(){const E=J.unPackInt8U(),j=this.players[E];if(j){j.playing=!1;if(j.streakRewards)j.streakRewards=[];this.emit("playerPause",j);if(j.inKotcZone){j.inKotcZone=!1;this.emit("playerLeaveZone",j)}}}#K(){const E=J.unPackInt8U(),j=J.unPackInt8U(),M=this.players[E];if(M){M.activeGun=j;this.emit("playerSwapWeapon",M,j)}}#O(){const E=J.unPackInt8U(),j=J.unPackInt8U();J.unPackInt8U();J.unPackInt8U();const M=J.unPackInt8U(),Q=this.players[E],_=this.players[j],U=Q?{...Q}:null;if(Q){if(Q.id===this.me.id)this.lastDeathTime=Date.now();Q.playing=!1;Q.streak=0;Q.hp=100;Q.spawnShield=0;Q.stats.totalDeaths++;Q.inKotcZone=!1;this.emit("playerLeaveZone",Q)}if(_){_.streak++;_.stats.totalKills++;if(_.streak>_.stats.bestStreak)_.stats.bestStreak=_.streak}this.emit("playerDeath",Q,_,U,M)}#V(){const E=J.unPackInt8U(),j={posX:J.unPackFloat(),posY:J.unPackFloat(),posZ:J.unPackFloat(),dirX:J.unPackFloat(),dirY:J.unPackFloat(),dirZ:J.unPackFloat()},M=this.players[E];if(!M)return;const Q=M.weapons[M.activeGun];if(Q&&Q.ammo){Q.ammo.rounds--;this.emit("playerFire",M,Q,j)}}#N(){const E=J.unPackInt16U(),j=J.unPackInt8U(),M=J.unPackFloat(),Q=J.unPackFloat(),_=J.unPackFloat();this.game.collectables[j].push({id:E,x:M,y:Q,z:_});this.emit("spawnItem",j,{x:M,y:Q,z:_},E)}#F(){const E=J.unPackInt8U(),j=J.unPackInt8U(),M=J.unPackInt8U(),Q=J.unPackInt16U(),_=this.players[E];if(!_)return;this.game.collectables[j]=this.game.collectables[j].filter((U)=>U.id!==Q);if(j===C.Ammo){const U=_.weapons[M];if(U&&U.ammo){U.ammo.store=Math.min(U.ammo.storeMax,U.ammo.store+U.ammo.pickup);this.emit("playerCollectAmmo",_,U,Q)}}if(j===C.Grenade){_.grenades++;if(_.grenades>3)_.grenades=3;this.emit("playerCollectGrenade",_,Q)}}#H(){const E=J.unPackInt8U(),j=J.unPackInt8U(),M=this.players[E];if(!M)return;const Q=M.hp;M.hp=j;this.emit("playerDamage",M,Q,M.hp)}#R(){const E=J.unPackInt8U();J.unPackFloat();J.unPackFloat();const j=this.me.hp;this.me.hp=E;this.emit("playerDamage",this.me,j,this.me.hp)}#X(){const E=J.unPackInt8U(),j=this.players[E];J.unPackInt8U();const M=J.unPackInt8U(),Q=J.unPackFloat(),_=J.unPackFloat(),U=J.unPackFloat();this.me.climbing=!!J.unPackInt8U();J.unPackInt8U();J.unPackInt8U();if(!j)return;this.state.serverStateIdx=M;const q=j.position.x,L=j.position.y,N=j.position.z;j.position.x=Q;j.position.y=_;j.position.z=U;if(q!==Q||L!==_||N!==U)this.emit("playerMove",j,{x:q,y:L,z:N},{x:Q,y:_,z:U})}#Y(){const E=new R;E.packInt8($.eventModifier);E.send(this.game.socket)}#Z(){const E=J.unPackInt8U(),j={...this.players[E]};delete this.players[E];this.emit("playerLeave",j)}#B(){if(this.game.gameModeId===O.Spatula){const E={...this.game};this.game.teamScore[1]=J.unPackInt16U();this.game.teamScore[2]=J.unPackInt16U();const j={x:J.unPackFloat(),y:J.unPackFloat(),z:J.unPackFloat()},M=J.unPackInt8U(),Q=J.unPackInt8U();this.game.spatula={coords:j,controlledBy:M,controlledByTeam:Q};this.emit("gameStateChange",E,this.game)}else if(this.game.gameModeId===O.KOTC){const E={...this.game};this.game.stage=J.unPackInt8U();this.game.zoneNumber=J.unPackInt8U();this.game.capturing=J.unPackInt8U();this.game.captureProgress=J.unPackInt16U();this.game.numCapturing=J.unPackInt8U();this.game.teamScore[1]=J.unPackInt8U();this.game.teamScore[2]=J.unPackInt8U();this.game.capturePercent=this.game.captureProgress/1000;this.game.activeZone=this.game.map.zones?this.game.map.zones[this.game.zoneNumber-1]:null;const j=Object.values(this.players).filter((M)=>M.inKotcZone&&M.playing);if(this.game.activeZone)Object.values(this.players).forEach((M)=>M.updateKotcZone(this.game.activeZone));if(this.game.numCapturing<=0)Object.values(this.players).forEach((M)=>{M.inKotcZone=!1;this.emit("playerLeaveZone",M)});this.emit("gameStateChange",E,this.game,j)}else if(this.game.gameModeId===O.Team){this.game.teamScore[1]=J.unPackInt16U();this.game.teamScore[2]=J.unPackInt16U()}if(this.game.gameModeId!==O.Spatula)delete this.game.spatula;if(this.game.gameModeId!==O.KOTC){delete this.game.stage;delete this.game.zoneNumber;delete this.game.capturing;delete this.game.captureProgress;delete this.game.numCapturing;delete this.game.numCapturing;delete this.game.activeZone}if(this.game.gameModeId===O.FFA)delete this.game.teamScore}#A(){const E=J.unPackInt8U(),j=J.unPackInt8U(),M=this.players[E];if(!M)return;switch(j){case K.HardBoiled:if(E===this.me.id)this.me.shieldHp=100;M.streakRewards.push(K.HardBoiled);break;case K.EggBreaker:M.streakRewards.push(K.EggBreaker);break;case K.Restock:{M.grenades=3;if(M.weapons[0]&&M.weapons[0].ammo){M.weapons[0].ammo.rounds=M.weapons[0].ammo.capacity;M.weapons[0].ammo.store=M.weapons[0].ammo.storeMax}if(M.weapons[1]&&M.weapons[1].ammo){M.weapons[1].ammo.rounds=M.weapons[1].ammo.capacity;M.weapons[1].ammo.store=M.weapons[1].ammo.storeMax}break}case K.OverHeal:M.hp=Math.min(200,M.hp+100);M.streakRewards.push(K.OverHeal);break;case K.DoubleEggs:M.streakRewards.push(K.DoubleEggs);break;case K.MiniEgg:M.scale=0.5;M.streakRewards.push(K.MiniEgg);break}this.emit("playerBeginStreak",M,j)}#P(){const E=J.unPackInt8U(),j=J.unPackInt8U(),M=this.players[E];if(!M)return;if([K.EggBreaker,K.OverHeal,K.DoubleEggs,K.MiniEgg].includes(j)&&M.streakRewards.includes(j))M.streakRewards=M.streakRewards.filter((_)=>_!==j);if(j===K.MiniEgg)M.scale=1;this.emit("playerEndStreak",M,j)}#z(){const E=J.unPackInt8U(),j=J.unPackInt8U(),M=J.unPackFloat(),Q=J.unPackFloat();if(!this.me)return;this.me.shieldHp=E;this.me.hp=j;if(this.me.shieldHp<=0){this.me.streakRewards=this.me.streakRewards.filter((_)=>_!==K.HardBoiled);this.emit("selfShieldLost",this.me.hp,{dx:M,dz:Q})}else this.emit("selfShieldHit",this.me.shieldHp,this.me.hp,{dx:M,dz:Q})}#T(){const E={...this.game.options};let j=J.unPackInt8U(),M=J.unPackInt8U(),Q=J.unPackInt8U();if(j<1||j>4)j=4;if(M<0||M>8)M=4;if(Q>16)Q=4;this.game.options.gravity=j/4;this.game.options.damage=M/4;this.game.options.healthRegen=Q/4;const _=J.unPackInt8U();Object.keys(m).forEach((U)=>{const q=_&m[U]?1:0;this.game.options[U]=q});this.game.options.weaponsDisabled=Array.from({length:7},()=>J.unPackInt8U()===1);this.game.options.mustUseSecondary=this.game.options.weaponsDisabled.every((U)=>U);this.emit("gameOptionsChange",E,this.game.options)}#b(){const E=J.unPackInt8U();if(E===x.Pause){this.emit("gameForcePause");setTimeout(()=>this.me.playing=!1,3000)}if(E===x.Reset){Object.values(this.players).forEach((j)=>j.streak=0);if(this.game.gameModeId!==O.FFA)this.game.teamScore=[0,0,0];if(this.game.gameModeId===O.Spatula){this.game.spatula.controlledBy=0;this.game.spatula.controlledByTeam=0;this.game.spatula.coords={x:0,y:0,z:0}}if(this.game.gameModeId===O.KOTC){this.game.stage=k.Capturing;this.game.zoneNumber=0;this.game.activeZone=null;this.game.capturing=0;this.game.captureProgress=0;this.game.numCapturing=0;this.game.capturePercent=0}this.emit("gameReset")}}#f(){if(!this.intents.includes(this.Intents.PING))return;const E=this.ping;this.ping=Date.now()-this.lastPingTime;this.emit("pingUpdate",E,this.ping);setTimeout(()=>{const j=new R;j.packInt8($.ping);j.send(this.game.socket);this.lastPingTime=Date.now()},1000)}#W(){const E=J.unPackInt8U(),j=J.unPackInt8U(),M=this.players[E];if(!M)return;const Q=M.team;M.team=j;M.streak=0;this.emit("playerSwitchTeam",M,Q,j)}#w(){const E=J.unPackInt8U(),j=J.unPackInt8U(),M=J.unPackInt16U(),Q=J.unPackInt16U(),_=J.unPackInt8U(),U=J.unPackInt16U(),q=J.unPackInt16U(),L=J.unPackInt16U(),N=J.unPackInt16U(),H=J.unPackInt8(),S=J.unPackInt8(),F=this.intents.includes(this.Intents.COSMETIC_DATA),A=F?V(M):M,Y=F?V(Q):Q,X=F?V(U):U,P=F?V(q):q,Z=F?V(L):L,i=F?V(N):N,G=this.players[E];if(G){const W={...G.character},w=G.selectedGun;G.character.eggColor=_;G.character.primaryGun=A;G.character.secondaryGun=Y;G.character.stamp=P;G.character.hat=X;G.character.grenade=Z;G.character.melee=i;G.character.stampPos.x=H;G.character.stampPos.y=S;G.selectedGun=j;G.weapons[0]=new p[j];if(w!==G.selectedGun)this.emit("playerChangeGun",G,w,G.selectedGun);if(W!==G.character)this.emit("playerChangeCharacter",G,W,G.character)}}#C(){const E=J.unPackInt32U(),j=this.account.eggBalance;this.account.eggBalance=E;this.emit("balanceUpdate",j,E)}#k(){this.me.playing=!1;this.emit("respawnDenied")}#x(){const E=J.unPackInt8U(),j=this.players[E];if(j)this.emit("playerMelee",j)}#v(){const E=J.unPackInt8U(),j=this.players[E];if(!j)return;const M=j.weapons[j.activeGun];if(M.ammo){const Q=Math.min(Math.min(M.ammo.capacity,M.ammo.reload)-M.ammo.rounds,M.ammo.store);M.ammo.rounds+=Q;M.ammo.store-=Q}this.emit("playerReload",j,M)}updateGameOptions(){const E=new R;E.packInt8($.gameOptions);E.packInt8(this.game.options.gravity*4);E.packInt8(this.game.options.damage*4);E.packInt8(this.game.options.healthRegen*4);const j=(this.game.options.locked?1:0)|(this.game.options.noTeamChange?2:0)|(this.game.options.noTeamShuffle?4:0);E.packInt8(j);this.game.options.weaponsDisabled.forEach((M)=>{E.packInt8(M?1:0)});E.send(this.game.socket)}#h(){this.game.isPrivate=!0;this.updateGameOptions()}#D(){const E=J.unPackInt8U();let j=J.unPackInt16U();const M=J.unPackFloat(),Q=J.unPackFloat(),_=J.unPackFloat(),U=J.unPackInt8U(),q=J.unPackFloat();if(this.intents.includes(this.Intents.COSMETIC_DATA))j=V(j);if(E===r.Grenade)this.emit("grenadeExplode",j,{x:M,y:Q,z:_},U,q);else this.emit("rocketHit",{x:M,y:Q,z:_},U,q)}#I(){const E=J.unPackInt8U(),j=J.unPackFloat(),M=J.unPackFloat(),Q=J.unPackFloat(),_=J.unPackFloat(),U=J.unPackFloat(),q=J.unPackFloat(),L=this.players[E];if(L){L.grenades--;this.emit("playerThrowGrenade",L,{x:j,y:M,z:Q},{x:_,y:U,z:q})}}#u(){const E=J.unPackInt8U(),j=J.unPackInt8U(),M=this.players[E];if(!M)return;if(!this.intents.includes(this.Intents.CHALLENGES))return this.emit("challengeComplete",M,j);const Q=this.account.challenges.find((_)=>_.id===j);this.emit("challengeComplete",M,Q);if(M.id===this.me.id)this.refreshChallenges()}#c(){const E=new R;E.packInt8(this.intents.includes(this.Intents.OBSERVE_GAME)?$.observeGame:$.joinGame);E.packString(this.game.raw.uuid);E.packInt8(+this.intents.includes(this.Intents.VIP_HIDE_BADGE));E.packInt8(this.state.weaponIdx||this.account?.loadout?.classIdx||0);E.packString(this.state.name);E.packInt32(this.account.session);E.packString(this.account.sessionId);E.packString(this.account.firebaseId);E.send(this.game.socket)}async#m(){this.me.id=J.unPackInt8U();this.me.team=J.unPackInt8U();this.game.gameModeId=J.unPackInt8U();this.game.gameMode=c[this.game.gameModeId];this.game.mapIdx=J.unPackInt8U();this.game.map=I[this.game.mapIdx];this.game.playerLimit=J.unPackInt8U();this.game.isGameOwner=J.unPackInt8U()===1;this.game.isPrivate=J.unPackInt8U()===1||this.game.isGameOwner;J.unPackInt8U();if(this.intents.includes(this.Intents.LOAD_MAP)||this.intents.includes(this.Intents.PATHFINDING)){this.game.map.raw=await jj(this.game.map.filename,this.game.map.hash);this.emit("mapLoad",this.game.map.raw);if(this.game.gameModeId===O.KOTC){const j=this.game.map.raw.data["DYNAMIC.capture-zone.none"];if(j){this.game.map.zones=Ej(j);if(!this.game.activeZone)this.game.activeZone=this.game.map.zones[this.game.zoneNumber-1]}else delete this.game.map.zones}if(this.intents.includes(this.Intents.PATHFINDING))this.pathing.nodeList=new a(this.game.map.raw)}this.state.inGame=!0;this.lastDeathTime=Date.now();const E=new R;E.packInt8($.clientReady);E.send(this.game.socket);this.updateIntervalId=setInterval(()=>this.update(),33.333333333333336);if(this.intents.includes(this.Intents.PING)){this.lastPingTime=Date.now();const j=new R;j.packInt8($.ping);j.send(this.game.socket)}if(this.intents.includes(this.Intents.NO_AFK_KICK))this.afkKickInterval=setInterval(()=>{if(this.state.inGame&&!this.me.playing&&Date.now()-this.lastDeathTime>=15000){const j=new R;j.packInt8($.keepAlive);j.send(this.game.socket)}},15000);this.emit("gameReady")}#g(){const E=J.unPackInt8U(),j=J.unPackString(128),M=J.unPackString(32),Q=this.players[E];if(!Q)return;Q.admin={ip:M,dbId:j};this.emit("playerInfo",Q,M,j)}packetHandlers={[$.syncThem]:()=>this.#S(),[$.fire]:()=>this.#V(),[$.hitThem]:()=>this.#H(),[$.syncMe]:()=>this.#X(),[$.hitMe]:()=>this.#R(),[$.swapWeapon]:()=>this.#K(),[$.collectItem]:()=>this.#F(),[$.respawn]:()=>this.#L(),[$.die]:()=>this.#O(),[$.pause]:()=>this.#G(),[$.chat]:()=>this.#$(),[$.addPlayer]:()=>this.#q(),[$.removePlayer]:()=>this.#Z(),[$.eventModifier]:()=>this.#Y(),[$.metaGameState]:()=>this.#B(),[$.beginShellStreak]:()=>this.#A(),[$.endShellStreak]:()=>this.#P(),[$.hitMeHardBoiled]:()=>this.#z(),[$.gameOptions]:()=>this.#T(),[$.ping]:()=>this.#f(),[$.switchTeam]:()=>this.#W(),[$.changeCharacter]:()=>this.#w(),[$.reload]:()=>this.#v(),[$.explode]:()=>this.#D(),[$.throwGrenade]:()=>this.#I(),[$.spawnItem]:()=>this.#N(),[$.melee]:()=>this.#x(),[$.updateBalance]:()=>this.#C(),[$.challengeCompleted]:()=>this.#u(),[$.socketReady]:()=>this.#c(),[$.gameJoined]:()=>this.#m(),[$.gameAction]:()=>this.#b(),[$.requestGameOptions]:()=>this.#h(),[$.respawnDenied]:()=>this.#k(),[$.playerInfo]:()=>this.#g(),[$.expireUpgrade]:()=>{},[$.clientReady]:()=>{},[$.musicInfo]:()=>J.unPackLongString()};processPacket(E){J.init(E);if(this.intents.includes(this.Intents.PACKET_HOOK))this.emit("packet",E);let j=0,M=0,Q=!1;while(J.isMoreDataAvailable()&&!Q){const _=J.unPackInt8U(),U=this.packetHandlers[_];if(U)U();else{console.error(`processPacket: I got but couldn't identify a: ${Object.keys($).find((q)=>$[q]===_)} ${_}`);if(j)console.error(`processPacket: It may be a result of the ${j} command (${M}).`);Q=!0;break}j=Object.keys($).find((q)=>$[q]===_);M=_;if(this.intents.includes(this.Intents.LOG_PACKETS))console.log(`[LOG_PACKETS] Packet ${j}: ${M}`)}}async checkChiknWinner(){const E=await this.api.queryServices({cmd:"chicknWinnerReady",id:this.account.id,sessionId:this.account.sessionId});if(typeof E==="string")return E;this.account.cw.limit=E.limit;this.account.cw.atLimit=E.limit>=4;this.account.cw.secondsUntilPlay=(this.account.cw.atLimit?E.period:E.span)||0;this.account.cw.canPlayAgain=Date.now()+this.account.cw.secondsUntilPlay*1000;return this.account.cw}async playChiknWinner(E=!0){if(this.account.cw.atLimit||this.account.cw.limit>t)return"hit_daily_limit";if(this.account.cw.canPlayAgain>Date.now()&&E)return"on_cooldown";const j=await this.api.queryServices({cmd:"incentivizedVideoReward",firebaseId:this.account.firebaseId,id:this.account.id,sessionId:this.account.sessionId,token:null});if(typeof j==="string")return j;if(j.error){if(j.error==="RATELIMITED"||j.error==="RATELMITED"){await this.checkChiknWinner();return"on_cooldown"}else if(j.error==="SESSION_EXPIRED"){this.emit("sessionExpired");return"session_expired"}console.error("Unknown Chikn Winner response, report this on Github:",j);return"unknown_error"}if(j.reward){this.account.eggBalance+=j.reward.eggsGiven;j.reward.itemIds.forEach((M)=>this.account.ownedItemIds.push(M));await this.checkChiknWinner();return j.reward}console.error("Unknown Chikn Winner response, report this on Github:",j);return"unknown_error"}async resetChiknWinner(){if(this.account.eggBalance<200)return"not_enough_eggs";if(!this.account.cw.atLimit)return"not_at_limit";const E=await this.api.queryServices({cmd:"chwReset",sessionId:this.account.sessionId});if(typeof E==="string")return E;if(E.result!=="SUCCESS"){console.error("Unknown Chikn Winner reset response, report this on Github:",E);return"unknown_error"}this.account.eggBalance-=200;await this.checkChiknWinner();return this.account.cw}canSee(E){if(!this.intents.includes(this.Intents.PATHFINDING))return this.processError("You must have the PATHFINDING intent to use this method.");return this.pathing.nodeList.hasLineOfSight(this.me.position,E.position)}async refreshChallenges(){const E=await this.api.queryServices({cmd:"challengeGetDaily",sessionId:this.account.sessionId,playerId:this.account.id});if(typeof E==="string")return E;this.#M(E);return this.account.challenges}async rerollChallenge(E){const j=await this.api.queryServices({cmd:"challengeRerollSlot",sessionId:this.account.sessionId,slotId:E});if(typeof j==="string")return j;this.#M(j);return this.account.challenges}async claimChallenge(E){const j=await this.api.queryServices({cmd:"challengeClaimReward",sessionId:this.account.sessionId,slotId:E});if(typeof j==="string")return j;this.#M(j.challenges);if(j.reward>0)this.account.eggBalance+=j.reward;return{eggReward:j.reward,updatedChallenges:this.account.challenges}}async refreshBalance(){const E=await this.api.queryServices({cmd:"checkBalance",firebaseId:this.account.firebaseId,sessionId:this.account.sessionId});if(typeof E==="string")return E;this.account.eggBalance=E.currentBalance;return E.currentBalance}async redeemCode(E){const j=await this.api.queryServices({cmd:"redeem",firebaseId:this.account.firebaseId,sessionId:this.account.sessionId,id:this.account.id,code:E});if(typeof j==="string")return j;if(j.result==="SUCCESS"){this.account.eggBalance=j.eggs_given;j.item_ids.forEach((M)=>this.account.ownedItemIds.push(M));return{result:j,eggsGiven:j.eggs_given,itemIds:j.item_ids}}return j}async claimURLReward(E){const j=await this.api.queryServices({cmd:"urlRewardParams",firebaseId:this.account.firebaseId,sessionId:this.account.sessionId,reward:E});if(typeof j==="string")return j;if(j.result==="SUCCESS"){this.account.eggBalance+=j.eggsGiven;j.itemIds.forEach((M)=>this.account.ownedItemIds.push(M))}return j}async claimSocialReward(E){const j=await this.api.queryServices({cmd:"reward",firebaseId:this.account.firebaseId,sessionId:this.account.sessionId,rewardTag:E});if(typeof j==="string")return j;if(j.result==="SUCCESS"){this.account.eggBalance+=j.eggsGiven;j.itemIds.forEach((M)=>this.account.ownedItemIds.push(M))}return j}async buyItem(E){const j=await this.api.queryServices({cmd:"buy",firebaseId:this.account.firebaseId,sessionId:this.account.sessionId,itemId:E,save:!0});if(typeof j==="string")return j;if(j.result==="SUCCESS"){this.account.eggBalance=j.currentBalance;this.account.ownedItemIds.push(j.itemId)}return j}processError(...E){const j=E.join(" ");if(this.#j.error&&this.#j.error.length)this.emit("error",j);else if(this.intents.includes(this.Intents.NO_EXIT_ON_ERROR))console.error(j);else throw Error(j)}leave(E=d.mainMenu){if(this.hasQuit)return;if(E>-1){this.game?.socket?.close(E);this.state.left=!0;this.emit("leave",E)}clearInterval(this.updateIntervalId);this.#J=[];this.state.inGame=!1;this.state.chatLines=0;this.state.reloading=!1;this.state.swappingGun=!1;this.state.usingMelee=!1;this.state.stateIdx=0;this.state.serverStateIdx=0;this.state.shotsFired=0;this.state.buffer=[];this.players={};this.me=new T({});this.game=this.#U;this.ping=0;this.lastPingTime=-1;this.lastDeathTime=-1;this.lastUpdateTick=0;this.pathing={nodeList:null,followingPath:!1,activePath:null,activeNode:null,activeNodeIdx:0}}logout(){this.account=this.#E;if(this.intents.includes(this.Intents.RENEW_SESSION))clearInterval(this.renewSessionInterval)}quit(E=!1){if(this.hasQuit)return;this.leave();if(this.matchmaker){this.matchmaker.close();if(!E)delete this.matchmaker}if(!E){delete this.account;delete this.api;delete this.game;delete this.me;delete this.pathing;delete this.players;delete this.state;this.#E={};this.#U={};this.#j={};this.#Q=[];this.#J=[]}if(this.intents.includes(this.Intents.NO_AFK_KICK))clearInterval(this.afkKickInterval);if(this.intents.includes(this.Intents.RENEW_SESSION))clearInterval(this.renewSessionInterval);this.hasQuit=!0}}export default Bot;
@@ -1,3 +1 @@
1
- /* eslint-disable */
2
-
3
- var u=Object.defineProperty;var c=(n,t)=>u(n,"name",{value:t,configurable:!0});class e{static{c(this,"CommIn")}static buffer;static idx;static init(t){this.buffer=new Uint8Array(t),this.idx=0}static isMoreDataAvailable(){return Math.max(0,this.buffer.length-this.idx)}static unPackInt8U(){const t=this.idx;return this.idx++,this.buffer[t]}static unPackInt8(){return(this.unPackInt8U()+128)%256-128}static unPackInt16U(){const t=this.idx;return this.idx+=2,this.buffer[t]+this.buffer[t+1]*256}static unPackInt24U(){const t=this.idx;return this.idx+=3,this.buffer[t]+this.buffer[t+1]*256+this.buffer[t+2]*65536}static unPackInt32U(){const t=this.idx;return this.idx+=4,this.buffer[t]+this.buffer[t+1]*256+this.buffer[t+2]*65536+this.buffer[t+3]*16777216}static unPackInt16(){return(this.unPackInt16U()+32768)%65536-32768}static unPackInt32(){return(this.unPackInt32U()+2147483648)%4294967296-2147483648}static unPackRadU(){return this.unPackInt24U()/2097152}static unPackRad(){return this.unPackInt16U()/8192-Math.PI}static unPackFloat(){return this.unPackInt16()/256}static unPackDouble(){return this.unPackInt32()/1048576}static unPackString(t){t=t||255;const i=Math.min(this.unPackInt8U(),t);return this.unPackStringHelper(i)}static unPackLongString(t){t=t||16383;const i=Math.min(this.unPackInt16U(),t);return this.unPackStringHelper(i)}static unPackStringHelper(t){if(this.isMoreDataAvailable()<t)return 0;let s="";for(let r=0;r<t;r++){const a=this.unPackInt16U();a>0&&(s+=String.fromCodePoint(a))}return s}}var f=e;export{e as CommIn,f as default};
1
+ export class CommIn{static buffer;static idx;static init(h){this.buffer=new Uint8Array(h);this.idx=0}static isMoreDataAvailable(){return Math.max(0,this.buffer.length-this.idx)}static unPackInt8U(){const h=this.idx;this.idx++;return this.buffer[h]}static unPackInt8(){return(this.unPackInt8U()+128)%256-128}static unPackInt16U(){const h=this.idx;this.idx+=2;return this.buffer[h]+this.buffer[h+1]*256}static unPackInt24U(){const h=this.idx;this.idx+=3;return this.buffer[h]+this.buffer[h+1]*256+this.buffer[h+2]*65536}static unPackInt32U(){const h=this.idx;this.idx+=4;return this.buffer[h]+this.buffer[h+1]*256+this.buffer[h+2]*65536+this.buffer[h+3]*16777216}static unPackInt16(){return(this.unPackInt16U()+32768)%65536-32768}static unPackInt32(){return(this.unPackInt32U()+2147483648)%4294967296-2147483648}static unPackRadU(){return this.unPackInt24U()/2097152}static unPackRad(){return this.unPackInt16U()/8192-Math.PI}static unPackFloat(){return this.unPackInt16()/256}static unPackDouble(){return this.unPackInt32()/1048576}static unPackString(h){h=h||255;const j=Math.min(this.unPackInt8U(),h);return this.unPackStringHelper(j)}static unPackLongString(h){h=h||16383;const j=Math.min(this.unPackInt16U(),h);return this.unPackStringHelper(j)}static unPackStringHelper(h){if(this.isMoreDataAvailable()<h)return 0;let k="";for(let p=0;p<h;p++){const q=this.unPackInt16U();if(q>0)k+=String.fromCodePoint(q)}return k}}export default CommIn;
@@ -1,3 +1 @@
1
- /* eslint-disable */
2
-
3
- var s=Object.defineProperty;var f=(h,t)=>s(h,"name",{value:t,configurable:!0});class e{static{f(this,"CommOut")}constructor(t=16384){this.idx=0,this.arrayBuffer=new ArrayBuffer(t),this.buffer=new Uint8Array(this.arrayBuffer,0,t)}send(t){const i=new Uint8Array(this.arrayBuffer,0,this.idx);t.send(i)}packInt8(t){this.buffer[this.idx]=t&255,this.idx++}packInt16(t){this.buffer[this.idx]=t&255,this.buffer[this.idx+1]=t>>8&255,this.idx+=2}packInt24(t){this.buffer[this.idx]=t&255,this.buffer[this.idx+1]=t>>8&255,this.buffer[this.idx+2]=t>>16&255,this.idx+=3}packInt32(t){this.buffer[this.idx]=t&255,this.buffer[this.idx+1]=t>>8&255,this.buffer[this.idx+2]=t>>16&255,this.buffer[this.idx+3]=t>>24&255,this.idx+=4}packRadU(t){this.packInt24(t*2097152)}packRad(t){this.packInt16((t+Math.PI)*8192)}packFloat(t){this.packInt16(t*256)}packDouble(t){this.packInt32(t*1048576)}packString(t){typeof t!="string"&&(t=""),this.packInt8(t.length);for(let i=0;i<t.length;i++)this.packInt16(t.charCodeAt(i))}packLongString(t){typeof t!="string"&&(t=""),this.packInt16(t.length);for(let i=0;i<t.length;i++)this.packInt16(t.charCodeAt(i))}}var n=e;export{e as CommOut,n as default};
1
+ export class CommOut{constructor(t=16384){this.idx=0;this.arrayBuffer=new ArrayBuffer(t);this.buffer=new Uint8Array(this.arrayBuffer,0,t)}send(t){const i=new Uint8Array(this.arrayBuffer,0,this.idx);t.send(i)}packInt8(t){this.buffer[this.idx]=t&255;this.idx++}packInt16(t){this.buffer[this.idx]=t&255;this.buffer[this.idx+1]=t>>8&255;this.idx+=2}packInt24(t){this.buffer[this.idx]=t&255;this.buffer[this.idx+1]=t>>8&255;this.buffer[this.idx+2]=t>>16&255;this.idx+=3}packInt32(t){this.buffer[this.idx]=t&255;this.buffer[this.idx+1]=t>>8&255;this.buffer[this.idx+2]=t>>16&255;this.buffer[this.idx+3]=t>>24&255;this.idx+=4}packRadU(t){this.packInt24(t*2097152)}packRad(t){this.packInt16((t+Math.PI)*8192)}packFloat(t){this.packInt16(t*256)}packDouble(t){this.packInt32(t*1048576)}packString(t){if(typeof t!=="string")t="";this.packInt8(t.length);for(let i=0;i<t.length;i++)this.packInt16(t.charCodeAt(i))}packLongString(t){if(typeof t!=="string")t="";this.packInt16(t.length);for(let i=0;i<t.length;i++)this.packInt16(t.charCodeAt(i))}}export default CommOut;
@@ -1,3 +1 @@
1
- /* eslint-disable */
2
-
3
- import o from"./CommIn.js";import m from"./CommOut.js";import r from"../constants/CommCode.js";import t from"../constants/CloseCode.js";export{t as CloseCode,r as CommCode,o as CommIn,m as CommOut};
1
+ import CommIn from"./CommIn.js";import CommOut from"./CommOut.js";import CommCode from"../constants/CommCode.js";import CloseCode from"../constants/CloseCode.js";export{CommIn,CommOut,CommCode,CloseCode};
@@ -1,3 +1 @@
1
- /* eslint-disable */
2
-
3
- const e={gameNotFound:4e3,gameFull:4001,badName:4002,mainMenu:4003,gameIdleExceeded:4004,corruptedLoginData0:4005,corruptedLoginData1:4006,corruptedLoginData2:4007,corruptedLoginData3:4008,corruptedLoginData4:4009,corruptedLoginData5:4010,gameMaxPlayersExceeded:4011,gameDestroyUser:4012,joinGameOutOfOrder:4013,gameShuttingDown:4014,readyBeforeReady:4015,booted:4016,gameErrorOnUserSocket:4017,uuidNotFound:4018,sessionNotFound:4019,clusterFullCpu:4020,clusterFullMem:4021,noClustersAvailable:4022,locked:4023};var o=e;export{e as CloseCode,o as default};
1
+ export const CloseCode={gameNotFound:4000,gameFull:4001,badName:4002,mainMenu:4003,gameIdleExceeded:4004,corruptedLoginData0:4005,corruptedLoginData1:4006,corruptedLoginData2:4007,corruptedLoginData3:4008,corruptedLoginData4:4009,corruptedLoginData5:4010,gameMaxPlayersExceeded:4011,gameDestroyUser:4012,joinGameOutOfOrder:4013,gameShuttingDown:4014,readyBeforeReady:4015,booted:4016,gameErrorOnUserSocket:4017,uuidNotFound:4018,sessionNotFound:4019,clusterFullCpu:4020,clusterFullMem:4021,noClustersAvailable:4022,locked:4023};export default CloseCode;
@@ -1,3 +1 @@
1
- /* eslint-disable */
2
-
3
- const e={swapWeapon:0,joinGame:1,refreshGameState:2,spawnItem:3,observeGame:4,ping:5,bootPlayer:6,banPlayer:7,loginRequired:8,gameLocked:9,reportPlayer:10,switchTeam:13,changeCharacter:14,pause:15,gameOptions:16,gameAction:17,requestGameOptions:18,gameJoined:19,socketReady:20,addPlayer:21,removePlayer:22,fire:23,melee:24,throwGrenade:25,eventModifier:27,hitThem:28,hitMe:29,collectItem:30,challengeResetInGame:31,chat:34,syncThem:35,die:37,beginShellStreak:38,endShellStreak:39,updateBalance:42,reload:43,respawn:44,respawnDenied:45,clientReady:47,requestRespawn:48,switchTeamFail:51,expireUpgrade:52,metaGameState:53,syncMe:54,explode:55,keepAlive:56,musicInfo:57,hitMeHardBoiled:58,playerInfo:59,challengeCompleted:60};var a=e;export{a as default};
1
+ const e={swapWeapon:0,joinGame:1,refreshGameState:2,spawnItem:3,observeGame:4,ping:5,bootPlayer:6,banPlayer:7,loginRequired:8,gameLocked:9,reportPlayer:10,switchTeam:13,changeCharacter:14,pause:15,gameOptions:16,gameAction:17,requestGameOptions:18,gameJoined:19,socketReady:20,addPlayer:21,removePlayer:22,fire:23,melee:24,throwGrenade:25,eventModifier:27,hitThem:28,hitMe:29,collectItem:30,challengeResetInGame:31,chat:34,syncThem:35,die:37,beginShellStreak:38,endShellStreak:39,updateBalance:42,reload:43,respawn:44,respawnDenied:45,clientReady:47,requestRespawn:48,switchTeamFail:51,expireUpgrade:52,metaGameState:53,syncMe:54,explode:55,keepAlive:56,musicInfo:57,hitMeHardBoiled:58,playerInfo:59,challengeCompleted:60};export default e;
@@ -1,3 +1 @@
1
- /* eslint-disable */
2
-
3
- const l=[{id:1,loc_ref:"chlg_kill_streak_five",type:0,subType:0,period:0,goal:1,reward:100,conditional:0,value:"5",valueTwo:null,tier:2,loc:{title:"Master Chef",desc:"Get a 5 killstreak"}},{id:2,loc_ref:"chlg_kill_streak_ten",type:0,subType:0,period:0,goal:1,reward:200,conditional:0,value:"10",valueTwo:null,tier:2,loc:{title:"Butcher",desc:"Get a 10 killstreak"}},{id:3,loc_ref:"chlg_kill_streak_fifteen",type:0,subType:0,period:0,goal:1,reward:500,conditional:0,value:"15",valueTwo:null,tier:3,loc:{title:"Eggsassin",desc:"Get a 15 killstreak"}},{id:4,loc_ref:"chlg_kill_streak_twenty",type:0,subType:0,period:0,goal:1,reward:1e3,conditional:0,value:"20",valueTwo:null,tier:3,loc:{title:"Eggsecutioner",desc:"Get a 20 killstreak"}},{id:5,loc_ref:"chlg_kill_streak_fifty",type:0,subType:0,period:0,goal:1,reward:5e3,conditional:0,value:"50",valueTwo:null,tier:3,loc:{title:"Shell Smasher",desc:"Get a 50 killstreak"}},{id:6,loc_ref:"chlg_kill_kills_ten",type:0,subType:10,period:0,goal:10,reward:100,conditional:null,value:null,valueTwo:null,tier:0,loc:{title:"Shell Shocker",desc:"Get 10 total kills"}},{id:7,loc_ref:"chlg_kill_kills_twenty",type:0,subType:10,period:0,goal:20,reward:200,conditional:null,value:null,valueTwo:null,tier:1,loc:{title:"Yolk Drinker",desc:"Get 20 total kills"}},{id:8,loc_ref:"chlg_kill_kills_fifty",type:0,subType:10,period:0,goal:50,reward:500,conditional:null,value:null,valueTwo:null,tier:2,loc:{title:"Clutch Master",desc:"Get 50 total kills"}},{id:9,loc_ref:"chlg_kill_kills_hundred",type:0,subType:10,period:0,goal:100,reward:1e3,conditional:null,value:null,valueTwo:null,tier:3,loc:{title:"Eggsterminator",desc:"Get 100 total kills"}},{id:10,loc_ref:"chlg_kill_kills_two_fifty",type:0,subType:10,period:0,goal:250,reward:2500,conditional:null,value:null,valueTwo:null,tier:3,loc:{title:"Ovum Overlord",desc:"Get 250 total kills"}},{id:11,loc_ref:"chlg_kill_timePlayed_two",type:0,subType:6,period:0,goal:1,reward:100,conditional:null,value:"2",valueTwo:"60",tier:0,loc:{title:"Back to Back",desc:"Spawn and get 2 kills in 1 min"}},{id:12,loc_ref:"chlg_kill_timePlayed_four",type:0,subType:6,period:0,goal:1,reward:500,conditional:null,value:"4",valueTwo:"60",tier:2,loc:{title:"C-C-C-COMBO",desc:"Spawn and get 4 kills in 1 min"}},{id:13,loc_ref:"chlg_kill_timePlayed_seven",type:0,subType:6,period:0,goal:1,reward:1e3,conditional:null,value:"7",valueTwo:"60",tier:3,loc:{title:"Eggcellerator",desc:"Spawn and get 7 kills in 1 min"}},{id:14,loc_ref:"chlg_kill_timePlayed_ten",type:0,subType:6,period:0,goal:1,reward:2500,conditional:null,value:"10",valueTwo:"60",tier:3,loc:{title:"Need for Speed",desc:"Spawn and get 10 kills in 1 min"}},{id:15,loc_ref:"chlg_kill_con_kill_one_shot",type:0,subType:8,period:0,goal:1,reward:100,conditional:11,value:"1",valueTwo:"1",tier:1,loc:{title:"Bullseye",desc:"Kill an egg with 1 shot"}},{id:16,loc_ref:"chlg_kill_con_kill_hp_ten",type:0,subType:8,period:0,goal:1,reward:500,conditional:12,value:"1",valueTwo:"10",tier:1,loc:{title:"Cutting it Close",desc:"Get a kill with less than 10 HP"}},{id:17,loc_ref:"chlg_kill_con_kill_five_streak",type:0,subType:8,period:0,goal:1,reward:1e3,conditional:0,value:"0",valueTwo:"5",tier:2,loc:{title:"Soft Boiled",desc:"Kill an egg on a 5+ streak"}},{id:18,loc_ref:"chlg_kill_con_kill_ten_streak",type:0,subType:8,period:0,goal:1,reward:2500,conditional:0,value:"0",valueTwo:"10",tier:3,loc:{title:"Breaker-breaker",desc:"Kill an egg on a 10+ streak"}},{id:19,loc_ref:"chlg_kill_con_kill_scoped",type:0,subType:8,period:0,goal:1,reward:200,conditional:13,value:null,valueTwo:null,tier:2,loc:{title:"Eye 2 Eye",desc:"Snipe a zoomed-in sniper"}},{id:20,loc_ref:"chlg_kill_con_two_kills_one_shot",type:0,subType:8,period:0,goal:1,reward:200,conditional:16,value:"2",valueTwo:null,tier:2,loc:{title:"Collateral Damage",desc:"Kill two eggs at once"}},{id:21,loc_ref:"chlg_kill_con_reloading",type:0,subType:8,period:0,goal:1,reward:100,conditional:17,value:null,valueTwo:null,tier:1,loc:{title:"Owned",desc:"Kill an egg while they reload"}},{id:22,loc_ref:"chlg_kill_con_kill_scoped_melee",type:0,subType:8,period:0,goal:1,reward:200,conditional:13,value:null,valueTwo:"9",tier:2,loc:{title:"Behind You!",desc:"Melee kill a zoomed-in egg"}},{id:23,loc_ref:"chlg_kill_con_kill_two_grenade",type:0,subType:8,period:0,goal:1,reward:200,conditional:16,value:"2",valueTwo:"8",tier:2,loc:{title:"2 Birds 1 Stone",desc:"Kill 2 eggs with 1 Grenade"}},{id:24,loc_ref:"chlg_kill_con_kill_three_grenade",type:0,subType:8,period:0,goal:1,reward:1e3,conditional:16,value:"3",valueTwo:"8",tier:3,loc:{title:"M-M-M-Multikill",desc:"Kill 3 eggs with 1 Grenade"}},{id:25,loc_ref:"chlg_kill_con_kill_two_rpegg",type:0,subType:8,period:0,goal:1,reward:200,conditional:16,value:"2",valueTwo:"4",tier:2,loc:{title:"Splash Damage",desc:"Kill 2 eggs with 1 RPEGG shot"}},{id:26,loc_ref:"chlg_kill_con_kill_three_rpegg",type:0,subType:8,period:0,goal:1,reward:1e3,conditional:16,value:"3",valueTwo:"4",tier:3,loc:{title:"Big Boomer",desc:"Kill 3 eggs with 1 RPEGG shot"}},{id:27,loc_ref:"chlg_kill_weaponType_Cluck9mm_five",type:0,subType:1,period:0,goal:5,reward:200,conditional:null,value:null,valueTwo:"3",tier:1,loc:{title:"Pew Pew",desc:"Get 5 Cluck 9mm kills"}},{id:28,loc_ref:"chlg_kill_weaponType_Cluck9mm_ten",type:0,subType:1,period:0,goal:10,reward:500,conditional:null,value:null,valueTwo:"3",tier:1,loc:{title:"Trigger Happy",desc:"Get 10 Cluck 9mm kills"}},{id:29,loc_ref:"chlg_kill_weaponType_Cluck9mm_twenty",type:0,subType:1,period:0,goal:20,reward:1e3,conditional:null,value:null,valueTwo:"3",tier:2,loc:{title:"Sidearm Specialist",desc:"Get 20 Cluck 9mm kills"}},{id:30,loc_ref:"chlg_kill_weaponType_Cluck9mm_fifty",type:0,subType:1,period:0,goal:50,reward:2500,conditional:null,value:null,valueTwo:"3",tier:3,loc:{title:"9mm Master",desc:"Get 50 Cluck 9mm kills"}},{id:31,loc_ref:"chlg_kill_weaponType_Scrambler_five",type:0,subType:1,period:0,goal:5,reward:100,conditional:null,value:null,valueTwo:"1",tier:1,loc:{title:"Scrambled Eggs",desc:"Get 5 Scrambler kills"}},{id:32,loc_ref:"chlg_kill_weaponType_Scrambler_ten",type:0,subType:1,period:0,goal:10,reward:200,conditional:null,value:null,valueTwo:"1",tier:1,loc:{title:"Hunting Wabbits",desc:"Get 10 Scrambler kills"}},{id:33,loc_ref:"chlg_kill_weaponType_Scrambler_twenty",type:0,subType:1,period:0,goal:20,reward:500,conditional:null,value:null,valueTwo:"1",tier:2,loc:{title:"Boomstick",desc:"Get 20 Scrambler kills"}},{id:34,loc_ref:"chlg_kill_weaponType_Scrambler_fifty",type:0,subType:1,period:0,goal:50,reward:1e3,conditional:null,value:null,valueTwo:"1",tier:3,loc:{title:"Splat-o-matic",desc:"Get 50 Scrambler kills"}},{id:35,loc_ref:"chlg_kill_weaponType_Rpegg_five",type:0,subType:1,period:0,goal:5,reward:100,conditional:null,value:null,valueTwo:"4",tier:2,loc:{title:"Eggsploder",desc:"Get 5 RPEGG kills"}},{id:36,loc_ref:"chlg_kill_weaponType_Rpegg_ten",type:0,subType:1,period:0,goal:10,reward:200,conditional:null,value:null,valueTwo:"4",tier:2,loc:{title:"Arm Cannons",desc:"Get 10 RPEGG kills"}},{id:37,loc_ref:"chlg_kill_weaponType_Rpegg_twenty",type:0,subType:1,period:0,goal:20,reward:500,conditional:null,value:null,valueTwo:"4",tier:2,loc:{title:"Bazooka Joe",desc:"Get 20 RPEGG kills"}},{id:38,loc_ref:"chlg_kill_weaponType_Rpegg_fifty",type:0,subType:1,period:0,goal:50,reward:1e3,conditional:null,value:null,valueTwo:"4",tier:3,loc:{title:"Master Eggsploder",desc:"Get 50 RPEGG kills"}},{id:39,loc_ref:"chlg_kill_weaponType_Whipper_five",type:0,subType:1,period:0,goal:5,reward:100,conditional:null,value:null,valueTwo:"5",tier:1,loc:{title:"Whip it Good",desc:"Get 5 Whipper kills"}},{id:40,loc_ref:"chlg_kill_weaponType_Whipper_ten",type:0,subType:1,period:0,goal:10,reward:200,conditional:null,value:null,valueTwo:"5",tier:1,loc:{title:"Cool Whip",desc:"Get 10 Whipper kills"}},{id:41,loc_ref:"chlg_kill_weaponType_Whipper_twenty",type:0,subType:1,period:0,goal:20,reward:500,conditional:null,value:null,valueTwo:"5",tier:2,loc:{title:"Whip it REAL Good",desc:"Get 20 Whipper kills"}},{id:42,loc_ref:"chlg_kill_weaponType_Whipper_fifty",type:0,subType:1,period:0,goal:50,reward:1e3,conditional:null,value:null,valueTwo:"5",tier:3,loc:{title:"Whip up a Storm",desc:"Get 50 Whipper kills"}},{id:43,loc_ref:"chlg_kill_weaponType_Eggk47_five",type:0,subType:1,period:0,goal:5,reward:100,conditional:null,value:null,valueTwo:"0",tier:0,loc:{title:"Lock & Load",desc:"Get 5 EggK-47 kills"}},{id:44,loc_ref:"chlg_kill_weaponType_Eggk47_ten",type:0,subType:1,period:0,goal:10,reward:200,conditional:null,value:null,valueTwo:"0",tier:1,loc:{title:"Almost a Dozen",desc:"Get 10 EggK-47 kills"}},{id:45,loc_ref:"chlg_kill_weaponType_Eggk47_twenty",type:0,subType:1,period:0,goal:20,reward:500,conditional:null,value:null,valueTwo:"0",tier:2,loc:{title:"Spray Down",desc:"Get 20 EggK-47 kills"}},{id:46,loc_ref:"chlg_kill_weaponType_Eggk47_fifty",type:0,subType:1,period:0,goal:50,reward:1e3,conditional:null,value:null,valueTwo:"0",tier:3,loc:{title:"Eggk-47 Eggspert",desc:"Get 50 EggK-47 kills"}},{id:47,loc_ref:"chlg_kill_weaponType_FreeRanger_five",type:0,subType:1,period:0,goal:5,reward:100,conditional:null,value:null,valueTwo:"2",tier:1,loc:{title:"Poacher",desc:"Get 5 Free Ranger kills"}},{id:48,loc_ref:"chlg_kill_weaponType_FreeRanger_ten",type:0,subType:1,period:0,goal:10,reward:200,conditional:null,value:null,valueTwo:"2",tier:1,loc:{title:"Bounty Hunter",desc:"Get 10 Free Ranger kills"}},{id:49,loc_ref:"chlg_kill_weaponType_FreeRanger_twenty",type:0,subType:1,period:0,goal:20,reward:500,conditional:null,value:null,valueTwo:"2",tier:2,loc:{title:"Hired Gun",desc:"Get 20 Free Ranger kills"}},{id:50,loc_ref:"chlg_kill_weaponType_FreeRanger_fifty",type:0,subType:1,period:0,goal:50,reward:1e3,conditional:null,value:null,valueTwo:"2",tier:3,loc:{title:"Big-Game Hunter",desc:"Get 50 Free Ranger kills"}},{id:51,loc_ref:"chlg_kill_weaponType_Crackshot_five",type:0,subType:1,period:0,goal:5,reward:100,conditional:null,value:null,valueTwo:"6",tier:1,loc:{title:"Sniper",desc:"Get 5 Crackshot kills"}},{id:52,loc_ref:"chlg_kill_weaponType_Crackshot_ten",type:0,subType:1,period:0,goal:10,reward:200,conditional:null,value:null,valueTwo:"6",tier:1,loc:{title:"Sharpshooter",desc:"Get 10 Crackshot kills"}},{id:53,loc_ref:"chlg_kill_weaponType_Crackshot_twenty",type:0,subType:1,period:0,goal:20,reward:500,conditional:null,value:null,valueTwo:"6",tier:2,loc:{title:"Marksman",desc:"Get 20 Crackshot kills"}},{id:54,loc_ref:"chlg_kill_weaponType_Crackshot_fifty",type:0,subType:1,period:0,goal:50,reward:1e3,conditional:null,value:null,valueTwo:"6",tier:3,loc:{title:"Cracked",desc:"Get 50 Crackshot kills"}},{id:55,loc_ref:"chlg_kill_weaponType_TriHard_five",type:0,subType:1,period:0,goal:5,reward:100,conditional:null,value:null,valueTwo:"7",tier:1,loc:{title:"Tri-Hard",desc:"Get 5 Tri-Hard kills"}},{id:56,loc_ref:"chlg_kill_weaponType_TriHard_ten",type:0,subType:1,period:0,goal:10,reward:200,conditional:null,value:null,valueTwo:"7",tier:1,loc:{title:"Tri-Harder",desc:"Get 10 Tri-Hard kills"}},{id:57,loc_ref:"chlg_kill_weaponType_TriHard_twenty",type:0,subType:1,period:0,goal:20,reward:500,conditional:null,value:null,valueTwo:"7",tier:2,loc:{title:"Tri-Even-Harder",desc:"Get 20 Tri-Hard kills"}},{id:58,loc_ref:"chlg_kill_weaponType_TriHard_fifty",type:0,subType:1,period:0,goal:50,reward:1e3,conditional:null,value:null,valueTwo:"7",tier:3,loc:{title:"Tri-Hardest",desc:"Get 50 Tri-Hard kills"}},{id:59,loc_ref:"chlg_kill_weaponType_Melee_five",type:0,subType:1,period:0,goal:5,reward:200,conditional:null,value:null,valueTwo:"9",tier:2,loc:{title:"Whisky Business",desc:"Get 5 Melee kills"}},{id:60,loc_ref:"chlg_kill_weaponType_Melee_ten",type:0,subType:1,period:0,goal:10,reward:500,conditional:null,value:null,valueTwo:"9",tier:2,loc:{title:"Slap the Bass",desc:"Get 10 Melee kills"}},{id:61,loc_ref:"chlg_kill_weaponType_Melee_twenty",type:0,subType:1,period:0,goal:20,reward:1e3,conditional:null,value:null,valueTwo:"9",tier:3,loc:{title:"Whack & Slash",desc:"Get 20 Melee kills"}},{id:62,loc_ref:"chlg_kill_weaponType_Melee_fifty",type:0,subType:1,period:0,goal:50,reward:2500,conditional:null,value:null,valueTwo:"9",tier:3,loc:{title:"Melee Master",desc:"Get 50 Melee kills"}},{id:63,loc_ref:"chlg_damage_five_hundred",type:1,subType:null,period:0,goal:500,reward:100,conditional:null,value:null,valueTwo:null,tier:0,loc:{title:"Shattered Shells",desc:"Deal 500 damage"}},{id:64,loc_ref:"chlg_damage_one_thousand",type:1,subType:null,period:0,goal:1e3,reward:100,conditional:null,value:null,valueTwo:null,tier:1,loc:{title:"Decimator",desc:"Deal 1000 damage"}},{id:65,loc_ref:"chlg_damage_twenty_five_hundred",type:1,subType:null,period:0,goal:2500,reward:200,conditional:null,value:null,valueTwo:null,tier:1,loc:{title:"Tormentor",desc:"Deal 2500 damage"}},{id:66,loc_ref:"chlg_damage_five_thousand",type:1,subType:null,period:0,goal:5e3,reward:500,conditional:null,value:null,valueTwo:null,tier:2,loc:{title:"Devastator",desc:"Deal 5000 damage"}},{id:67,loc_ref:"chlg_damage_ten_thousand",type:1,subType:null,period:0,goal:1e4,reward:1e3,conditional:null,value:null,valueTwo:null,tier:3,loc:{title:"Boomsauce",desc:"Deal 10000 damage"}},{id:68,loc_ref:"chlg_damage_twenty_five_thousand",type:1,subType:null,period:0,goal:25e3,reward:2500,conditional:null,value:null,valueTwo:null,tier:3,loc:{title:"Maximum Damage",desc:"Deal 25000 damage"}},{id:69,loc_ref:"chlg_deaths_ten",type:2,subType:null,period:0,goal:10,reward:100,conditional:null,value:null,valueTwo:null,tier:1,loc:{title:"Cracked",desc:"Die 10 times"}},{id:70,loc_ref:"chlg_deaths_twenty",type:2,subType:null,period:0,goal:20,reward:200,conditional:null,value:null,valueTwo:null,tier:1,loc:{title:"Fried",desc:"Die 20 times"}},{id:71,loc_ref:"chlg_deaths_fifty",type:2,subType:null,period:0,goal:50,reward:500,conditional:null,value:null,valueTwo:null,tier:2,loc:{title:"Death Wish",desc:"Die 50 times"}},{id:72,loc_ref:"chlg_movement_distance_five_hunderd",type:3,subType:3,period:0,goal:500,reward:100,conditional:null,value:null,valueTwo:null,tier:0,loc:{title:"Runny Egg",desc:"Travel 500m"}},{id:73,loc_ref:"chlg_movement_distance_one_thousand",type:3,subType:3,period:0,goal:1e3,reward:500,conditional:null,value:null,valueTwo:null,tier:1,loc:{title:"Poultry in Motion",desc:"Travel 1000m"}},{id:74,loc_ref:"chlg_movement_distance_five_thousand",type:3,subType:3,period:0,goal:5e3,reward:2500,conditional:null,value:null,valueTwo:null,tier:2,loc:{title:"Gaming Marathon",desc:"Travel 5000m"}},{id:75,loc_ref:"chlg_movement_jump_one_hundred",type:3,subType:4,period:0,goal:100,reward:100,conditional:null,value:null,valueTwo:null,tier:1,loc:{title:"Jumpman",desc:"Jump 100 times"}},{id:76,loc_ref:"chlg_movement_jump_five_hundred",type:3,subType:4,period:0,goal:500,reward:500,conditional:null,value:null,valueTwo:null,tier:1,loc:{title:"Bouncing Bomb",desc:"Jump 500 times"}},{id:77,loc_ref:"chlg_kill_jump_one",type:0,subType:4,period:0,goal:1,reward:200,conditional:null,value:null,valueTwo:null,tier:2,loc:{title:"Aerial Assault",desc:"Get a kill while jumping"}},{id:78,loc_ref:"chlg_kill_jump_five",type:0,subType:4,period:0,goal:5,reward:1e3,conditional:null,value:null,valueTwo:null,tier:3,loc:{title:"Do a Barrel Roll",desc:"Get 5 kills while airborne"}},{id:79,loc_ref:"chlg_kill_jump_victim_jump",type:0,subType:4,period:0,goal:1,reward:2500,conditional:4,value:null,valueTwo:null,tier:3,loc:{title:"Aerial Acrobatics",desc:"Kill an egg while both airborne"}},{id:80,loc_ref:"chlg_movement_collect_ammo_ten",type:4,subType:18,period:0,goal:10,reward:100,conditional:16,value:"0",valueTwo:null,tier:1,loc:{title:"We Need Supplies!",desc:"Collect 10 ammo boxes"}},{id:81,loc_ref:"chlg_movement_collect_ammo_twenty_five",type:4,subType:18,period:0,goal:25,reward:500,conditional:16,value:"0",valueTwo:null,tier:2,loc:{title:"Quartermaster",desc:"Collect 25 ammo boxes"}},{id:82,loc_ref:"chlg_movement_collect_ammo_fifty",type:4,subType:18,period:0,goal:50,reward:1e3,conditional:16,value:"0",valueTwo:null,tier:3,loc:{title:"Locked & Loaded",desc:"Collect 50 ammo boxes"}},{id:83,loc_ref:"chlg_movement_collect_grenade_ten",type:4,subType:18,period:0,goal:10,reward:100,conditional:17,value:"1",valueTwo:null,tier:1,loc:{title:"Explosives expert",desc:"Collect 10 grenades"}},{id:84,loc_ref:"chlg_movement_collect_grenade_twenty_five",type:4,subType:18,period:0,goal:25,reward:500,conditional:17,value:"1",valueTwo:null,tier:2,loc:{title:"Bombardier",desc:"Collect 25 grenades"}},{id:85,loc_ref:"chlg_movement_collect_grenade_fifty",type:4,subType:18,period:0,goal:50,reward:1e3,conditional:17,value:"1",valueTwo:null,tier:3,loc:{title:"Explosive Temper",desc:"Collect 50 grenades"}},{id:86,loc_ref:"chlg_timed_timeAlive_thirty",type:5,subType:7,period:0,goal:1,reward:100,conditional:7,value:"30",valueTwo:null,tier:1,loc:{title:"Running Scared",desc:"Stay alive for 30 sec"}},{id:87,loc_ref:"chlg_timed_timeAlive_sixty",type:5,subType:7,period:0,goal:1,reward:200,conditional:7,value:"60",valueTwo:null,tier:2,loc:{title:"Hard to Beat",desc:"Stay alive for 1 min"}},{id:88,loc_ref:"chlg_timed_timeAlive_three_hundred",type:5,subType:7,period:0,goal:1,reward:2500,conditional:7,value:"300",valueTwo:null,tier:3,loc:{title:"Happily Ever After",desc:"Stay alive for 5 min"}},{id:90,loc_ref:"chlg_timed_timePlayed_three_hundred",type:5,subType:6,period:0,goal:300,reward:200,conditional:6,value:"300",valueTwo:null,tier:0,loc:{title:"Shell Shocked!",desc:"Play for 5 min"}},{id:91,loc_ref:"chlg_timed_timePlayed_nine_hundred",type:5,subType:6,period:0,goal:900,reward:500,conditional:6,value:"900",valueTwo:null,tier:1,loc:{title:"Not so Noob",desc:"Play for 15 min"}},{id:92,loc_ref:"chlg_timed_timePlayed_eighteen_hundred",type:5,subType:6,period:0,goal:1800,reward:1e3,conditional:6,value:"1800",valueTwo:null,tier:2,loc:{title:"Oval Office",desc:"Play for 30 min"}},{id:93,loc_ref:"chlg_timed_timePlayed_thirty_six_hundred",type:5,subType:6,period:0,goal:3600,reward:2500,conditional:6,value:"3600",valueTwo:null,tier:3,loc:{title:"On That Grind",desc:"Play for 60 min"}},{id:94,loc_ref:"chlg_kotc_capturing_timeAlive_twenty",type:6,subType:20,period:0,goal:1,reward:100,conditional:7,value:"10",valueTwo:null,tier:1,loc:{title:"Hold the Fort",desc:"Stand on Coop for 10 sec"}},{id:95,loc_ref:"chlg_kotc_capture",type:6,subType:21,period:0,goal:1,reward:100,conditional:null,value:null,valueTwo:null,tier:1,loc:{title:"Coop King",desc:"Capture a Coop"}},{id:96,loc_ref:"chlg_kotc_win_one",type:6,subType:23,period:0,goal:1,reward:200,conditional:null,value:null,valueTwo:null,tier:1,loc:{title:"King of the Coop",desc:"Win a KotC match"}},{id:97,loc_ref:"chlg_kotc_win_three",type:6,subType:23,period:0,goal:3,reward:500,conditional:null,value:null,valueTwo:null,tier:2,loc:{title:"Team Sports",desc:"Win 3 KotC matches"}},{id:98,loc_ref:"chlg_kotc_win_five",type:6,subType:23,period:0,goal:5,reward:1e3,conditional:null,value:null,valueTwo:null,tier:3,loc:{title:"Rule the Roost",desc:"Win 5 KotC matches"}},{id:99,loc_ref:"chlg_kotc_win_ten",type:6,subType:23,period:0,goal:10,reward:2500,conditional:null,value:null,valueTwo:null,tier:3,loc:{title:"Coop Commander",desc:"Win 10 KotC matches"}},{id:100,loc_ref:"chlg_kotc_coop_kill",type:6,subType:20,period:0,goal:1,reward:200,conditional:10,value:null,valueTwo:null,tier:1,loc:{title:"Defender",desc:"Kill an egg from the Coop"}},{id:101,loc_ref:"chlg_kotc_coop_kill_victim_capturing",type:6,subType:20,period:0,goal:1,reward:200,conditional:10,value:"18",valueTwo:null,tier:1,loc:{title:"Offender",desc:"Kill an egg on a Coop"}},{id:102,loc_ref:"chlg_cts_pick_up",type:7,subType:21,period:0,goal:1,reward:200,conditional:null,value:null,valueTwo:null,tier:1,loc:{title:"Fry Cook",desc:"CTS: Pick up the Spatula"}},{id:103,loc_ref:"chlg_cts_capture_timeAlive_thirty",type:7,subType:21,period:0,goal:1,reward:500,conditional:7,value:"30",valueTwo:null,tier:2,loc:{title:"Keepaway",desc:"CTS: Hold the Spatula for 30s"}},{id:104,loc_ref:"chlg_cts_win_ten",type:7,subType:23,period:0,goal:20,reward:1e3,conditional:null,value:null,valueTwo:null,tier:1,loc:{title:"Sunny Side Up!",desc:"CTS: Gain 20+ kills holding the spatula"}},{id:105,loc_ref:"chlg_cts_win_twenty_five",type:7,subType:23,period:0,goal:50,reward:4e3,conditional:null,value:null,valueTwo:null,tier:2,loc:{title:"Flippin 'em",desc:"CTS: Gain 50+ kills holding the spatula"}},{id:106,loc_ref:"chlg_cts_win_fifty",type:7,subType:23,period:0,goal:100,reward:1e4,conditional:null,value:null,valueTwo:null,tier:3,loc:{title:"Makin' Bacon",desc:"CTS: Gain 100+ kills holding the spatula"}},{id:107,loc_ref:"chlg_cts_kills_victim_spatula",type:7,subType:10,period:0,goal:1,reward:200,conditional:null,value:null,valueTwo:null,tier:2,loc:{title:"Kill the Cook",desc:"CTS: Kill the Spatula holder"}},{id:108,loc_ref:"chlg_cts_kills_killstreak_five",type:7,subType:10,period:0,goal:1,reward:500,conditional:0,value:"5",valueTwo:null,tier:3,loc:{title:"Flippin' Dangerous",desc:"CTS: Get a 5 KS with the spatula"}}];export{l as Challenges};
1
+ export const Challenges=[{id:1,loc_ref:"chlg_kill_streak_five",type:0,subType:0,period:0,goal:1,reward:100,conditional:0,value:"5",valueTwo:null,tier:2,loc:{title:"Master Chef",desc:"Get a 5 killstreak"}},{id:2,loc_ref:"chlg_kill_streak_ten",type:0,subType:0,period:0,goal:1,reward:200,conditional:0,value:"10",valueTwo:null,tier:2,loc:{title:"Butcher",desc:"Get a 10 killstreak"}},{id:3,loc_ref:"chlg_kill_streak_fifteen",type:0,subType:0,period:0,goal:1,reward:500,conditional:0,value:"15",valueTwo:null,tier:3,loc:{title:"Eggsassin",desc:"Get a 15 killstreak"}},{id:4,loc_ref:"chlg_kill_streak_twenty",type:0,subType:0,period:0,goal:1,reward:1000,conditional:0,value:"20",valueTwo:null,tier:3,loc:{title:"Eggsecutioner",desc:"Get a 20 killstreak"}},{id:5,loc_ref:"chlg_kill_streak_fifty",type:0,subType:0,period:0,goal:1,reward:5000,conditional:0,value:"50",valueTwo:null,tier:3,loc:{title:"Shell Smasher",desc:"Get a 50 killstreak"}},{id:6,loc_ref:"chlg_kill_kills_ten",type:0,subType:10,period:0,goal:10,reward:100,conditional:null,value:null,valueTwo:null,tier:0,loc:{title:"Shell Shocker",desc:"Get 10 total kills"}},{id:7,loc_ref:"chlg_kill_kills_twenty",type:0,subType:10,period:0,goal:20,reward:200,conditional:null,value:null,valueTwo:null,tier:1,loc:{title:"Yolk Drinker",desc:"Get 20 total kills"}},{id:8,loc_ref:"chlg_kill_kills_fifty",type:0,subType:10,period:0,goal:50,reward:500,conditional:null,value:null,valueTwo:null,tier:2,loc:{title:"Clutch Master",desc:"Get 50 total kills"}},{id:9,loc_ref:"chlg_kill_kills_hundred",type:0,subType:10,period:0,goal:100,reward:1000,conditional:null,value:null,valueTwo:null,tier:3,loc:{title:"Eggsterminator",desc:"Get 100 total kills"}},{id:10,loc_ref:"chlg_kill_kills_two_fifty",type:0,subType:10,period:0,goal:250,reward:2500,conditional:null,value:null,valueTwo:null,tier:3,loc:{title:"Ovum Overlord",desc:"Get 250 total kills"}},{id:11,loc_ref:"chlg_kill_timePlayed_two",type:0,subType:6,period:0,goal:1,reward:100,conditional:null,value:"2",valueTwo:"60",tier:0,loc:{title:"Back to Back",desc:"Spawn and get 2 kills in 1 min"}},{id:12,loc_ref:"chlg_kill_timePlayed_four",type:0,subType:6,period:0,goal:1,reward:500,conditional:null,value:"4",valueTwo:"60",tier:2,loc:{title:"C-C-C-COMBO",desc:"Spawn and get 4 kills in 1 min"}},{id:13,loc_ref:"chlg_kill_timePlayed_seven",type:0,subType:6,period:0,goal:1,reward:1000,conditional:null,value:"7",valueTwo:"60",tier:3,loc:{title:"Eggcellerator",desc:"Spawn and get 7 kills in 1 min"}},{id:14,loc_ref:"chlg_kill_timePlayed_ten",type:0,subType:6,period:0,goal:1,reward:2500,conditional:null,value:"10",valueTwo:"60",tier:3,loc:{title:"Need for Speed",desc:"Spawn and get 10 kills in 1 min"}},{id:15,loc_ref:"chlg_kill_con_kill_one_shot",type:0,subType:8,period:0,goal:1,reward:100,conditional:11,value:"1",valueTwo:"1",tier:1,loc:{title:"Bullseye",desc:"Kill an egg with 1 shot"}},{id:16,loc_ref:"chlg_kill_con_kill_hp_ten",type:0,subType:8,period:0,goal:1,reward:500,conditional:12,value:"1",valueTwo:"10",tier:1,loc:{title:"Cutting it Close",desc:"Get a kill with less than 10 HP"}},{id:17,loc_ref:"chlg_kill_con_kill_five_streak",type:0,subType:8,period:0,goal:1,reward:1000,conditional:0,value:"0",valueTwo:"5",tier:2,loc:{title:"Soft Boiled",desc:"Kill an egg on a 5+ streak"}},{id:18,loc_ref:"chlg_kill_con_kill_ten_streak",type:0,subType:8,period:0,goal:1,reward:2500,conditional:0,value:"0",valueTwo:"10",tier:3,loc:{title:"Breaker-breaker",desc:"Kill an egg on a 10+ streak"}},{id:19,loc_ref:"chlg_kill_con_kill_scoped",type:0,subType:8,period:0,goal:1,reward:200,conditional:13,value:null,valueTwo:null,tier:2,loc:{title:"Eye 2 Eye",desc:"Snipe a zoomed-in sniper"}},{id:20,loc_ref:"chlg_kill_con_two_kills_one_shot",type:0,subType:8,period:0,goal:1,reward:200,conditional:16,value:"2",valueTwo:null,tier:2,loc:{title:"Collateral Damage",desc:"Kill two eggs at once"}},{id:21,loc_ref:"chlg_kill_con_reloading",type:0,subType:8,period:0,goal:1,reward:100,conditional:17,value:null,valueTwo:null,tier:1,loc:{title:"Owned",desc:"Kill an egg while they reload"}},{id:22,loc_ref:"chlg_kill_con_kill_scoped_melee",type:0,subType:8,period:0,goal:1,reward:200,conditional:13,value:null,valueTwo:"9",tier:2,loc:{title:"Behind You!",desc:"Melee kill a zoomed-in egg"}},{id:23,loc_ref:"chlg_kill_con_kill_two_grenade",type:0,subType:8,period:0,goal:1,reward:200,conditional:16,value:"2",valueTwo:"8",tier:2,loc:{title:"2 Birds 1 Stone",desc:"Kill 2 eggs with 1 Grenade"}},{id:24,loc_ref:"chlg_kill_con_kill_three_grenade",type:0,subType:8,period:0,goal:1,reward:1000,conditional:16,value:"3",valueTwo:"8",tier:3,loc:{title:"M-M-M-Multikill",desc:"Kill 3 eggs with 1 Grenade"}},{id:25,loc_ref:"chlg_kill_con_kill_two_rpegg",type:0,subType:8,period:0,goal:1,reward:200,conditional:16,value:"2",valueTwo:"4",tier:2,loc:{title:"Splash Damage",desc:"Kill 2 eggs with 1 RPEGG shot"}},{id:26,loc_ref:"chlg_kill_con_kill_three_rpegg",type:0,subType:8,period:0,goal:1,reward:1000,conditional:16,value:"3",valueTwo:"4",tier:3,loc:{title:"Big Boomer",desc:"Kill 3 eggs with 1 RPEGG shot"}},{id:27,loc_ref:"chlg_kill_weaponType_Cluck9mm_five",type:0,subType:1,period:0,goal:5,reward:200,conditional:null,value:null,valueTwo:"3",tier:1,loc:{title:"Pew Pew",desc:"Get 5 Cluck 9mm kills"}},{id:28,loc_ref:"chlg_kill_weaponType_Cluck9mm_ten",type:0,subType:1,period:0,goal:10,reward:500,conditional:null,value:null,valueTwo:"3",tier:1,loc:{title:"Trigger Happy",desc:"Get 10 Cluck 9mm kills"}},{id:29,loc_ref:"chlg_kill_weaponType_Cluck9mm_twenty",type:0,subType:1,period:0,goal:20,reward:1000,conditional:null,value:null,valueTwo:"3",tier:2,loc:{title:"Sidearm Specialist",desc:"Get 20 Cluck 9mm kills"}},{id:30,loc_ref:"chlg_kill_weaponType_Cluck9mm_fifty",type:0,subType:1,period:0,goal:50,reward:2500,conditional:null,value:null,valueTwo:"3",tier:3,loc:{title:"9mm Master",desc:"Get 50 Cluck 9mm kills"}},{id:31,loc_ref:"chlg_kill_weaponType_Scrambler_five",type:0,subType:1,period:0,goal:5,reward:100,conditional:null,value:null,valueTwo:"1",tier:1,loc:{title:"Scrambled Eggs",desc:"Get 5 Scrambler kills"}},{id:32,loc_ref:"chlg_kill_weaponType_Scrambler_ten",type:0,subType:1,period:0,goal:10,reward:200,conditional:null,value:null,valueTwo:"1",tier:1,loc:{title:"Hunting Wabbits",desc:"Get 10 Scrambler kills"}},{id:33,loc_ref:"chlg_kill_weaponType_Scrambler_twenty",type:0,subType:1,period:0,goal:20,reward:500,conditional:null,value:null,valueTwo:"1",tier:2,loc:{title:"Boomstick",desc:"Get 20 Scrambler kills"}},{id:34,loc_ref:"chlg_kill_weaponType_Scrambler_fifty",type:0,subType:1,period:0,goal:50,reward:1000,conditional:null,value:null,valueTwo:"1",tier:3,loc:{title:"Splat-o-matic",desc:"Get 50 Scrambler kills"}},{id:35,loc_ref:"chlg_kill_weaponType_Rpegg_five",type:0,subType:1,period:0,goal:5,reward:100,conditional:null,value:null,valueTwo:"4",tier:2,loc:{title:"Eggsploder",desc:"Get 5 RPEGG kills"}},{id:36,loc_ref:"chlg_kill_weaponType_Rpegg_ten",type:0,subType:1,period:0,goal:10,reward:200,conditional:null,value:null,valueTwo:"4",tier:2,loc:{title:"Arm Cannons",desc:"Get 10 RPEGG kills"}},{id:37,loc_ref:"chlg_kill_weaponType_Rpegg_twenty",type:0,subType:1,period:0,goal:20,reward:500,conditional:null,value:null,valueTwo:"4",tier:2,loc:{title:"Bazooka Joe",desc:"Get 20 RPEGG kills"}},{id:38,loc_ref:"chlg_kill_weaponType_Rpegg_fifty",type:0,subType:1,period:0,goal:50,reward:1000,conditional:null,value:null,valueTwo:"4",tier:3,loc:{title:"Master Eggsploder",desc:"Get 50 RPEGG kills"}},{id:39,loc_ref:"chlg_kill_weaponType_Whipper_five",type:0,subType:1,period:0,goal:5,reward:100,conditional:null,value:null,valueTwo:"5",tier:1,loc:{title:"Whip it Good",desc:"Get 5 Whipper kills"}},{id:40,loc_ref:"chlg_kill_weaponType_Whipper_ten",type:0,subType:1,period:0,goal:10,reward:200,conditional:null,value:null,valueTwo:"5",tier:1,loc:{title:"Cool Whip",desc:"Get 10 Whipper kills"}},{id:41,loc_ref:"chlg_kill_weaponType_Whipper_twenty",type:0,subType:1,period:0,goal:20,reward:500,conditional:null,value:null,valueTwo:"5",tier:2,loc:{title:"Whip it REAL Good",desc:"Get 20 Whipper kills"}},{id:42,loc_ref:"chlg_kill_weaponType_Whipper_fifty",type:0,subType:1,period:0,goal:50,reward:1000,conditional:null,value:null,valueTwo:"5",tier:3,loc:{title:"Whip up a Storm",desc:"Get 50 Whipper kills"}},{id:43,loc_ref:"chlg_kill_weaponType_Eggk47_five",type:0,subType:1,period:0,goal:5,reward:100,conditional:null,value:null,valueTwo:"0",tier:0,loc:{title:"Lock & Load",desc:"Get 5 EggK-47 kills"}},{id:44,loc_ref:"chlg_kill_weaponType_Eggk47_ten",type:0,subType:1,period:0,goal:10,reward:200,conditional:null,value:null,valueTwo:"0",tier:1,loc:{title:"Almost a Dozen",desc:"Get 10 EggK-47 kills"}},{id:45,loc_ref:"chlg_kill_weaponType_Eggk47_twenty",type:0,subType:1,period:0,goal:20,reward:500,conditional:null,value:null,valueTwo:"0",tier:2,loc:{title:"Spray Down",desc:"Get 20 EggK-47 kills"}},{id:46,loc_ref:"chlg_kill_weaponType_Eggk47_fifty",type:0,subType:1,period:0,goal:50,reward:1000,conditional:null,value:null,valueTwo:"0",tier:3,loc:{title:"Eggk-47 Eggspert",desc:"Get 50 EggK-47 kills"}},{id:47,loc_ref:"chlg_kill_weaponType_FreeRanger_five",type:0,subType:1,period:0,goal:5,reward:100,conditional:null,value:null,valueTwo:"2",tier:1,loc:{title:"Poacher",desc:"Get 5 Free Ranger kills"}},{id:48,loc_ref:"chlg_kill_weaponType_FreeRanger_ten",type:0,subType:1,period:0,goal:10,reward:200,conditional:null,value:null,valueTwo:"2",tier:1,loc:{title:"Bounty Hunter",desc:"Get 10 Free Ranger kills"}},{id:49,loc_ref:"chlg_kill_weaponType_FreeRanger_twenty",type:0,subType:1,period:0,goal:20,reward:500,conditional:null,value:null,valueTwo:"2",tier:2,loc:{title:"Hired Gun",desc:"Get 20 Free Ranger kills"}},{id:50,loc_ref:"chlg_kill_weaponType_FreeRanger_fifty",type:0,subType:1,period:0,goal:50,reward:1000,conditional:null,value:null,valueTwo:"2",tier:3,loc:{title:"Big-Game Hunter",desc:"Get 50 Free Ranger kills"}},{id:51,loc_ref:"chlg_kill_weaponType_Crackshot_five",type:0,subType:1,period:0,goal:5,reward:100,conditional:null,value:null,valueTwo:"6",tier:1,loc:{title:"Sniper",desc:"Get 5 Crackshot kills"}},{id:52,loc_ref:"chlg_kill_weaponType_Crackshot_ten",type:0,subType:1,period:0,goal:10,reward:200,conditional:null,value:null,valueTwo:"6",tier:1,loc:{title:"Sharpshooter",desc:"Get 10 Crackshot kills"}},{id:53,loc_ref:"chlg_kill_weaponType_Crackshot_twenty",type:0,subType:1,period:0,goal:20,reward:500,conditional:null,value:null,valueTwo:"6",tier:2,loc:{title:"Marksman",desc:"Get 20 Crackshot kills"}},{id:54,loc_ref:"chlg_kill_weaponType_Crackshot_fifty",type:0,subType:1,period:0,goal:50,reward:1000,conditional:null,value:null,valueTwo:"6",tier:3,loc:{title:"Cracked",desc:"Get 50 Crackshot kills"}},{id:55,loc_ref:"chlg_kill_weaponType_TriHard_five",type:0,subType:1,period:0,goal:5,reward:100,conditional:null,value:null,valueTwo:"7",tier:1,loc:{title:"Tri-Hard",desc:"Get 5 Tri-Hard kills"}},{id:56,loc_ref:"chlg_kill_weaponType_TriHard_ten",type:0,subType:1,period:0,goal:10,reward:200,conditional:null,value:null,valueTwo:"7",tier:1,loc:{title:"Tri-Harder",desc:"Get 10 Tri-Hard kills"}},{id:57,loc_ref:"chlg_kill_weaponType_TriHard_twenty",type:0,subType:1,period:0,goal:20,reward:500,conditional:null,value:null,valueTwo:"7",tier:2,loc:{title:"Tri-Even-Harder",desc:"Get 20 Tri-Hard kills"}},{id:58,loc_ref:"chlg_kill_weaponType_TriHard_fifty",type:0,subType:1,period:0,goal:50,reward:1000,conditional:null,value:null,valueTwo:"7",tier:3,loc:{title:"Tri-Hardest",desc:"Get 50 Tri-Hard kills"}},{id:59,loc_ref:"chlg_kill_weaponType_Melee_five",type:0,subType:1,period:0,goal:5,reward:200,conditional:null,value:null,valueTwo:"9",tier:2,loc:{title:"Whisky Business",desc:"Get 5 Melee kills"}},{id:60,loc_ref:"chlg_kill_weaponType_Melee_ten",type:0,subType:1,period:0,goal:10,reward:500,conditional:null,value:null,valueTwo:"9",tier:2,loc:{title:"Slap the Bass",desc:"Get 10 Melee kills"}},{id:61,loc_ref:"chlg_kill_weaponType_Melee_twenty",type:0,subType:1,period:0,goal:20,reward:1000,conditional:null,value:null,valueTwo:"9",tier:3,loc:{title:"Whack & Slash",desc:"Get 20 Melee kills"}},{id:62,loc_ref:"chlg_kill_weaponType_Melee_fifty",type:0,subType:1,period:0,goal:50,reward:2500,conditional:null,value:null,valueTwo:"9",tier:3,loc:{title:"Melee Master",desc:"Get 50 Melee kills"}},{id:63,loc_ref:"chlg_damage_five_hundred",type:1,subType:null,period:0,goal:500,reward:100,conditional:null,value:null,valueTwo:null,tier:0,loc:{title:"Shattered Shells",desc:"Deal 500 damage"}},{id:64,loc_ref:"chlg_damage_one_thousand",type:1,subType:null,period:0,goal:1000,reward:100,conditional:null,value:null,valueTwo:null,tier:1,loc:{title:"Decimator",desc:"Deal 1000 damage"}},{id:65,loc_ref:"chlg_damage_twenty_five_hundred",type:1,subType:null,period:0,goal:2500,reward:200,conditional:null,value:null,valueTwo:null,tier:1,loc:{title:"Tormentor",desc:"Deal 2500 damage"}},{id:66,loc_ref:"chlg_damage_five_thousand",type:1,subType:null,period:0,goal:5000,reward:500,conditional:null,value:null,valueTwo:null,tier:2,loc:{title:"Devastator",desc:"Deal 5000 damage"}},{id:67,loc_ref:"chlg_damage_ten_thousand",type:1,subType:null,period:0,goal:1e4,reward:1000,conditional:null,value:null,valueTwo:null,tier:3,loc:{title:"Boomsauce",desc:"Deal 10000 damage"}},{id:68,loc_ref:"chlg_damage_twenty_five_thousand",type:1,subType:null,period:0,goal:25000,reward:2500,conditional:null,value:null,valueTwo:null,tier:3,loc:{title:"Maximum Damage",desc:"Deal 25000 damage"}},{id:69,loc_ref:"chlg_deaths_ten",type:2,subType:null,period:0,goal:10,reward:100,conditional:null,value:null,valueTwo:null,tier:1,loc:{title:"Cracked",desc:"Die 10 times"}},{id:70,loc_ref:"chlg_deaths_twenty",type:2,subType:null,period:0,goal:20,reward:200,conditional:null,value:null,valueTwo:null,tier:1,loc:{title:"Fried",desc:"Die 20 times"}},{id:71,loc_ref:"chlg_deaths_fifty",type:2,subType:null,period:0,goal:50,reward:500,conditional:null,value:null,valueTwo:null,tier:2,loc:{title:"Death Wish",desc:"Die 50 times"}},{id:72,loc_ref:"chlg_movement_distance_five_hunderd",type:3,subType:3,period:0,goal:500,reward:100,conditional:null,value:null,valueTwo:null,tier:0,loc:{title:"Runny Egg",desc:"Travel 500m"}},{id:73,loc_ref:"chlg_movement_distance_one_thousand",type:3,subType:3,period:0,goal:1000,reward:500,conditional:null,value:null,valueTwo:null,tier:1,loc:{title:"Poultry in Motion",desc:"Travel 1000m"}},{id:74,loc_ref:"chlg_movement_distance_five_thousand",type:3,subType:3,period:0,goal:5000,reward:2500,conditional:null,value:null,valueTwo:null,tier:2,loc:{title:"Gaming Marathon",desc:"Travel 5000m"}},{id:75,loc_ref:"chlg_movement_jump_one_hundred",type:3,subType:4,period:0,goal:100,reward:100,conditional:null,value:null,valueTwo:null,tier:1,loc:{title:"Jumpman",desc:"Jump 100 times"}},{id:76,loc_ref:"chlg_movement_jump_five_hundred",type:3,subType:4,period:0,goal:500,reward:500,conditional:null,value:null,valueTwo:null,tier:1,loc:{title:"Bouncing Bomb",desc:"Jump 500 times"}},{id:77,loc_ref:"chlg_kill_jump_one",type:0,subType:4,period:0,goal:1,reward:200,conditional:null,value:null,valueTwo:null,tier:2,loc:{title:"Aerial Assault",desc:"Get a kill while jumping"}},{id:78,loc_ref:"chlg_kill_jump_five",type:0,subType:4,period:0,goal:5,reward:1000,conditional:null,value:null,valueTwo:null,tier:3,loc:{title:"Do a Barrel Roll",desc:"Get 5 kills while airborne"}},{id:79,loc_ref:"chlg_kill_jump_victim_jump",type:0,subType:4,period:0,goal:1,reward:2500,conditional:4,value:null,valueTwo:null,tier:3,loc:{title:"Aerial Acrobatics",desc:"Kill an egg while both airborne"}},{id:80,loc_ref:"chlg_movement_collect_ammo_ten",type:4,subType:18,period:0,goal:10,reward:100,conditional:16,value:"0",valueTwo:null,tier:1,loc:{title:"We Need Supplies!",desc:"Collect 10 ammo boxes"}},{id:81,loc_ref:"chlg_movement_collect_ammo_twenty_five",type:4,subType:18,period:0,goal:25,reward:500,conditional:16,value:"0",valueTwo:null,tier:2,loc:{title:"Quartermaster",desc:"Collect 25 ammo boxes"}},{id:82,loc_ref:"chlg_movement_collect_ammo_fifty",type:4,subType:18,period:0,goal:50,reward:1000,conditional:16,value:"0",valueTwo:null,tier:3,loc:{title:"Locked & Loaded",desc:"Collect 50 ammo boxes"}},{id:83,loc_ref:"chlg_movement_collect_grenade_ten",type:4,subType:18,period:0,goal:10,reward:100,conditional:17,value:"1",valueTwo:null,tier:1,loc:{title:"Explosives expert",desc:"Collect 10 grenades"}},{id:84,loc_ref:"chlg_movement_collect_grenade_twenty_five",type:4,subType:18,period:0,goal:25,reward:500,conditional:17,value:"1",valueTwo:null,tier:2,loc:{title:"Bombardier",desc:"Collect 25 grenades"}},{id:85,loc_ref:"chlg_movement_collect_grenade_fifty",type:4,subType:18,period:0,goal:50,reward:1000,conditional:17,value:"1",valueTwo:null,tier:3,loc:{title:"Explosive Temper",desc:"Collect 50 grenades"}},{id:86,loc_ref:"chlg_timed_timeAlive_thirty",type:5,subType:7,period:0,goal:1,reward:100,conditional:7,value:"30",valueTwo:null,tier:1,loc:{title:"Running Scared",desc:"Stay alive for 30 sec"}},{id:87,loc_ref:"chlg_timed_timeAlive_sixty",type:5,subType:7,period:0,goal:1,reward:200,conditional:7,value:"60",valueTwo:null,tier:2,loc:{title:"Hard to Beat",desc:"Stay alive for 1 min"}},{id:88,loc_ref:"chlg_timed_timeAlive_three_hundred",type:5,subType:7,period:0,goal:1,reward:2500,conditional:7,value:"300",valueTwo:null,tier:3,loc:{title:"Happily Ever After",desc:"Stay alive for 5 min"}},{id:90,loc_ref:"chlg_timed_timePlayed_three_hundred",type:5,subType:6,period:0,goal:300,reward:200,conditional:6,value:"300",valueTwo:null,tier:0,loc:{title:"Shell Shocked!",desc:"Play for 5 min"}},{id:91,loc_ref:"chlg_timed_timePlayed_nine_hundred",type:5,subType:6,period:0,goal:900,reward:500,conditional:6,value:"900",valueTwo:null,tier:1,loc:{title:"Not so Noob",desc:"Play for 15 min"}},{id:92,loc_ref:"chlg_timed_timePlayed_eighteen_hundred",type:5,subType:6,period:0,goal:1800,reward:1000,conditional:6,value:"1800",valueTwo:null,tier:2,loc:{title:"Oval Office",desc:"Play for 30 min"}},{id:93,loc_ref:"chlg_timed_timePlayed_thirty_six_hundred",type:5,subType:6,period:0,goal:3600,reward:2500,conditional:6,value:"3600",valueTwo:null,tier:3,loc:{title:"On That Grind",desc:"Play for 60 min"}},{id:94,loc_ref:"chlg_kotc_capturing_timeAlive_twenty",type:6,subType:20,period:0,goal:1,reward:100,conditional:7,value:"10",valueTwo:null,tier:1,loc:{title:"Hold the Fort",desc:"Stand on Coop for 10 sec"}},{id:95,loc_ref:"chlg_kotc_capture",type:6,subType:21,period:0,goal:1,reward:100,conditional:null,value:null,valueTwo:null,tier:1,loc:{title:"Coop King",desc:"Capture a Coop"}},{id:96,loc_ref:"chlg_kotc_win_one",type:6,subType:23,period:0,goal:1,reward:200,conditional:null,value:null,valueTwo:null,tier:1,loc:{title:"King of the Coop",desc:"Win a KotC match"}},{id:97,loc_ref:"chlg_kotc_win_three",type:6,subType:23,period:0,goal:3,reward:500,conditional:null,value:null,valueTwo:null,tier:2,loc:{title:"Team Sports",desc:"Win 3 KotC matches"}},{id:98,loc_ref:"chlg_kotc_win_five",type:6,subType:23,period:0,goal:5,reward:1000,conditional:null,value:null,valueTwo:null,tier:3,loc:{title:"Rule the Roost",desc:"Win 5 KotC matches"}},{id:99,loc_ref:"chlg_kotc_win_ten",type:6,subType:23,period:0,goal:10,reward:2500,conditional:null,value:null,valueTwo:null,tier:3,loc:{title:"Coop Commander",desc:"Win 10 KotC matches"}},{id:100,loc_ref:"chlg_kotc_coop_kill",type:6,subType:20,period:0,goal:1,reward:200,conditional:10,value:null,valueTwo:null,tier:1,loc:{title:"Defender",desc:"Kill an egg from the Coop"}},{id:101,loc_ref:"chlg_kotc_coop_kill_victim_capturing",type:6,subType:20,period:0,goal:1,reward:200,conditional:10,value:"18",valueTwo:null,tier:1,loc:{title:"Offender",desc:"Kill an egg on a Coop"}},{id:102,loc_ref:"chlg_cts_pick_up",type:7,subType:21,period:0,goal:1,reward:200,conditional:null,value:null,valueTwo:null,tier:1,loc:{title:"Fry Cook",desc:"CTS: Pick up the Spatula"}},{id:103,loc_ref:"chlg_cts_capture_timeAlive_thirty",type:7,subType:21,period:0,goal:1,reward:500,conditional:7,value:"30",valueTwo:null,tier:2,loc:{title:"Keepaway",desc:"CTS: Hold the Spatula for 30s"}},{id:104,loc_ref:"chlg_cts_win_ten",type:7,subType:23,period:0,goal:20,reward:1000,conditional:null,value:null,valueTwo:null,tier:1,loc:{title:"Sunny Side Up!",desc:"CTS: Gain 20+ kills holding the spatula"}},{id:105,loc_ref:"chlg_cts_win_twenty_five",type:7,subType:23,period:0,goal:50,reward:4000,conditional:null,value:null,valueTwo:null,tier:2,loc:{title:"Flippin 'em",desc:"CTS: Gain 50+ kills holding the spatula"}},{id:106,loc_ref:"chlg_cts_win_fifty",type:7,subType:23,period:0,goal:100,reward:1e4,conditional:null,value:null,valueTwo:null,tier:3,loc:{title:"Makin' Bacon",desc:"CTS: Gain 100+ kills holding the spatula"}},{id:107,loc_ref:"chlg_cts_kills_victim_spatula",type:7,subType:10,period:0,goal:1,reward:200,conditional:null,value:null,valueTwo:null,tier:2,loc:{title:"Kill the Cook",desc:"CTS: Kill the Spatula holder"}},{id:108,loc_ref:"chlg_cts_kills_killstreak_five",type:7,subType:10,period:0,goal:1,reward:500,conditional:0,value:"5",valueTwo:null,tier:3,loc:{title:"Flippin' Dangerous",desc:"CTS: Get a 5 KS with the spatula"}}];
@@ -1,3 +1 @@
1
- /* eslint-disable */
2
-
3
- var e=Object.defineProperty;var t=(s,i)=>e(s,"name",{value:i,configurable:!0});const a=class{static{t(this,"BaseGun")}constructor(){this.adsMod=.5,this.burst=0,this.burstRof=0,this.movementAccuracyMod=1,this.radius=0,this.reloadBloom=!0,this.reloadTimeMod=1,this.tracer=0}},c=class extends a{static{t(this,"_Eggk47")}constructor(){super(),this.ammo={rounds:30,capacity:30,reload:30,store:240,storeMax:240,pickup:30},this.longReloadTime=205,this.shortReloadTime=160,this.weaponName="EggK-47",this.internalName="Eggk47",this.standardMeshName="eggk47",this.automatic=!0,this.damage=30,this.range=20,this.recoil=7,this.rof=3,this.totalDamage=30,this.velocity=1.5,this.accuracyMin=.15,this.accuracyMax=.03,this.accuracyLoss=.05,this.accuracyRecover=.025,this.tracer=1}},o=class extends a{static{t(this,"_DozenGauge")}constructor(){super(),this.ammo={rounds:2,capacity:2,reload:2,store:24,storeMax:24,pickup:8},this.longReloadTime=155,this.shortReloadTime=155,this.weaponName="Scrambler",this.internalName="Dozen Gauge",this.standardMeshName="dozenGauge",this.automatic=!1,this.damage=8.5,this.range=8,this.recoil=10,this.rof=8,this.totalDamage=170,this.velocity=1,this.accuracyMin=.16,this.accuracyMax=.13,this.accuracyLoss=.17,this.accuracyRecover=.02,this.adsMod=.6,this.movementAccuracyMod=.2,this.tracer=0}},r=class extends a{static{t(this,"_CSG1")}constructor(){super(),this.ammo={rounds:15,capacity:15,reload:15,store:60,storeMax:60,pickup:15},this.longReloadTime=225,this.shortReloadTime=165,this.weaponName="Free Ranger",this.internalName="CSG-1",this.standardMeshName="csg1",this.automatic=!1,this.damage=105,this.range=50,this.recoil=13,this.rof=13,this.totalDamage=105,this.velocity=1.75,this.accuracyMin=.3,this.accuracyMax=.004,this.accuracyLoss=.3,this.accuracyRecover=.025,this.tracer=0}},h=class extends a{static{t(this,"_Cluck9mm")}constructor(){super(),this.ammo={rounds:15,capacity:15,reload:15,store:60,storeMax:60,pickup:15},this.longReloadTime=195,this.shortReloadTime=160,this.weaponName="Cluck 9mm",this.internalName="Cluck 9mm",this.standardMeshName="cluck9mm",this.automatic=!1,this.damage=26,this.range=15,this.recoil=6,this.rof=4,this.totalDamage=26,this.velocity=1,this.accuracyMin=.15,this.accuracyMax=.035,this.accuracyLoss=.09,this.accuracyRecover=.08,this.adsMod=.8,this.movementAccuracyMod=.6,this.tracer=0}},m=class extends a{static{t(this,"_RPEGG")}constructor(){super(),this.ammo={rounds:1,capacity:1,reload:1,store:3,storeMax:3,pickup:1},this.longReloadTime=170,this.shortReloadTime=170,this.weaponName="RPEGG",this.internalName="Eggsploder",this.standardMeshName="rpegg",this.automatic=!1,this.damage=140,this.range=45,this.recoil=60,this.rof=40,this.totalDamage=192.5,this.velocity=.4,this.accuracyMin=.3,this.accuracyMax=.015,this.accuracyLoss=.3,this.accuracyRecover=.02,this.radius=2.75}},n=class extends a{static{t(this,"_SMG")}constructor(){super(),this.ammo={rounds:40,capacity:40,reload:40,store:200,storeMax:200,pickup:40},this.longReloadTime=225,this.shortReloadTime=190,this.weaponName="Whipper",this.internalName="SMEGG",this.standardMeshName="smg",this.automatic=!0,this.damage=23,this.range=20,this.recoil=7,this.rof=2,this.totalDamage=23,this.velocity=1.25,this.accuracyMin=.19,this.accuracyMax=.06,this.accuracyLoss=.045,this.accuracyRecover=.05,this.adsMod=.6,this.movementAccuracyMod=.7,this.tracer=2}},u=class extends a{static{t(this,"_M24")}constructor(){super(),this.ammo={rounds:1,capacity:1,reload:1,store:12,storeMax:12,pickup:4},this.longReloadTime=144,this.shortReloadTime=144,this.weaponName="Crackshot",this.internalName="M2DZ",this.standardMeshName="m24",this.automatic=!0,this.damage=170,this.range=60,this.recoil=20,this.rof=15,this.totalDamage=170,this.velocity=2,this.accuracyMin=.35,this.accuracyMax=0,this.accuracyLoss=.1,this.accuracyRecover=.023,this.movementAccuracyMod=1.3,this.reloadBloom=!1,this.reloadTimeMod=.8,this.tracer=0}},l=class extends a{static{t(this,"_AUG")}constructor(){super(),this.ammo={rounds:24,capacity:24,reload:24,store:150,storeMax:150,pickup:24},this.longReloadTime=205,this.shortReloadTime=160,this.weaponName="Tri-Hard",this.internalName="AUG",this.standardMeshName="aug",this.automatic=!1,this.damage=32,this.range=20,this.recoil=18,this.rof=15,this.totalDamage=34,this.velocity=1.5,this.accuracyMin=.15,this.accuracyMax=.03,this.accuracyLoss=.037,this.accuracyRecover=.03,this.adsMod=.6,this.burst=3,this.burstRof=3,this.movementAccuracyMod=.8,this.movementInstability=2,this.tracer=0}};export{l as AUG,r as CSG1,h as Cluck9mm,o as DozenGauge,c as Eggk47,u as M24,m as RPEGG,n as SMG};
1
+ const s=class{constructor(){this.adsMod=0.5;this.burst=0;this.burstRof=0;this.movementAccuracyMod=1;this.radius=0;this.reloadBloom=!0;this.reloadTimeMod=1;this.tracer=0}},Eggk47=class t extends s{constructor(){super();this.ammo={rounds:30,capacity:30,reload:30,store:240,storeMax:240,pickup:30};this.longReloadTime=205;this.shortReloadTime=160;this.weaponName="EggK-47";this.internalName="Eggk47";this.standardMeshName="eggk47";this.automatic=!0;this.damage=30;this.range=20;this.recoil=7;this.rof=3;this.totalDamage=30;this.velocity=1.5;this.accuracyMin=0.15;this.accuracyMax=0.03;this.accuracyLoss=0.05;this.accuracyRecover=0.025;this.tracer=1}},DozenGauge=class t extends s{constructor(){super();this.ammo={rounds:2,capacity:2,reload:2,store:24,storeMax:24,pickup:8};this.longReloadTime=155;this.shortReloadTime=155;this.weaponName="Scrambler";this.internalName="Dozen Gauge";this.standardMeshName="dozenGauge";this.automatic=!1;this.damage=8.5;this.range=8;this.recoil=10;this.rof=8;this.totalDamage=170;this.velocity=1;this.accuracyMin=0.16;this.accuracyMax=0.13;this.accuracyLoss=0.17;this.accuracyRecover=0.02;this.adsMod=0.6;this.movementAccuracyMod=0.2;this.tracer=0}},CSG1=class t extends s{constructor(){super();this.ammo={rounds:15,capacity:15,reload:15,store:60,storeMax:60,pickup:15};this.longReloadTime=225;this.shortReloadTime=165;this.weaponName="Free Ranger";this.internalName="CSG-1";this.standardMeshName="csg1";this.automatic=!1;this.damage=105;this.range=50;this.recoil=13;this.rof=13;this.totalDamage=105;this.velocity=1.75;this.accuracyMin=0.3;this.accuracyMax=0.004;this.accuracyLoss=0.3;this.accuracyRecover=0.025;this.tracer=0}},Cluck9mm=class t extends s{constructor(){super();this.ammo={rounds:15,capacity:15,reload:15,store:60,storeMax:60,pickup:15};this.longReloadTime=195;this.shortReloadTime=160;this.weaponName="Cluck 9mm";this.internalName="Cluck 9mm";this.standardMeshName="cluck9mm";this.automatic=!1;this.damage=26;this.range=15;this.recoil=6;this.rof=4;this.totalDamage=26;this.velocity=1;this.accuracyMin=0.15;this.accuracyMax=0.035;this.accuracyLoss=0.09;this.accuracyRecover=0.08;this.adsMod=0.8;this.movementAccuracyMod=0.6;this.tracer=0}},RPEGG=class t extends s{constructor(){super();this.ammo={rounds:1,capacity:1,reload:1,store:3,storeMax:3,pickup:1};this.longReloadTime=170;this.shortReloadTime=170;this.weaponName="RPEGG";this.internalName="Eggsploder";this.standardMeshName="rpegg";this.automatic=!1;this.damage=140;this.range=45;this.recoil=60;this.rof=40;this.totalDamage=192.5;this.velocity=0.4;this.accuracyMin=0.3;this.accuracyMax=0.015;this.accuracyLoss=0.3;this.accuracyRecover=0.02;this.radius=2.75}},SMG=class t extends s{constructor(){super();this.ammo={rounds:40,capacity:40,reload:40,store:200,storeMax:200,pickup:40};this.longReloadTime=225;this.shortReloadTime=190;this.weaponName="Whipper";this.internalName="SMEGG";this.standardMeshName="smg";this.automatic=!0;this.damage=23;this.range=20;this.recoil=7;this.rof=2;this.totalDamage=23;this.velocity=1.25;this.accuracyMin=0.19;this.accuracyMax=0.06;this.accuracyLoss=0.045;this.accuracyRecover=0.05;this.adsMod=0.6;this.movementAccuracyMod=0.7;this.tracer=2}},M24=class t extends s{constructor(){super();this.ammo={rounds:1,capacity:1,reload:1,store:12,storeMax:12,pickup:4};this.longReloadTime=144;this.shortReloadTime=144;this.weaponName="Crackshot";this.internalName="M2DZ";this.standardMeshName="m24";this.automatic=!0;this.damage=170;this.range=60;this.recoil=20;this.rof=15;this.totalDamage=170;this.velocity=2;this.accuracyMin=0.35;this.accuracyMax=0;this.accuracyLoss=0.1;this.accuracyRecover=0.023;this.movementAccuracyMod=1.3;this.reloadBloom=!1;this.reloadTimeMod=0.8;this.tracer=0}},AUG=class t extends s{constructor(){super();this.ammo={rounds:24,capacity:24,reload:24,store:150,storeMax:150,pickup:24};this.longReloadTime=205;this.shortReloadTime=160;this.weaponName="Tri-Hard";this.internalName="AUG";this.standardMeshName="aug";this.automatic=!1;this.damage=32;this.range=20;this.recoil=18;this.rof=15;this.totalDamage=34;this.velocity=1.5;this.accuracyMin=0.15;this.accuracyMax=0.03;this.accuracyLoss=0.037;this.accuracyRecover=0.03;this.adsMod=0.6;this.burst=3;this.burstRof=3;this.movementAccuracyMod=0.8;this.movementInstability=2;this.tracer=0}};export{Eggk47,DozenGauge,CSG1,Cluck9mm,RPEGG,SMG,M24,AUG};
@@ -1,3 +1 @@
1
- /* eslint-disable */
2
-
3
- import e from"../env/globals.js";import{AUG as t,CSG1 as o,DozenGauge as a,Eggk47 as r,M24 as n,RPEGG as i,SMG as l}from"./guns.js";import{findItemById as W}from"./findItemById.js";const p={FiveMinutes:0,FifteenMinutes:1,OneHour:2},m={Killstreak:0,KillWithWeapon:1,MovementDistance:3,Jumping:4,TimePlayed:6,TimeAlive:7,KillWithCondition:8,TotalKills:10,SpatulaKills:10,Collecting:18,FromTheCoop:20,SpecialOffensive:21,WinKOTC:23,KillWithSpatula:23},d={Kill:0,Damage:1,Death:2,Movement:3,Collect:4,Time:5,KOTC:6,Spatula:7},S={None:0,Pinned:2,Team:4,Mod:254,Server:255},g=3,T={Ammo:0,Grenade:1},u={Start:0,Score:1,Win:2,Capturing:3,Contested:4,Takeover:5,Abandoned:6,Unclaimed:7},x="AIzaSyDP4SIjKaw6A4c-zvfYxICpbEjn1rRnN50",w=3,k={Reset:1,Pause:2},C={FFA:0,Team:1,Spatula:2,KOTC:3},h={Locked:1,NoTeamChange:2,NoTeamShuffle:4},M=13,G=[r,a,o,i,l,n,t],f={Hat:1,Stamp:2,Primary:3,Secondary:4,Grenade:6,Melee:7},v={Forward:1,Backward:2,Left:4,Right:8,Jump:16,Fire:32,Melee:64,Scope:128},y={JoinPublic:0,CreatePrivate:1,JoinPrivate:2},F={HardBoiled:1,EggBreaker:2,Restock:4,OverHeal:8,DoubleEggs:16,MiniEgg:32},K={Facebook:0,Instagram:1,Tiktok:2,Discord:3,Youtube:4,Twitter:5,Twitch:6},B={Discord:"rew_1200",Tiktok:"rew_1208",Instagram:"rew_1219",Steam:"rew_1223",Facebook:"rew_1227",Twitter:"rew_1234",Twitch:"rew_twitch_social"},R=256,b={Blue:1,Red:2},A=["giveBasketBrosReward","mercZoneFinalGift","midMonthGiveMeEggs","newYolkerSignupReward","newYolkerItemReward","newYolkerWelcomeBack","WelcomeBack"],D=e.isBrowser?null:"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";export{p as BanDuration,m as ChallengeSubType,d as ChallengeType,S as ChatFlag,g as ChiknWinnerDailyLimit,T as CollectType,u as CoopState,x as FirebaseKey,w as FramesBetweenSyncs,k as GameAction,C as GameMode,h as GameOptionFlag,M as GunEquipTime,G as GunList,f as ItemType,v as Movement,y as PlayType,F as ShellStreak,K as SocialMedia,B as SocialReward,R as StateBufferSize,b as Team,A as URLRewards,D as UserAgent,W as findItemById};
1
+ import e from"../env/globals.js";import{AUG as t,CSG1 as o,DozenGauge as a,Eggk47 as r,M24 as n,RPEGG as i,SMG as l}from"./guns.js";export{findItemById}from"./findItemById.js";export const BanDuration={FiveMinutes:0,FifteenMinutes:1,OneHour:2},ChallengeSubType={Killstreak:0,KillWithWeapon:1,MovementDistance:3,Jumping:4,TimePlayed:6,TimeAlive:7,KillWithCondition:8,TotalKills:10,SpatulaKills:10,Collecting:18,FromTheCoop:20,SpecialOffensive:21,WinKOTC:23,KillWithSpatula:23},ChallengeType={Kill:0,Damage:1,Death:2,Movement:3,Collect:4,Time:5,KOTC:6,Spatula:7},ChatFlag={None:0,Pinned:2,Team:4,Mod:254,Server:255},ChiknWinnerDailyLimit=3,CollectType={Ammo:0,Grenade:1},CoopState={Start:0,Score:1,Win:2,Capturing:3,Contested:4,Takeover:5,Abandoned:6,Unclaimed:7},FirebaseKey="AIzaSyDP4SIjKaw6A4c-zvfYxICpbEjn1rRnN50",FramesBetweenSyncs=3,GameAction={Reset:1,Pause:2},GameMode={FFA:0,Team:1,Spatula:2,KOTC:3},GameOptionFlag={Locked:1,NoTeamChange:2,NoTeamShuffle:4},GunEquipTime=13,GunList=[r,a,o,i,l,n,t],ItemType={Hat:1,Stamp:2,Primary:3,Secondary:4,Grenade:6,Melee:7},Movement={Forward:1,Backward:2,Left:4,Right:8,Jump:16,Fire:32,Melee:64,Scope:128},PlayType={JoinPublic:0,CreatePrivate:1,JoinPrivate:2},ShellStreak={HardBoiled:1,EggBreaker:2,Restock:4,OverHeal:8,DoubleEggs:16,MiniEgg:32},SocialMedia={Facebook:0,Instagram:1,Tiktok:2,Discord:3,Youtube:4,Twitter:5,Twitch:6},SocialReward={Discord:"rew_1200",Tiktok:"rew_1208",Instagram:"rew_1219",Steam:"rew_1223",Facebook:"rew_1227",Twitter:"rew_1234",Twitch:"rew_twitch_social"},StateBufferSize=256,Team={Blue:1,Red:2},URLRewards=["giveBasketBrosReward","mercZoneFinalGift","midMonthGiveMeEggs","newYolkerSignupReward","newYolkerItemReward","newYolkerWelcomeBack","WelcomeBack"],UserAgent=e.isBrowser?null:"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";