bitburner-src/markdown/bitburner.ns.gethackingmultipliers.md

48 lines
1.0 KiB
Markdown
Raw Normal View History

2021-10-30 18:34:14 +02:00
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [NS](./bitburner.ns.md) &gt; [getHackingMultipliers](./bitburner.ns.gethackingmultipliers.md)
## NS.getHackingMultipliers() method
Get hacking related multipliers.
2021-10-30 18:34:14 +02:00
<b>Signature:</b>
```typescript
getHackingMultipliers(): HackingMultipliers;
```
<b>Returns:</b>
[HackingMultipliers](./bitburner.hackingmultipliers.md)
Object containing the Players hacking related multipliers.
## Remarks
2021-10-30 21:46:34 +02:00
RAM cost: 4 GB
2021-10-30 18:34:14 +02:00
Returns an object containing the Players hacking related multipliers. These multipliers are returned in fractional forms, not percentages (e.g. 1.5 instead of 150%).
2022-01-08 19:25:06 +01:00
## Example 1
2021-10-30 18:34:14 +02:00
2021-10-30 21:46:34 +02:00
```ts
2022-01-08 19:25:06 +01:00
// NS1:
// Example of how this can be used:
var mults = getHackingMultipliers();
2021-10-30 18:34:14 +02:00
print(mults.chance);
print(mults.growth);
```
2022-01-08 19:25:06 +01:00
## Example 2
```ts
// NS2:
// Example of how this can be used:
const {chance, growth} = ns.getHackingMultipliers();
print(chance);
print(growth);
```