-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBitburner.t.ts
More file actions
4207 lines (3944 loc) · 182 KB
/
Bitburner.t.ts
File metadata and controls
4207 lines (3944 loc) · 182 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
declare module "Bitburner" {
export type Host = string;
export type Script = string;
export type StockSymbol =
| "ECP"
| "MGCP"
| "BLD"
| "CLRK"
| "OMTK"
| "FSIG"
| "KGI"
| "FLCM"
| "STM"
| "DCOMM"
| "HLS"
| "VITA"
| "ICRS"
| "UNV"
| "AERO"
| "OMN"
| "SLRS"
| "GPH"
| "NVMD"
| "WDS"
| "LXO"
| "RHOC"
| "APHE"
| "SYSC"
| "CTK"
| "NTLK"
| "OMGA"
| "FNS"
| "SGC"
| "JGN"
| "CTYS"
| "MDYN"
| "TITN";
export type OrderType = "limitbuy" | "limitsell" | "stopbuy" | "stopsell";
export type OrderPos = "long" | "short";
export type University =
| "Summit University"
| "Rothman University"
| "ZB Institute Of Technology";
export type UniversityCourse =
| "Study Computer Science"
| "Data Strucures"
| "Networks"
| "Algorithms"
| "Management"
| "Leadership";
export type Gym =
| "Crush Fitness Gym"
| "Snap Fitness Gym"
| "Iron Gym"
| "Powerhouse Gym"
| "Millenium Fitness Gym";
export type GymStat = "str" | "def" | "dex" | "agi";
export type City =
| "Aevum"
| "Chongqing"
| "Sector-12"
| "New Tokyo"
| "Ishima"
| "Volhaven";
export type PurchaseableProgram =
| "brutessh.exe"
| "ftpcrack.exe"
| "relaysmtp.exe"
| "httpworm.exe"
| "sqlinject.exe"
| "deepscanv1.exe"
| "deepscanv2.exe"
| "autolink.exe";
export type CreatableProgram = PurchaseableProgram | "serverprofiler.exe";
export type CompanyName =
// Sector-12
| "MegaCorp"
| "BladeIndustries"
| "FourSigma"
| "IcarusMicrosystems"
| "UniversalEnergy"
| "DeltaOne"
| "CIA"
| "NSA"
| "AlphaEnterprises"
| "CarmichaelSecurity"
| "FoodNStuff"
| "JoesGuns"
// Aevum
| "ECorp"
| "BachmanAndAssociates"
| "ClarkeIncorporated"
| "OmniTekIncorporated"
| "FulcrumTechnologies"
| "GalacticCybersystems"
| "AeroCorp"
| "WatchdogSecurity"
| "RhoConstruction"
| "AevumPolice"
| "NetLinkTechnologies"
// Volhaven
| "NWO"
| "HeliosLabs"
| "OmniaCybersystems"
| "LexoCorp"
| "SysCoreSecurities"
| "CompuTek"
// Chongqing
| "KuaiGongInternational"
| "SolarisSpaceSystems"
// Ishima
| "StormTechnologies"
| "NovaMedical"
| "OmegaSoftware"
// New Tokyo
| "DefComm"
| "VitaLife"
| "GlobalPharmaceuticals"
| "NoodleBar";
export type CompanyField =
| "software"
| "software consultant"
| "it"
| "security engineer"
| "network engineer"
| "business"
| "business consultant"
| "security"
| "agent"
| "employee"
| "part-time employee"
| "waiter"
| "part-time waiter";
export type FactionName =
| "Illuminati"
| "Daedalus"
| "The Covenant"
| "ECorp"
| "MegaCorp"
| "Bachman & Associates"
| "Blade Industries"
| "NWO"
| "Clarke Incorporated"
| "OmniTek Incorporated"
| "Four Sigma"
| "KuaiGong International"
| "Fulcrum Secret Technologies"
| "BitRunners"
| "The Black Hand"
| "NiteSec"
| "Aevum"
| "Chongqing"
| "Ishima"
| "New Tokyo"
| "Sector-12"
| "Volhaven"
| "Speakers for the Dead"
| "The Dark Army"
| "The Syndicate"
| "Silhouette"
| "Tetrads"
| "Slum Snakes"
| "Netburners"
| "Tian Di Hui"
| "CyberSec"
| "Bladeburners";
export type GangName =
| "Slum Snakes"
| "Tetrads"
| "The Syndicate"
| "The Dark Army"
| "Speakers for the Dead"
| "NiteSec"
| "The Black Hand";
export type FactionWork = "hacking" | "field" | "security";
export type Crime =
| "shoplift"
| "rob store"
| "mug"
| "larceny"
| "deal drugs"
| "bond forgery"
| "traffick arms"
| "homicide"
| "grand theft auto"
| "kidnap"
| "assassinate"
| "heist";
export type AugmentName =
| "Targeting1"
| "Targeting2"
| "Targeting3"
| "SyntheticHeart"
| "SynfibrilMuscle"
| "CombatRib1"
| "CombatRib2"
| "CombatRib3"
| "NanofiberWeave"
| "SubdermalArmor"
| "WiredReflexes"
| "GrapheneBoneLacings"
| "BionicSpine"
| "GrapheneBionicSpine"
| "BionicLegs"
| "GrapheneBionicLegs"
| "SpeechProcessor"
| "TITN41Injection"
| "EnhancedSocialInteractionImplant"
| "BitWire"
| "ArtificialBioNeuralNetwork"
| "ArtificialSynapticPotentiation"
| "EnhancedMyelinSheathing"
| "SynapticEnhancement"
| "NeuralRetentionEnhancement"
| "DataJack"
| "ENM"
| "ENMCore"
| "ENMCoreV2"
| "ENMCoreV3"
| "ENMAnalyzeEngine"
| "ENMDMA"
| "Neuralstimulator"
| "NeuralAccelerator"
| "CranialSignalProcessorsG1"
| "CranialSignalProcessorsG2"
| "CranialSignalProcessorsG3"
| "CranialSignalProcessorsG4"
| "CranialSignalProcessorsG5"
| "NeuronalDensification"
| "NuoptimalInjectorImplant"
| "SpeechEnhancement"
| "FocusWire"
| "PCDNI"
| "PCDNIOptimizer"
| "PCDNINeuralNetwork"
| "ADRPheromone1"
| "ADRPheromone2"
| "ShadowsSimulacrum"
| "HacknetNodeCPUUpload"
| "HacknetNodeCacheUpload"
| "HacknetNodeNICUpload"
| "HacknetNodeKernelDNI"
| "HacknetNodeCoreDNI"
| "NeuroFluxGovernor"
| "Neurotrainer1"
| "Neurotrainer2"
| "Neurotrainer3"
| "Hypersight"
| "LuminCloaking1"
| "LuminCloaking2"
| "HemoRecirculator"
| "SmartSonar"
| "PowerRecirculator"
| "QLink"
| "TheRedPill"
| "SPTN97"
| "HiveMind"
| "CordiARCReactor"
| "SmartJaw"
| "Neotra"
| "Xanipher"
| "nextSENS"
| "OmniTekInfoLoad"
| "PhotosyntheticCells"
| "Neurolink"
| "TheBlackHand"
| "CRTX42AA"
| "Neuregen"
| "CashRoot"
| "NutriGen"
| "INFRARet"
| "DermaForce"
| "GrapheneBrachiBlades"
| "GrapheneBionicArms"
| "BrachiBlades"
| "BionicArms"
| "SNA"
| "EsperEyewear"
| "EMS4Recombination"
| "OrionShoulder"
| "HyperionV1"
| "HyperionV2"
| "GolemSerum"
| "VangelisVirus"
| "VangelisVirus3"
| "INTERLINKED"
| "BladeRunner"
| "BladeArmor"
| "BladeArmorPowerCells"
| "BladeArmorEnergyShielding"
| "BladeArmorUnibeam"
| "BladeArmorOmnibeam"
| "BladeArmorIPU"
| "BladesSimulacrum";
export interface BasicHGWOptions {
/** Number of threads to use for this function. Must be less than or equal to the number of threads the script is running with. */
threads: number;
}
export interface CodingAttemptOptions {
/** If truthy, then the function will return a string that states the contract’s reward when it is successfully solved. */
returnReward: boolean;
}
export interface AugmentPair {
/** augmentation name */
name: AugmentName;
/** augmentation cost */
cost: number;
}
export interface StockOrderObject {
/** Number of shares */
shares: number;
/** Price per share */
price: number;
/** Order type */
type: "Limit Buy Order" | "Limit Sell Order" | "Stop Buy Order" | "Stop Buy Order";
/** Order position */
position: "S" | "L";
}
export type StockOrder = {
/** Stock Symbol */
[key in StockSymbol]?: StockOrderObject[];
};
export interface ProcessInfo {
/** Script name. */
filename: Script;
/** Number of threads script is running with */
threads: number;
/** Script's arguments */
args: string[];
}
export interface HackingMultipliers {
/** Player's hacking chance multiplier. */
chance: number;
/** Player's hacking speed multiplier. */
speed: number;
/** Player's hacking money stolen multiplier. */
money: number;
/** Player's hacking growth multiplier */
growth: number;
}
export interface HacknetMultipliers {
/** Player's hacknet production multiplier */
production: number;
/** Player's hacknet purchase cost multiplier */
purchaseCost: number;
/** Player's hacknet ram cost multiplier */
ramCost: number;
/** Player's hacknet core cost multiplier */
coreCost: number;
/** Player's hacknet level cost multiplier */
levelCost: number;
}
export interface BitNodeMultipliers {
/** Influences how quickly the player's agility level (not exp) scales */
AgilityLevelMultiplier: number;
/** Influences the base cost to purchase an augmentation. */
AugmentationMoneyCost: number;
/** Influences the base rep the player must have with a faction to purchase an augmentation. */
AugmentationRepCost: number;
/** Influences how quickly the player can gain rank within Bladeburner. */
BladeburnerRank: number;
/** Influences the cost of skill levels from Bladeburner. */
BladeburnerSkillCost: number;
/** Influences how quickly the player's charisma level (not exp) scales */
CharismaLevelMultiplier: number;
/** Influences the experience gained for each ability when a player completes a class. */
ClassGymExpGain: number;
/** Influences the amount of money gained from completing Coding Contracts */
CodingContractMoney: number;
/** Influences the experience gained for each ability when the player completes working their job. */
CompanyWorkExpGain: number;
/** Influences how much money the player earns when completing working their job. */
CompanyWorkMoney: number;
/** Influences the valuation of corporations created by the player. */
CorporationValuation: number;
/** Influences the base experience gained for each ability when the player commits a crime. */
CrimeExpGain: number;
/** Influences the base money gained when the player commits a crime. */
CrimeMoney: number;
/** Influences how many Augmentations you need in order to get invited to the Daedalus faction */
DaedalusAugsRequirement: number;
/** Influences how quickly the player's defense level (not exp) scales */
DefenseLevelMultiplier: number;
/** Influences how quickly the player's dexterity level (not exp) scales */
DexterityLevelMultiplier: number;
/** Influences how much rep the player gains in each faction simply by being a member. */
FactionPassiveRepGain: number;
/** Influences the experience gained for each ability when the player completes work for a Faction. */
FactionWorkExpGain: number;
/** Influences how much rep the player gains when performing work for a faction. */
FactionWorkRepGain: number;
/** Influences how much it costs to unlock the stock market's 4S Market Data API */
FourSigmaMarketDataApiCost: number;
/** Influences how much it costs to unlock the stock market's 4S Market Data (NOT API) */
FourSigmaMarketDataCost: number;
/** Influences the experienced gained when hacking a server. */
HackExpGain: number;
/** Influences how quickly the player's hacking level (not experience) scales */
HackingLevelMultiplier: number;
/** Influences how much money is produced by Hacknet Nodes and the hash rate of Hacknet Servers (unlocked in BitNode-9) */
HacknetNodeMoney: number;
/** Influences how much money it costs to upgrade your home computer's RAM */
HomeComputerRamCost: number;
/** Influences how much money is gained when the player infiltrates a company. */
InfiltrationMoney: number;
/** Influences how much rep the player can gain from factions when selling stolen documents and secrets */
InfiltrationRep: number;
/** Influences how much money can be stolen from a server when the player performs a hack against it through the Terminal. */
ManualHackMoney: number;
/** Influence how much it costs to purchase a server */
PurchasedServerCost: number;
/** Influences the maximum number of purchased servers you can have */
PurchasedServerLimit: number;
/** Influences the maximum allowed RAM for a purchased server */
PurchasedServerMaxRam: number;
/** Influences the minimum favor the player must have with a faction before they can donate to gain rep. */
RepToDonateToFaction: number;
/** Influences how much money can be stolen from a server when a script performs a hack against it. */
ScriptHackMoney: number;
/** Influences the growth percentage per cycle against a server. */
ServerGrowthRate: number;
/** Influences the maxmimum money that a server can grow to. */
ServerMaxMoney: number;
/** Influences the initial money that a server starts with. */
ServerStartingMoney: number;
/** Influences the initial security level (hackDifficulty) of a server. */
ServerStartingSecurity: number;
/** Influences the weaken amount per invocation against a server. */
ServerWeakenRate: number;
/** Influences how quickly the player's strength level (not exp) scales */
StrengthLevelMultiplier: number;
}
/**
* A port is implemented as a sort of serialized queue,
* where you can only write and read one element at a time from the port.
* When you read data from a port, the element that is read is removed from the port.
*
* IMPORTANT: The data inside ports are not saved!
* This means if you close and re-open the game, or reload the page
* then you will lose all of the data in the ports!
*/
export type Port = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20;
export type Handle = string | Port;
export interface NodeStats {
/** Node's name ("hacknet-node-5") */
name: string;
/** Node's level */
level: number;
/** Node's RAM */
ram: number;
/** Node's number of cores */
cores: number;
/** Cache level. Only applicable for Hacknet Servers */
cache: number;
/** Hash Capacity provided by this Node. Only applicable for Hacknet Servers */
hashCapacity: number;
/** Node's production per second */
production: number;
/** Number of seconds since Node has been purchased */
timeOnline: number;
/** Total number of money Node has produced */
totalProduction: number;
}
export type HashUpgrades =
| "Sell for Money"
| "Sell for Corporation Funds"
| "Reduce Minimum Security"
| "Increase Maximum Money"
| "Improve Studying"
| "Improve Gym Training"
| "Exchange for Corporation Research"
| "Exchange for Bladeburner Rank"
| "Exchange for Bladeburner SP"
| "Generate Coding Contract";
export interface PlayerStats {
/** Hacking level */
hacking: number;
/** Strength level */
strength: number;
/** Defense level */
defense: number;
/** Dexterity level */
dexterity: number;
/** Agility level */
agility: number;
/** Chraisma level */
charisma: number;
/** Intelligence level */
intelligence: number;
}
export interface CharacterMult {
/** Agility stat */
agility: number;
/** Agility exp */
agilityExp: number;
/** Company reputation */
companyRep: number;
/** Money earned from crimes */
crimeMoney: number;
/** Crime success chance */
crimeSuccess: number;
/** Defense stat */
defense: number;
/** Defense exp */
defenseExp: number;
/** Dexterity stat */
dexterity: number;
/** Dexterity exp */
dexterityExp: number;
/** Faction reputation */
factionRep: number;
/** Hacking stat */
hacking: number;
/** Hacking exp */
hackingExp: number;
/** Strength stat */
strength: number;
/** Strength exp */
strengthExp: number;
/** Money earned from jobs */
workMoney: number;
}
export interface CharacterInfo {
/** Current BitNode number */
bitnode: number;
/** Name of city you are currently in */
city: City;
/** Array of factions you are currently a member of */
factions: FactionName[];
/** Current health points */
hp: number;
/** Array of all companies at which you have jobs */
company: CompanyName[];
/** Array of job positions for all companies you are employed at. Same order as 'jobs' */
jobTitle: CompanyField[];
/** Maximum health points */
maxHp: number;
/** Boolean indicating whether or not you have a tor router */
tor: boolean;
/** Object with many of the player's multipliers from Augmentations/Source Files */
mult: CharacterMult;
/** Timed worked in ms */
timeWorked: number;
/** Hacking experience earned so far from work */
workHackExpGain: number;
/** Str experience earned so far from work */
workStrExpGain: number;
/** Def experience earned so far from work */
workDefExpGain: number;
/** Dex experience earned so far from work */
workDexExpGain: number;
/** Agi experience earned so far from work */
workAgiExpGain: number;
/** Cha experience earned so far from work */
workChaExpGain: number;
/** Reputation earned so far from work, if applicable */
workRepGain: number;
/** Money earned so far from work, if applicable */
workMoneyGain: number;
}
export interface SleeveWorkGains {
/** hacking exp gained from work */
workHackExpGain: number;
/** strength exp gained from work */
workStrExpGain: number;
/** defense exp gained from work, */
workDefExpGain: number;
/** dexterity exp gained from work */
workDexExpGain: number;
/** agility exp gained from work */
workAgiExpGain: number;
/** charisma exp gained from work */
workChaExpGain: number;
/** money gained from work */
workMoneyGain: number;
}
export interface SourceFileLvl {
/** The number of the source file */
n: 1|2|3|4|5|6|7|8|9|10|11|12;
/** The level of the source file */
lvl: number;
}
export type BladeburnerContracts =
| "Tracking"
| "Bounty Hunter"
| "Retirement";
export type BladeburnerOperations =
| "Investigation"
| "Undercover Operation"
| "Sting Operation"
| "Raid"
| "Stealth Retirement Operation"
| "Assassination";
export type BladeburnerBlackOps =
| "Operation Typhoon"
| "Operation Zero"
| "Operation X"
| "Operation Titan"
| "Operation Ares"
| "Operation Archangel"
| "Operation Juggernaut"
| "Operation Red Dragon"
| "Operation K"
| "Operation Deckard"
| "Operation Tyrell"
| "Operation Wallace"
| "Operation Shoulder of Orion"
| "Operation Hyron"
| "Operation Morpheus"
| "Operation Ion Storm"
| "Operation Annihilus"
| "Operation Ultron"
| "Operation Centurion"
| "Operation Vindictus"
| "Operation Daedalus";
export type BladeburnerGenActions =
| "Training"
| "Field Analysis"
| "Recruitment"
| "Diplomacy"
| "Hyperbolic Regeneration Chamber";
export type BladeburnerSkills =
| "Blade's Intuition"
| "Cloak"
| "Marksman"
| "Weapon Proficiency"
| "Short-Circuit"
| "Digital Observer"
| "Tracer"
| "Overclock"
| "Reaper"
| "Evasive System"
| "Datamancer"
| "Cyber's Edge"
| "Hands of Midas"
| "Hyperdrive";
export type BladeburnerActTypes =
| "contracts"
| "operations"
| "black ops"
| "general";
export interface BladeburnerCurAction {
/** Type of Action */
type: BladeburnerActTypes | "Idle";
/** Name of Action */
name: BladeburnerGenActions | BladeburnerContracts | BladeburnerOperations | BladeburnerBlackOps;
}
export type CodingContractTypes =
| "Find Largest Prime Factor"
| "Subarray with Maximum Sum"
| "Total Ways to Sum"
| "Spiralize Matrix"
| "Array Jumping Game"
| "Merge Overlapping Intervals"
| "Generate IP Addresses"
| "Algorithmic Stock Trader I"
| "Algorithmic Stock Trader II"
| "Algorithmic Stock Trader III"
| "Algorithmic Stock Trader IV"
| "Minimum Path Sum in a Triangle"
| "Unique Paths in a Grid I"
| "Unique Paths in a Grid II"
| "Sanitize Parentheses in Expression"
| "Find All Valid Math Expressions";
export interface GangGenInfo {
/** Name of faction that the gang belongs to ("Slum Snakes", etc.) */
faction: GangName;
/** Boolean indicating whether or not its a hacking gang */
isHacking: boolean;
/** Money earned per second */
moneyGainRate: number;
/** Gang's power for territory warfare */
power: number;
/** Gang's respect */
respect: number;
/** Respect earned per second */
respectGainRate: number;
/** Amount of territory held. Returned in decimal form, not percentage */
territory: number;
/** Clash chance. Returned in decimal form, not percentage */
territoryClashChance: number;
/** Gang's wanted level */
wantedLevel: number;
/** Wanted level gained/lost per second (negative for losses) */
wantedLevelGainRate: number;
}
export interface GangOtherInfoObject {
/** Gang power */
power: number;
/** Gang territory, in decimal form */
territory: number;
}
export type GangOtherInfo = {
/** Stock Symbol */
[key in GangName]: GangOtherInfoObject[];
};
export type GangEquipment =
| "Baseball Bat"
| "Katana"
| "Glock 18C"
| "P90C"
| "Steyr AUG"
| "AK-47"
| "M15A10 Assault Rifle"
| "AWM Sniper Rifle"
| "Bulletproof Vest"
| "Full Body Armor"
| "Liquid Body Armor"
| "Graphene Plating Armor"
| "Ford Flex V20"
| "ATX1070 Superbike"
| "Mercedes-Benz S9001"
| "White Ferrari"
| "NUKE Rootkit"
| "Soulstealer Rootkit"
| "Demon Rootkit"
| "Hmap Node"
| "Jack the Ripper";
export type GangAugmentations =
| "Bionic Arms"
| "Bionic Legs"
| "Bionic Spine"
| "BrachiBlades"
| "Nanofiber Weave"
| "Synthetic Heart"
| "Synfibril Muscle"
| "BitWire"
| "Neuralstimulator"
| "DataJack"
| "Graphene Bone Lacings";
export type GangTasks =
| "Unassigned"
| "Ransomware"
| "Phishing"
| "Identity Theft"
| "DDoS Attacks"
| "Plant Virus"
| "Fraud & Counterfeiting"
| "Money Laundering"
| "Cyberterrorism"
| "Ethical Hacking"
| "Mug People"
| "Deal Drugs"
| "Strongarm Civilians"
| "Run a Con"
| "Armed Robbery"
| "Traffick Illegal Arms"
| "Threaten & Blackmail"
| "Human Trafficking"
| "Terrorism"
| "Vigilante Justice"
| "Train Combat"
| "Train Hacking"
| "Train Charisma"
| "Territory Warfare";
export interface GangMemberInfo {
/** Agility stat */
agility: number;
/** Agility multiplier from equipment. Decimal form */
agilityEquipMult: number;
/** Agility multiplier from ascension. Decimal form */
agilityAscensionMult: number;
/** Array of names of all owned Augmentations */
augmentations: GangAugmentations[];
/** Charisma stat */
charisma: number;
/** Charisma multiplier from equipment. Decimal form */
charismaEquipMult: number;
/** Charisma multiplier from ascension. Decimal form */
charismaAscensionMult: number;
/** Defense stat */
defense: number;
/** Defense multiplier from equipment. Decimal form */
defenseEquipMult: number;
/** Defense multiplier from ascension. Decimal form */
defenseAscensionMult: number;
/** Dexterity stat */
dexterity: number;
/** Dexterity multiplier from equipment. Decimal form */
dexterityEquipMult: number;
/** Dexterity multiplier from ascension. Decimal form */
dexterityAscensionMult: number;
/** Array of names of all owned Non-Augmentation Equipment */
equipment: GangEquipment[];
/** Hacking stat */
hacking: number;
/** Hacking multiplier from equipment. Decimal form */
hackingEquipMult: number;
/** Hacking multiplier from ascension. Decimal form */
hackingAscensionMult: number;
/** Strength stat */
strength: number;
/** Strength multiplier from equipment. Decimal form */
strengthEquipMult: number;
/** Strength multiplier from ascension. Decimal form */
strengthAscensionMult: number;
/** Name of currently assigned task */
task: GangTasks;
}
export interface GangMemberAscension {
/** Amount of respect lost from ascending */
respect: number;
/** Hacking multiplier gained from ascending. Decimal form */
hack: number;
/** Strength multiplier gained from ascending. Decimal form */
str: number;
/** Defense multiplier gained from ascending. Decimal form */
def: number;
/** Dexterity multiplier gained from ascending. Decimal form */
dex: number;
/** Agility multiplier gained from ascending. Decimal form */
agi: number;
/** Charisma multiplier gained from ascending. Decimal form */
cha: number;
}
export interface SleeveStats {
/** current shock of the sleeve [0-100] */
shock: 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20
|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37
|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54
|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71
|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88
|89|90|91|92|93|94|95|96|97|98|99|100;
/** current sync of the sleeve [0-100] */
sync: 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20
|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37
|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54
|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71
|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88
|89|90|91|92|93|94|95|96|97|98|99|100;
/** current hacking skill of the sleeve */
hacking_skill: number;
/** current strength of the sleeve */
strength: number;
/** current defense of the sleeve */
defense: number;
/** current dexterity of the sleeve */
dexterity: number;
/** current agility of the sleeve */
agility: number;
/** current charisma of the sleeve */
charisma: number;
}
export interface SleeveInformation {
/** location of the sleeve */
city: City;
/** current hp of the sleeve */
hp: number;
/** max hp of the sleeve */
maxHp: number;
/** jobs available to the sleeve */
jobs: string[];
/** job titles available to the sleeve */
jobTitle: CompanyField[];
/** does this sleeve have access to the tor router */
tor: boolean;
/** sleeve multipliers */
mult: CharacterMult;
/** time spent on the current task in milliseconds */
timeWorked: number;
/** earnings synchronized to other sleeves */
earningsForSleeves: SleeveWorkGains;
/** earnings synchronized to the player */
earningsForPlayer: SleeveWorkGains;
/** earnings for this sleeve */
earningsForTask: SleeveWorkGains;
/** faction or company reputation gained for the current task */
workRepGain: number;
}
export interface SleeveTask {
/** task type */
task: string;
/** crime currently attempting, if any */
crime: Crime | "";
/** location of the task, if any */
location: City | "";
/** stat being trained at the gym, if any */
gymStatType: GymStat | "";
/** faction work type being performed, if any */
factionWorkType: FactionWork | "";
}
export interface TIX {
/**
* Returns an array of the symbols of the tradable stocks
*
* @ramCost 2 GB
* @returns {string[]} Array of the symbols of the tradable stocks.
*/
getStockSymbols (): StockSymbol[];
/**
* Returns the price of a stock, given its symbol (NOT the company name).
* The symbol is a sequence of two to four capital letters.
*
* The stock’s price is the average of its bid and ask price
*
* @example
* ```js
* getStockPrice("FISG");```
* @ramCost 2 GB
* @param {string} sym Stock symbol.
* @returns {number} The price of a stock.
*/
getStockPrice (sym: StockSymbol): number;
/**
* Given a stock’s symbol (NOT the company name), returns the ask price of that stock.
* The symbol is a sequence of two to four capital letters.
*
* @ramCost 2 GB
* @param {string} sym Stock symbol.
* @returns {number} The ask price of a stock.
*/
getStockAskPrice (sym: StockSymbol): number;
/**
* Given a stock’s symbol (NOT the company name), returns the bid price of that stock.
* The symbol is a sequence of two to four capital letters.
*
* @ramCost 2 GB
* @param {string} sym Stock symbol.
* @returns {number} The bid price of a stock.
*/
getStockBidPrice (sym: StockSymbol): number;
/**
* Returns an array of four elements that represents the player’s position in a stock.
*
* The first element is the returned array is the number of shares the player owns of
* the stock in the Long position. The second element in the array is the average price
* of the player’s shares in the Long position.
*
* The third element in the array is the number of shares the player owns of the stock
* in the Short position. The fourth element in the array is the average price of the
* player’s Short position.
*
* All elements in the returned array are numeric.
*
* @example
* ```js
* pos = getStockPosition("ECP");
* shares = pos[0];
* avgPx = pos[1];
* sharesShort = pos[2];
* avgPxShort = pos[3];```
* @ramCost 2 GB
* @param {string} sym Stock symbol.
* @returns {[number,number,number,number]} Array of four elements that represents the player’s position in a stock.
*/
getStockPosition (sym: StockSymbol): [number, number, number, number];
/**
* Returns the maximum number of shares that the stock has.
* This is the maximum amount of the stock that can be purchased
* in both the Long and Short positions combined.
*
* @ramCost 2 GB
* @param {string} sym Stock symbol.
* @returns {number} Maximum number of shares that the stock has.
*/