yolkbot 0.1.0 → 0.1.1-alpha.3

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.
@@ -7,8 +7,6 @@ const calculateYaw = (pos) => setPrecision(mod(Math.atan2(-pos.x, -pos.z), PI2))
7
7
  const calculatePitch = (pos) => setPrecision(Math.atan2(pos.y, Math.hypot(pos.x, pos.z)));
8
8
 
9
9
  export class LookAtPosDispatch {
10
- idOrName;
11
-
12
10
  constructor(pos) {
13
11
  this.pos = pos;
14
12
  }
@@ -0,0 +1,18 @@
1
+ export class LookDispatch2 {
2
+ check(bot) {
3
+ return bot.me.playing;
4
+ }
5
+
6
+ execute(bot) {
7
+ let x = 0;
8
+
9
+ (() => setInterval(() => {
10
+ x += 0.1;
11
+ x %= 2 * Math.PI;
12
+ bot.me.view.yaw = x - Math.PI;
13
+ bot.me.view.pitch = x;
14
+ }, 20))();
15
+ }
16
+ }
17
+
18
+ export default LookDispatch2;
@@ -92,7 +92,7 @@ export class SaveLoadoutDispatch {
92
92
  if (bot.state.joinedGame)
93
93
  new packet.ChangeCharacterPacket(this.changes?.classIdx || bot.me.selectedGun).execute(bot.game.socket);
94
94
 
95
- const findCosmetics = this.intents.includes(this.Intents.COSMETIC_DATA);
95
+ const findCosmetics = bot.intents.includes(bot.Intents.COSMETIC_DATA);
96
96
 
97
97
  // apply changes to the bot
98
98
  Object.entries(this.changes).forEach(([changeKey, changeValue]) => {
@@ -1,6 +1,7 @@
1
1
  import { NodeList } from '../pathing/mapnode.js';
2
2
 
3
3
  import { Character, GamePlayer } from './bot/GamePlayer';
4
+ import { Challenge } from './constants/challenges';
4
5
  import { AnyGun } from './constants/guns';
5
6
  import { Map } from './constants/maps';
6
7
  import { ADispatch } from './dispatches/index';
@@ -22,6 +23,44 @@ export interface ChiknWinnerStatus {
22
23
  canPlayAgain: number;
23
24
  }
24
25
 
26
+ export interface StatKD {
27
+ total: number;
28
+ mode: {
29
+ public: number;
30
+ private: number;
31
+ };
32
+ dmgType: {
33
+ pistol: number;
34
+ grenade: number;
35
+ rpegg: number;
36
+ eggk: number;
37
+ scrambler: number;
38
+ ranger: number;
39
+ whpper: number;
40
+ crackshot: number;
41
+ trihard: number;
42
+ melee: number;
43
+ };
44
+ gameType: {
45
+ kotc: number;
46
+ spatula: number;
47
+ ffa: number;
48
+ team: number;
49
+ }
50
+ }
51
+
52
+ export interface Stats {
53
+ streak: number;
54
+ kills: StatKD;
55
+ deaths: StatKD;
56
+ gameType: {
57
+ kotc: {
58
+ captured: number;
59
+ wins: number;
60
+ }
61
+ };
62
+ }
63
+
25
64
  export interface Account {
26
65
  id: number;
27
66
  firebaseId: string;
@@ -45,7 +84,12 @@ export interface Account {
45
84
  accountAge: number;
46
85
  emailVerified: boolean;
47
86
  eggBalance: number;
48
- rawLoginData: any; // i ain't typoing allat
87
+ stats: {
88
+ lifetime: Stats;
89
+ monthly: Stats;
90
+ }
91
+ challenges: Challenge[];
92
+ rawLoginData: any; // i ain't typing allat
49
93
  }
50
94
 
51
95
  export interface GameOptions {
@@ -0,0 +1,19 @@
1
+ export interface Challenge {
2
+ id: number;
3
+ loc_ref: string;
4
+ type: number;
5
+ subType: number;
6
+ period: number;
7
+ goal: number;
8
+ reward: number;
9
+ conditional: number;
10
+ value: string;
11
+ valueTwo: string | null;
12
+ tier: number;
13
+ loc: {
14
+ title: string;
15
+ desc: string;
16
+ }
17
+ }
18
+
19
+ export type Challenges = Challenge[];