@killscript/types 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,755 @@
1
+ export {};
2
+ declare global {
3
+ type LuaPrimitive = string | number | boolean | undefined;
4
+ type LuaTableData = {
5
+ readonly [key: string]: LuaValue;
6
+ } | readonly LuaValue[];
7
+ type LuaValue = LuaPrimitive | LuaTableData;
8
+ type LuaCallback = (...args: readonly unknown[]) => void;
9
+ type EHitType = 0 | 1 | 2 | 3 | 4 | 5 | 6;
10
+ const EHitType: {
11
+ readonly None: 0;
12
+ readonly Regular: 1;
13
+ readonly Critical: 2;
14
+ readonly Fatal: 3;
15
+ readonly FriendlyFire: 4;
16
+ readonly KineticShield: 5;
17
+ readonly Stunned: 6;
18
+ };
19
+ type EHitboxBodyPart = 0 | 1 | 2 | 3 | 4;
20
+ const EHitboxBodyPart: {
21
+ readonly None: 0;
22
+ readonly Head: 1;
23
+ readonly Body: 2;
24
+ readonly Arm: 3;
25
+ readonly Leg: 4;
26
+ };
27
+ type EInputButton = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17;
28
+ const EInputButton: {
29
+ readonly Jump: 0;
30
+ readonly Crouch: 1;
31
+ readonly Walk: 2;
32
+ readonly Fire: 3;
33
+ readonly AlternateFire: 4;
34
+ readonly Reload: 5;
35
+ readonly PrimaryWeapon: 6;
36
+ readonly SecondaryWeapon: 7;
37
+ readonly Knife: 8;
38
+ readonly BridgeCharge: 9;
39
+ readonly CycleGrenade: 10;
40
+ readonly FragGrenade: 11;
41
+ readonly Incendiary: 12;
42
+ readonly Sonar: 13;
43
+ readonly EmpGrenade: 14;
44
+ readonly PowerShell: 15;
45
+ readonly DropItem: 16;
46
+ readonly Interact: 17;
47
+ };
48
+ interface AgentsApi {
49
+ GetAll(): LuaArray<Agent>;
50
+ GetAllies(): LuaArray<Agent>;
51
+ GetEnemies(): LuaArray<Agent>;
52
+ GetLocalAgent(): Agent | undefined;
53
+ GetLocalOrSpectatedAgent(): Agent | undefined;
54
+ }
55
+ type Agents = AgentsApi;
56
+ const Agents: AgentsApi;
57
+ interface AgentInputApi {
58
+ GetLookRotation(): Vector2;
59
+ GetMoveDirection(): Vector2;
60
+ IsButtonDown(inputButton: EInputButton): boolean;
61
+ IsJustPressed(inputButton: EInputButton): boolean;
62
+ SetButtonState(inputButton: EInputButton, down: boolean): void;
63
+ SetLookRotation(vector: Vector2): void;
64
+ SetMoveDirection(vector: Vector2): void;
65
+ }
66
+ type AgentInput = AgentInputApi;
67
+ const AgentInput: AgentInputApi;
68
+ interface Agent extends Entity {
69
+ readonly Aim: Aim;
70
+ readonly Color: Color;
71
+ readonly Health: Health;
72
+ readonly Interactor: Interactor;
73
+ readonly Inventory: Inventory;
74
+ readonly Movement: Movement;
75
+ readonly Nickname: string;
76
+ readonly Number: number;
77
+ readonly OcclusionCulling: OcclusionCulling;
78
+ readonly Stats: AgentStats;
79
+ readonly Team: Team;
80
+ GetHitboxes(): LuaArray<Hitbox>;
81
+ }
82
+ interface Aim {
83
+ readonly AccumulatedUncertainty: number;
84
+ readonly AimingDownSightsProgress: number;
85
+ readonly Direction: Vector3;
86
+ readonly IsAimingDownSights: boolean;
87
+ readonly IsStunned: boolean;
88
+ readonly IsStunnedVisually: boolean;
89
+ readonly LastStunDuration: number;
90
+ readonly MovementSpeedUncertainty: number;
91
+ readonly Position: Vector3;
92
+ readonly StunnedUntilTick: number;
93
+ readonly StunnedVisuallyUntilTick: number;
94
+ readonly Target: Agent | undefined;
95
+ readonly TargetPosition: Vector3;
96
+ readonly TotalUncertainty: number;
97
+ }
98
+ interface Health {
99
+ readonly CurrentHealth: number;
100
+ readonly CurrentHealthPrecise: number;
101
+ readonly IsAlive: boolean;
102
+ readonly MaxHealth: number;
103
+ }
104
+ interface Hitbox {
105
+ readonly Agent: Agent | undefined;
106
+ readonly BodyPart: EHitboxBodyPart;
107
+ readonly IsBox: boolean;
108
+ readonly IsSphere: boolean;
109
+ readonly IsVisible: boolean;
110
+ readonly Position: Vector3;
111
+ readonly Radius: number;
112
+ readonly Rotation: Quaternion;
113
+ readonly Size: Vector3;
114
+ }
115
+ interface Interactable {
116
+ readonly ActionName: string;
117
+ readonly AsDrop: Drop | undefined;
118
+ readonly AsPlantedBridgeCharge: PlantedBridgeCharge | undefined;
119
+ readonly IsDrop: boolean;
120
+ readonly IsPlantedBridgeCharge: boolean;
121
+ readonly IsVisible: boolean;
122
+ CanInteract(agent: Agent): boolean;
123
+ GetInteractDuration(agent: Agent): number;
124
+ }
125
+ interface Interactor {
126
+ readonly AvailableInteractable: Interactable | undefined;
127
+ readonly InteractActionName: string;
128
+ readonly InteractProgress: number;
129
+ readonly IsDefusing: boolean;
130
+ readonly IsInteracting: boolean;
131
+ }
132
+ interface Inventory {
133
+ readonly CurrentItem: Item | undefined;
134
+ readonly IsSwitching: boolean;
135
+ readonly SwitchingUntil: number;
136
+ GetItem(slot: EItemSlot): Item | undefined;
137
+ GetItems(): LuaArray<Item>;
138
+ GetItemsInSlot(slot: EItemSlot): LuaArray<Item>;
139
+ IsSlotEmpty(slot: EItemSlot): boolean;
140
+ }
141
+ interface Movement {
142
+ readonly CrouchJumpCooldownUntil: number;
143
+ readonly CrouchProgress: number;
144
+ readonly IsCrouching: boolean;
145
+ readonly IsGrounded: boolean;
146
+ readonly IsWalking: boolean;
147
+ readonly JumpCooldownUntil: number;
148
+ readonly Position: Vector3;
149
+ readonly Velocity: Vector3;
150
+ GetZones(): LuaArray<string>;
151
+ }
152
+ interface OcclusionCulling {
153
+ readonly SoundRange: number;
154
+ }
155
+ interface AgentStats {
156
+ IsAlive: boolean;
157
+ Money: number;
158
+ Kills: number;
159
+ Assists: number;
160
+ Deaths: number;
161
+ Damage: number;
162
+ DeathTick: number;
163
+ Ping: number;
164
+ IsConnected: boolean;
165
+ }
166
+ interface DamageEvent {
167
+ Damage: number;
168
+ DamageTick: number;
169
+ DamagePosition: Vector3;
170
+ DamageDirection: Vector3;
171
+ DamageDirectionFromHead: Vector3;
172
+ WasStunned: boolean;
173
+ StunnedUntilTick: number;
174
+ }
175
+ interface DeathEvent {
176
+ Killer: string;
177
+ Victim: string;
178
+ WeaponId: number;
179
+ IsCritical: boolean;
180
+ }
181
+ interface HitEvent {
182
+ HitType: EHitType;
183
+ HitTick: number;
184
+ HitEventId: number;
185
+ Damage: number;
186
+ WasStunned: boolean;
187
+ StunnedUntilTick: number;
188
+ }
189
+ interface Sound {
190
+ }
191
+ type EDefusalRoundStage = 0 | 1 | 2 | 3;
192
+ const EDefusalRoundStage: {
193
+ readonly None: 0;
194
+ readonly Buy: 1;
195
+ readonly Fight: 2;
196
+ readonly End: 3;
197
+ };
198
+ interface DefusalGameApi {
199
+ readonly BridgeChargeExplosionRemainingTicks: number;
200
+ readonly BridgerFrontTeam: Team;
201
+ readonly BridgerFrontTeamTexture: Texture;
202
+ readonly IsBridgeChargeDefused: boolean;
203
+ readonly IsBridgeChargeExploded: boolean;
204
+ readonly IsBridgeChargePlanted: boolean;
205
+ readonly IsGameEnded: boolean;
206
+ readonly IsOvertime: boolean;
207
+ readonly IsRoundBeforeSwap: boolean;
208
+ readonly IsRoundTimeOver: boolean;
209
+ readonly IsTeamSwapping: boolean;
210
+ readonly IsWarmupTimerActive: boolean;
211
+ readonly KillScriptCompanyTeam: Team;
212
+ readonly KillScriptCompanyTeamTexture: Texture;
213
+ readonly RoundId: number;
214
+ readonly RoundWinnerTeam: Team;
215
+ readonly Stage: EDefusalRoundStage;
216
+ readonly StageRemainingTicks: number;
217
+ readonly WarmupRemainingTicks: number;
218
+ GetMatchRoundsLog(): LuaArray<DefusalRoundState>;
219
+ }
220
+ type DefusalGame = DefusalGameApi;
221
+ const DefusalGame: DefusalGameApi;
222
+ interface DefusalRoundState {
223
+ readonly RoundId: number;
224
+ readonly Stage: EDefusalRoundStage;
225
+ readonly IsBridgeChargePlanted: boolean;
226
+ readonly IsBridgeChargeDefused: boolean;
227
+ readonly IsBridgeChargeExploded: boolean;
228
+ readonly IsRoundTimeOver: boolean;
229
+ readonly IsTeamSwapping: boolean;
230
+ readonly RoundWinnerTeam: Team;
231
+ }
232
+ interface ExplosionsApi {
233
+ GetAll(): LuaArray<Explosion>;
234
+ GetEMPGrenadeExplosions(): LuaArray<EMPGrenadeExplosion>;
235
+ GetFragGrenadeExplosions(): LuaArray<FragGrenadeExplosion>;
236
+ GetIncendiaryExplosions(): LuaArray<IncendiaryExplosion>;
237
+ GetPowerShellExplosions(): LuaArray<PowerShellExplosion>;
238
+ GetSonarExplosions(): LuaArray<SonarExplosion>;
239
+ }
240
+ type Explosions = ExplosionsApi;
241
+ const Explosions: ExplosionsApi;
242
+ interface PlantedBridgeChargesApi {
243
+ GetPlanted(): LuaArray<PlantedBridgeCharge>;
244
+ }
245
+ type PlantedBridgeCharges = PlantedBridgeChargesApi;
246
+ const PlantedBridgeCharges: PlantedBridgeChargesApi;
247
+ interface ThrownProjectilesApi {
248
+ GetAll(): LuaArray<ThrownProjectile>;
249
+ }
250
+ type ThrownProjectiles = ThrownProjectilesApi;
251
+ const ThrownProjectiles: ThrownProjectilesApi;
252
+ interface EMPGrenadeExplosion extends Explosion {
253
+ }
254
+ interface Entity {
255
+ readonly ID: number;
256
+ readonly IsVisible: boolean;
257
+ readonly Name: string;
258
+ readonly Position: Vector3;
259
+ }
260
+ interface Explosion extends Entity {
261
+ readonly AsEMPGrenadeExplosion: EMPGrenadeExplosion | undefined;
262
+ readonly AsFragGrenadeExplosion: FragGrenadeExplosion | undefined;
263
+ readonly AsIncendiaryExplosion: IncendiaryExplosion | undefined;
264
+ readonly AsPowerShellExplosion: PowerShellExplosion | undefined;
265
+ readonly AsSonarExplosion: SonarExplosion | undefined;
266
+ readonly Instigator: Agent;
267
+ readonly IsEMPGrenadeExplosion: boolean;
268
+ readonly IsFragGrenadeExplosion: boolean;
269
+ readonly IsIncendiaryExplosion: boolean;
270
+ readonly IsPowerShellExplosion: boolean;
271
+ readonly IsSonarExplosion: boolean;
272
+ readonly ThrowableConfig: ConfigItemThrowable | undefined;
273
+ readonly ToDespawnTicks: number;
274
+ }
275
+ interface FragGrenadeExplosion extends Explosion {
276
+ }
277
+ interface IncendiaryExplosion extends Explosion {
278
+ }
279
+ interface PlantedBridgeCharge extends Entity {
280
+ readonly Icon: Texture;
281
+ }
282
+ interface PowerShellExplosion extends Explosion {
283
+ readonly ShellDurability: number;
284
+ readonly ShellMaxDurability: number;
285
+ }
286
+ interface SonarExplosion extends Explosion {
287
+ }
288
+ interface ThrownProjectile extends Entity {
289
+ readonly IsExploded: boolean;
290
+ readonly ThrowableConfig: ConfigItemThrowable;
291
+ readonly ThrownAtTick: number;
292
+ readonly ThrownBy: Agent;
293
+ readonly Velocity: Vector3;
294
+ }
295
+ interface CpuLimitApi {
296
+ readonly CpuCycleLimit: number;
297
+ readonly RemainingCpuCycles: number;
298
+ readonly RemainingCpuTime: number;
299
+ }
300
+ type CpuLimit = CpuLimitApi;
301
+ const CpuLimit: CpuLimitApi;
302
+ interface MapInfoApi {
303
+ readonly BasementBottomY: number;
304
+ readonly BasementTopY: number;
305
+ readonly MapCameraHeight: number;
306
+ readonly MapCenter: Vector3;
307
+ readonly MapName: string;
308
+ readonly MapSize: number;
309
+ GetZones(position: Vector3): LuaArray<string>;
310
+ }
311
+ type MapInfo = MapInfoApi;
312
+ const MapInfo: MapInfoApi;
313
+ /** @noSelf */
314
+ interface ConfigConstantApi {
315
+ readonly AirAcceleration: number;
316
+ readonly AirFriction: number;
317
+ readonly BombSoundRadius: number;
318
+ readonly CrouchJumpHorizontalImpulse: number;
319
+ readonly CrouchJumpVerticalImpulse: number;
320
+ readonly CrouchSpeed: number;
321
+ readonly CrouchStabilizationFactor: number;
322
+ readonly CrouchSwitchTime: number;
323
+ readonly CrouchUncertaintyLossFactor: number;
324
+ readonly DefusalAgentsPerTeam: number;
325
+ readonly DefusalBombDefuseNoDefuserTime: number;
326
+ readonly DefusalBombDefuseWithDefuserTime: number;
327
+ readonly DefusalBombExplosionExpansionTime: number;
328
+ readonly DefusalBombExplosionRadius: number;
329
+ readonly DefusalBombExplosionTime: number;
330
+ readonly DefusalBombPlantTime: number;
331
+ readonly DefusalLateBuyDuration: number;
332
+ readonly DefusalMoneyDefuse: number;
333
+ readonly DefusalMoneyLimitCT: number;
334
+ readonly DefusalMoneyLimitT: number;
335
+ readonly DefusalMoneyLose0CT: number;
336
+ readonly DefusalMoneyLose0T: number;
337
+ readonly DefusalMoneyLose1CT: number;
338
+ readonly DefusalMoneyLose1T: number;
339
+ readonly DefusalMoneyLose2CT: number;
340
+ readonly DefusalMoneyLose2T: number;
341
+ readonly DefusalMoneyLose3CT: number;
342
+ readonly DefusalMoneyLose3T: number;
343
+ readonly DefusalMoneyLose4CT: number;
344
+ readonly DefusalMoneyLose4T: number;
345
+ readonly DefusalMoneyLosePlantBonus: number;
346
+ readonly DefusalMoneyPlant: number;
347
+ readonly DefusalMoneyStartCT: number;
348
+ readonly DefusalMoneyStartT: number;
349
+ readonly DefusalMoneyWinBombDefusal: number;
350
+ readonly DefusalMoneyWinBombDetonation: number;
351
+ readonly DefusalMoneyWinTeamEliminationCT: number;
352
+ readonly DefusalMoneyWinTeamEliminationT: number;
353
+ readonly DefusalMoneyWinTimeOver: number;
354
+ readonly DefusalRoundsPerSide: number;
355
+ readonly DefusalRoundsToWin: number;
356
+ readonly DefusalStageBuyDuration: number;
357
+ readonly DefusalStageEnd_SwapDuration: number;
358
+ readonly DefusalStageEndDuration: number;
359
+ readonly DefusalStageFightDuration: number;
360
+ readonly DefusalTimeoutDuration: number;
361
+ readonly DefusalTimeoutLimit: number;
362
+ readonly DefuseSoundRadius: number;
363
+ readonly DelayCrouchJump: number;
364
+ readonly DynamicAirFriction: number;
365
+ readonly DynamicGroundFriction: number;
366
+ readonly FireDamageInitial: number;
367
+ readonly FireDamageMax: number;
368
+ readonly FireDamageTimeToMaxDamage: number;
369
+ readonly FireStoppingPower: number;
370
+ readonly FireUncertaintyGainPerSecond: number;
371
+ readonly FireUncertaintyLimit: number;
372
+ readonly GrenadeCarryLimit: number;
373
+ readonly GroundAcceleration: number;
374
+ readonly GroundFriction: number;
375
+ readonly InGameViolation_AfkPoints: number;
376
+ readonly InGameViolation_FriendlyDamagePointsMultiplier: number;
377
+ readonly InGameViolation_FriendlyEmpAdditionalHitPoints: number;
378
+ readonly InGameViolation_FriendlyEmpFirstHitPoints: number;
379
+ readonly InGameViolation_FriendlyEmpSecondHitPoints: number;
380
+ readonly InGameViolation_FriendlyShieldBreakPoints: number;
381
+ readonly InGameViolation_KickThreshold: number;
382
+ readonly JumpCooldown: number;
383
+ readonly JumpHorizontalImpulse: number;
384
+ readonly JumpSoundRadius: number;
385
+ readonly JumpVerticalImpulse: number;
386
+ readonly LandingFallSpeedThreshold: number;
387
+ readonly LandingSoundRadius: number;
388
+ readonly LandingSpeedFactor: number;
389
+ readonly LeaverTimeoutSeconds: number;
390
+ readonly MatchConnectionTImeoutSeconds: number;
391
+ readonly MaxGroundAngle: number;
392
+ readonly MeleeHitSoundRadius: number;
393
+ readonly PenetrationAdditionalDistance: number;
394
+ readonly PenetrationGlobalFactor: number;
395
+ readonly PlantSoundRadius: number;
396
+ readonly PostDeathVisionSpotDuration: number;
397
+ readonly ReloadSoundRadius: number;
398
+ readonly RunSoundRadius: number;
399
+ readonly RunSpeed: number;
400
+ readonly ScopeUncertaintyHalfLifeFactor: number;
401
+ readonly SonarPingInterval: number;
402
+ readonly SonarPingSpotDuration: number;
403
+ readonly SoundSpotDuration_Firearm: number;
404
+ readonly SoundSpotDuration_Movement: number;
405
+ readonly StartMatchDelaySeconds: number;
406
+ readonly ViewAngle: number;
407
+ readonly WalkSpeed: number;
408
+ GetShopConfigs(): LuaArray<ConfigDefusalShop>;
409
+ }
410
+ type ConfigConstant = ConfigConstantApi;
411
+ const ConfigConstant: ConfigConstantApi;
412
+ /** @noSelf */
413
+ interface ConfigFlagApi {
414
+ readonly AllowAirStrafe: boolean;
415
+ readonly AllowWallhack: boolean;
416
+ readonly DefusalKeepInventory: boolean;
417
+ readonly FalloffUncertaintyGain: boolean;
418
+ readonly HeadAtAimDirection: boolean;
419
+ readonly HeadAtLookRotation: boolean;
420
+ readonly OcclusionSymmetry: boolean;
421
+ readonly Revealnventory: boolean;
422
+ readonly StunnedPlayerCannotStunAnyone: boolean;
423
+ }
424
+ type ConfigFlag = ConfigFlagApi;
425
+ const ConfigFlag: ConfigFlagApi;
426
+ /** @noSelf */
427
+ interface ItemConfigsApi {
428
+ GetConfigItemByName(name: string): ConfigItem | undefined;
429
+ GetConfigItemFirearmByName(name: string): ConfigItemFirearm | undefined;
430
+ GetConfigItemMeleeByName(name: string): ConfigItemMelee | undefined;
431
+ GetConfigItemThrowableByName(name: string): ConfigItemThrowable | undefined;
432
+ GetItemConfigById(itemId: number): ConfigItem | undefined;
433
+ GetItemIconById(itemId: number): Texture | undefined;
434
+ GetItemNameById(itemId: number): string;
435
+ }
436
+ type ItemConfigs = ItemConfigsApi;
437
+ const ItemConfigs: ItemConfigsApi;
438
+ interface ConfigDefusalShop {
439
+ readonly AvailableForCT: boolean;
440
+ readonly AvailableForT: boolean;
441
+ readonly BuyLimit: number;
442
+ readonly Column: number;
443
+ readonly Item_cfg: ConfigItem;
444
+ readonly name: string;
445
+ readonly Price: number;
446
+ readonly Row: number;
447
+ readonly StartingForCT: boolean;
448
+ readonly StartingForT: boolean;
449
+ }
450
+ interface ConfigItem {
451
+ readonly AirborneUncertainty: number;
452
+ readonly CarryLimit: number;
453
+ readonly DrawTime: number;
454
+ readonly Droppable: boolean;
455
+ readonly Icon: Texture | undefined;
456
+ readonly IconSmall: Texture | undefined;
457
+ readonly ItemSlot: EItemSlot;
458
+ readonly KillReward: number;
459
+ readonly MovementSpeedFactor: number;
460
+ readonly MovementSpeedUncertaintyFactor: number;
461
+ readonly MovementSpeedUncertaintyLimit: number;
462
+ readonly MovementUncertaintyGain: number;
463
+ readonly MovementUncertaintyLimit: number;
464
+ readonly name: string;
465
+ readonly Name: string;
466
+ readonly RotationSpeed: number;
467
+ readonly RotationUncertaintyGain: number;
468
+ readonly RotationUncertaintyLimit: number;
469
+ readonly ThirdPersonAnimationId: number;
470
+ readonly UncertaintyBaseLoss: number;
471
+ readonly UncertaintyHalfLife: number;
472
+ readonly UncertaintyLossStability: number;
473
+ }
474
+ interface ConfigItemFirearm {
475
+ readonly AdsHasScreen: boolean;
476
+ readonly AdsTime: number;
477
+ readonly AdsZoomX: number;
478
+ readonly CanAds: boolean;
479
+ readonly Damage: number;
480
+ readonly DamageDistant: number;
481
+ readonly DamageFalloffBegin: number;
482
+ readonly DamageFalloffEnd: number;
483
+ readonly Dispersion: number;
484
+ readonly FireRate: number;
485
+ readonly FireSoundRadius: number;
486
+ readonly HeadDamageFactor: number;
487
+ readonly HitStunTime: number;
488
+ readonly HitUncertaintyGain: number;
489
+ readonly HitUncertaintyLimit: number;
490
+ readonly Item_cfg: ConfigItem;
491
+ readonly LegsDamageFactor: number;
492
+ readonly MaxClipAmmo: number;
493
+ readonly MaxHitDistance: number;
494
+ readonly name: string;
495
+ readonly PenetrationPower: number;
496
+ readonly ProjectilesPerShot: number;
497
+ readonly RagdollHitForce: number;
498
+ readonly ReloadTime: number;
499
+ readonly ShieldPenetration: number;
500
+ readonly ShotUncertaintyGain: number;
501
+ readonly ShotUncertaintyLimit: number;
502
+ readonly ShotUncertaintyMul: number;
503
+ readonly StartAmmo: number;
504
+ readonly StoppingPower: number;
505
+ }
506
+ interface ConfigItemMelee {
507
+ readonly FastAttackBackstabDamage: number;
508
+ readonly FastAttackDamage: number;
509
+ readonly FastAttackDamageDelay: number;
510
+ readonly FastAttackDuration: number;
511
+ readonly FastAttackMaxHitDistance: number;
512
+ readonly FastAttackStoppingPower: number;
513
+ readonly FastAttackStunTime: number;
514
+ readonly FastAttackUncertaintyGain: number;
515
+ readonly FastAttackUncertaintyLimit: number;
516
+ readonly Item_cfg: ConfigItem;
517
+ readonly name: string;
518
+ readonly StrongAttackBackstabDamage: number;
519
+ readonly StrongAttackDamage: number;
520
+ readonly StrongAttackDamageDelay: number;
521
+ readonly StrongAttackDuration: number;
522
+ readonly StrongAttackMaxHitDistance: number;
523
+ readonly StrongAttackStoppingPower: number;
524
+ readonly StrongAttackStunTime: number;
525
+ readonly StrongAttackUncertaintyGain: number;
526
+ readonly StrongAttackUncertaintyLimit: number;
527
+ }
528
+ interface ConfigItemThrowable {
529
+ readonly BounceLimit: number;
530
+ readonly BouncinessFloor: number;
531
+ readonly BouncinessWall: number;
532
+ readonly Damage: number;
533
+ readonly DamageDistant: number;
534
+ readonly DamageFalloffBegin: number;
535
+ readonly DamageFalloffEnd: number;
536
+ readonly ExplodeOnFire: boolean;
537
+ readonly ExplodeOnFloor: boolean;
538
+ readonly ExplodeOnImpact: boolean;
539
+ readonly ExplodeOnStop: boolean;
540
+ readonly ExplosionBlindnessDuration: number;
541
+ readonly ExplosionBlindnessRadius: number;
542
+ readonly ExplosionDelay: number;
543
+ readonly ExplosionFireExtinguishRadius: number;
544
+ readonly ExplosionLifetime: number;
545
+ readonly ExplosionSoundRadius: number;
546
+ readonly FastThrowDuration: number;
547
+ readonly FastThrowSpeed: number;
548
+ readonly Gravity: number;
549
+ readonly HitStunTime: number;
550
+ readonly HitUncertaintyGain: number;
551
+ readonly HitUncertaintyLimit: number;
552
+ readonly Item_cfg: ConfigItem;
553
+ readonly MaxHitDistance: number;
554
+ readonly name: string;
555
+ readonly PrepareThrowDuration: number;
556
+ readonly ShieldDecayHPPerSecond: number;
557
+ readonly ShieldHP: number;
558
+ readonly ThrownColliderRadius: number;
559
+ readonly TrajectoryColor: Color;
560
+ readonly WeakThrowDuration: number;
561
+ readonly WeakThrowSpeed: number;
562
+ }
563
+ type EItemSlot = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7;
564
+ const EItemSlot: {
565
+ readonly None: 0;
566
+ readonly PrimaryWeapon: 1;
567
+ readonly SecondaryWeapon: 2;
568
+ readonly Knife: 3;
569
+ readonly Grenade: 4;
570
+ readonly BridgeCharge: 5;
571
+ readonly Armor: 6;
572
+ readonly Defuser: 7;
573
+ };
574
+ type EThrowState = 0 | 1 | 2 | 3 | 4;
575
+ const EThrowState: {
576
+ readonly None: 0;
577
+ readonly Preparing: 1;
578
+ readonly PreparingAlternate: 2;
579
+ readonly Throwing: 3;
580
+ readonly ThrowingAlternate: 4;
581
+ };
582
+ interface DropsApi {
583
+ GetAll(): LuaArray<Drop>;
584
+ GetNearby(): LuaArray<Drop>;
585
+ }
586
+ type Drops = DropsApi;
587
+ const Drops: DropsApi;
588
+ interface ItemsApi {
589
+ GetAll(): LuaArray<Item>;
590
+ GetAllBridgeCharges(): LuaArray<BridgeChargeItem>;
591
+ }
592
+ type Items = ItemsApi;
593
+ const Items: ItemsApi;
594
+ interface BridgeChargeItem extends Item {
595
+ readonly IsPlanting: boolean;
596
+ readonly PlantProgress: number;
597
+ readonly PlantRemainingTicks: number;
598
+ }
599
+ interface Drop extends Entity {
600
+ readonly Config: ConfigItem | undefined;
601
+ readonly Item: Item | undefined;
602
+ }
603
+ interface FirearmItem extends Item {
604
+ readonly ClipAmmo: number;
605
+ readonly Config: ConfigItemFirearm | undefined;
606
+ readonly Dispersion: number;
607
+ readonly HasAmmo: boolean;
608
+ readonly IsReloading: boolean;
609
+ readonly ReloadProgress: number;
610
+ readonly RemainingAmmo: number;
611
+ HitscanFirearm(firePosition: Vector3, projectileDirection: Vector3): LuaArray<HitscanHit>;
612
+ }
613
+ interface HitscanHit {
614
+ readonly EntryPoint: Vector3;
615
+ readonly EntryPower: number;
616
+ readonly ExitPower: number;
617
+ readonly HasExited: boolean;
618
+ readonly Hitbox: Hitbox | undefined;
619
+ }
620
+ interface Item {
621
+ readonly AsBridgeChargeItem: BridgeChargeItem | undefined;
622
+ readonly AsFirearmItem: FirearmItem | undefined;
623
+ readonly AsMeleeItem: MeleeItem | undefined;
624
+ readonly AsThrowableItem: ThrowableItem | undefined;
625
+ readonly ConfigItem: ConfigItem | undefined;
626
+ readonly Icon: Texture | undefined;
627
+ readonly IconSmall: Texture | undefined;
628
+ readonly IsBridgeCharge: boolean;
629
+ readonly IsDropped: boolean;
630
+ readonly IsFirearm: boolean;
631
+ readonly IsMelee: boolean;
632
+ readonly IsThrowable: boolean;
633
+ readonly IsVisible: boolean;
634
+ readonly ItemSlot: EItemSlot;
635
+ readonly Name: string;
636
+ readonly Position: Vector3;
637
+ }
638
+ interface MeleeItem extends Item {
639
+ readonly Config: ConfigItemMelee | undefined;
640
+ HitscanMelee(firePosition: Vector3, direction: Vector3, distance: number): HitscanHit;
641
+ }
642
+ interface ThrowableItem extends Item {
643
+ readonly Config: ConfigItemThrowable | undefined;
644
+ readonly ThrowState: EThrowState;
645
+ }
646
+ interface NetworkApi {
647
+ OnTableReceived(callback: (message: LuaTableData) => void): void;
648
+ SendTable(table: LuaTableData): void;
649
+ }
650
+ type Network = NetworkApi;
651
+ const Network: NetworkApi;
652
+ type ENotificationCode = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19;
653
+ const ENotificationCode: {
654
+ readonly None: 0;
655
+ readonly GenericText: 1;
656
+ readonly TimeoutActivated: 2;
657
+ readonly TimeoutLimitReached: 3;
658
+ readonly BridgeChargeDeployed: 4;
659
+ readonly LastRound: 5;
660
+ readonly LastRoundBeforeSwap: 6;
661
+ readonly MatchPoint: 7;
662
+ readonly Victory: 8;
663
+ readonly Defeat: 9;
664
+ readonly KillReward: 10;
665
+ readonly RoundWonReward: 11;
666
+ readonly RoundLostReward: 12;
667
+ readonly BridgeChargePlantedReward: 13;
668
+ readonly BridgeChargeDefusedReward: 14;
669
+ readonly SellItemReward: 15;
670
+ readonly TimeoutPendingActivation: 16;
671
+ readonly WaitingForPlayers: 17;
672
+ readonly MatchStarting: 18;
673
+ readonly WarmupConsoleHint: 19;
674
+ };
675
+ type InGameViolationKind = 0 | 1 | 2 | 3 | 4;
676
+ const InGameViolationKind: {
677
+ readonly None: 0;
678
+ readonly FriendlyDamage: 1;
679
+ readonly FriendlyHelmetBreak: 2;
680
+ readonly FriendlyEmpHit: 3;
681
+ readonly Afk: 4;
682
+ };
683
+ type InGameViolationSeverity = 0 | 1 | 2 | 3;
684
+ const InGameViolationSeverity: {
685
+ readonly None: 0;
686
+ readonly Minor: 1;
687
+ readonly Moderate: 2;
688
+ readonly Severe: 3;
689
+ };
690
+ type PingMarkerType = 0 | 1 | 2;
691
+ const PingMarkerType: {
692
+ readonly Mine: 0;
693
+ readonly Party: 1;
694
+ readonly Ally: 2;
695
+ };
696
+ interface HintNotificationEvent {
697
+ Message: string;
698
+ DurationSeconds: number;
699
+ }
700
+ interface NotificationEvent {
701
+ Code: ENotificationCode;
702
+ EventId: number;
703
+ DurationSeconds: number;
704
+ SubjectName: string;
705
+ Message: string;
706
+ Amount: number;
707
+ CurrentCount: number;
708
+ MaxCount: number;
709
+ IsSpectator: boolean;
710
+ }
711
+ interface PingEvent {
712
+ PingIndex: number;
713
+ Position: Vector3;
714
+ Color: Color;
715
+ Number: number;
716
+ MarkerType: PingMarkerType;
717
+ TeamId: number;
718
+ ExpiresAtTick: number;
719
+ }
720
+ interface ViolationNotificationEvent {
721
+ Kind: InGameViolationKind;
722
+ Severity: InGameViolationSeverity;
723
+ EventId: number;
724
+ }
725
+ interface RaycastHit {
726
+ HasHit: boolean;
727
+ Point: Vector3;
728
+ Distance: number;
729
+ }
730
+ interface SchedulerApi {
731
+ Schedule(duration: number, callback: () => void): void;
732
+ }
733
+ type Scheduler = SchedulerApi;
734
+ const Scheduler: SchedulerApi;
735
+ interface EventSubscription {
736
+ Cancel(): void;
737
+ }
738
+ interface Team {
739
+ readonly EconomyLossCount: number;
740
+ readonly RoundWins: number;
741
+ readonly TimeoutsTaken: number;
742
+ }
743
+ interface Texture {
744
+ readonly height: number;
745
+ readonly width: number;
746
+ }
747
+ interface TimeApi {
748
+ readonly Seconds: number;
749
+ readonly Tick: number;
750
+ SecondsToTick(secs: number): number;
751
+ TickToSeconds(ticks: number): number;
752
+ }
753
+ type Time = TimeApi;
754
+ const Time: TimeApi;
755
+ }