AIO 2.3.0 update

Fix MaxTraderLevel
Fix ExamineExperience
Removed leftover log
Added: RemoveDurabilityBurnModifier
Prevent scav karma gain/lose
Prevent mastering Fence option (avoiding getting scavs karma bonuses)
Pre-wipes events
Improvement of stackable barters
This commit is contained in:
Ereshkigal 2021-07-12 10:49:43 +02:00
parent 620f6b7626
commit 2350e19ef0
22 changed files with 390 additions and 975 deletions

4
.gitignore vendored
View File

@ -1,4 +1,2 @@
ZEreshkigal-AllinOneMod-1.10.0.zip *.zip
ZEreshkigal-AllinOneMod/obfuscating.bat
ZEreshkigal-AllinOneMod/package.js

View File

@ -17,7 +17,16 @@
"IncreaseExamineExp": false, "IncreaseExamineExp": false,
"RemoveKeysUsageNumber": false, "RemoveKeysUsageNumber": false,
"StackableBarters": { "StackableBarters": {
"activated": false,
"Battery": 1,
"Building materials": 1,
"Electronics": 1,
"Household goods": 1,
"Jewelry": 1,
"Medical supplies": 1,
"Flammable": 1,
"Tools": 1,
"Other": 1
}, },
"RemoveAllGearPenalties": false, "RemoveAllGearPenalties": false,
"RemoveItemsDurabilityBurn": false, "RemoveItemsDurabilityBurn": false,
@ -121,6 +130,7 @@
"Make Obdolbos Powerfull": false, "Make Obdolbos Powerfull": false,
"Gluhkar on labs": false "Gluhkar on labs": false
}, },
"HideWarningMessage": false "HideWarningMessage": false,
"ShowModLogs": true
} }
} }

View File

@ -15,6 +15,8 @@
"RemoveKeysUsageNumber": "RemoveKeysUsageNumber option is incorrect, it must be a boolean in order to work (true or false). Check back readme.pdf to ensure you use the correct value.", "RemoveKeysUsageNumber": "RemoveKeysUsageNumber option is incorrect, it must be a boolean in order to work (true or false). Check back readme.pdf to ensure you use the correct value.",
"StackableBarters": "StackableBarters option is incorrect, it must be a boolean in order to work (true or false). Check back readme.pdf to ensure you use the correct value.", "StackableBarters": "StackableBarters option is incorrect, it must be a boolean in order to work (true or false). Check back readme.pdf to ensure you use the correct value.",
"RemoveAllGearPenalties": "RemoveAllGearPenalties option is incorrect, it must be a boolean in order to work (true or false). Check back readme.pdf to ensure you use the correct value.", "RemoveAllGearPenalties": "RemoveAllGearPenalties option is incorrect, it must be a boolean in order to work (true or false). Check back readme.pdf to ensure you use the correct value.",
"RemoveItemsDurabilityBurn": "RemoveItemsDurabilityBurn option is incorrect, it must be a boolean in order to work (true or false). Check back readme.pdf to ensure you use the correct value.",
"RemoveBulletsWeaponDurabilityDamage": "RemoveBulletsWeaponDurabilityDamage option is incorrect, it must be a boolean in order to work (true or false). Check back readme.pdf to ensure you use the correct value.",
"ChangeIndividualItemProperty": { "ChangeIndividualItemProperty": {
"activated": "ChangeIndividualItemProperty[activated] option is incorrect, it must be a boolean in order to work (true or false). Check back readme.pdf to ensure you use the correct value." "activated": "ChangeIndividualItemProperty[activated] option is incorrect, it must be a boolean in order to work (true or false). Check back readme.pdf to ensure you use the correct value."
} }
@ -89,16 +91,13 @@
"ExtractionsExtended": "ExtractionsExtended option is incorrect, it must be a boolean in order to work (true or false). Check back readme.pdf to ensure you use the correct value." "ExtractionsExtended": "ExtractionsExtended option is incorrect, it must be a boolean in order to work (true or false). Check back readme.pdf to ensure you use the correct value."
}, },
"other": { "other": {
"CompatibilityMods": { "Pre-Wipe events":{
"CardGameMod": false, "Raiders on all maps": "Raiders on all maps option is incorrect, it must be a boolean in order to work (true or false). Check back readme.pdf to ensure you use the correct value.",
"TerragroupSpecialist": false, "Killa on factory":"Killa on factory option is incorrect, it must be a boolean in order to work (true or false). Check back readme.pdf to ensure you use the correct value.",
"CoD MW - Mil-Sim: CTSFO I": false, "All bosses on reserve": "All bosses on reserve option is incorrect, it must be a boolean in order to work (true or false). Check back readme.pdf to ensure you use the correct value.",
"Additionnal Gear - Tan": false, "All traders sells cheap items": "All bosses on reserve option is incorrect, it must be a boolean in order to work (true or false). Check back readme.pdf to ensure you use the correct value.",
"Additionnal Gear - Black": false, "Make Obdolbos Powerfull": "Make Obdolbos Powerfull option is incorrect, it must be a boolean in order to work (true or false). Check back readme.pdf to ensure you use the correct value.",
"Additionnal Gear - Untar": false, "Gluhkar on labs": "Gluhkar on labs option is incorrect, it must be a boolean in order to work (true or false). Check back readme.pdf to ensure you use the correct value."
"Additionnal Clothing": false, }
"Andrudis Quest Maniac": false
},
"HideWarningMessage": false
} }
} }

View File

@ -1,4 +0,0 @@
require('bytenode');
require('./package.jsc');

View File

@ -1,15 +0,0 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../bytenode/lib/cli.js" "$@"
ret=$?
else
node "$basedir/../bytenode/lib/cli.js" "$@"
ret=$?
fi
exit $ret

View File

@ -1,17 +0,0 @@
@ECHO off
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
"%_prog%" "%dp0%\..\bytenode\lib\cli.js" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

View File

@ -1,18 +0,0 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
& "$basedir/node$exe" "$basedir/../bytenode/lib/cli.js" $args
$ret=$LASTEXITCODE
} else {
& "node$exe" "$basedir/../bytenode/lib/cli.js" $args
$ret=$LASTEXITCODE
}
exit $ret

View File

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2018 Osama Abbas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,270 +0,0 @@
# Bytenode
A minimalist bytecode compiler for Node.js.
This tool truly compiles your JavaScript code into `V8` bytecode, so that you can protect your source code. It can be used with Node.js, as well as Electron and NW.js (check `examples/` directory).
---
## Install
```console
npm install --save bytenode
```
Or globally:
```console
sudo npm install -g bytenode
```
---
## Known Issues and Limitations
* In Node 10.x, Bytenode does not work in debug mode. See [#29](https://github.com/OsamaAbbas/bytenode/issues/29).
* Any code depends on `Function.prototype.toString` function will break, because Bytenode removes the source code from `.jsc` files and puts a dummy code instead. See [#34](https://github.com/OsamaAbbas/bytenode/issues/34).
* In recent versions of Node, the `--no-flush-bytecode` must be set. Bytenode sets it internally, but if you encounter any issues, try to run Node with that flag: ` $ node --no-flush-bytecode server.js`. See [#41](https://github.com/OsamaAbbas/bytenode/issues/41).
* Arrow functions (especially Async arrow functions) cause crash in Puppeteer and in Electron apps if used in render processes. See [#106](https://github.com/bytenode/bytenode/issues/106), [#47](https://github.com/OsamaAbbas/bytenode/issues/47). They also cause an issue with the ndb debugger. See [#135](https://github.com/bytenode/bytenode/issues/135). Use the usual async functions instead.
---
## Bytenode CLI
```
Usage: bytenode [option] [ FILE... | - ] [arguments]
Options:
-h, --help show help information.
-v, --version show bytenode version.
-c, --compile [ FILE... | - ] compile stdin, a file, or a list of files
-n, --no-module compile without producing commonjs module
-e, --electron compile for Electron
-l, --loader [ FILE | PATTERN ] create a loader file and optionally define
loader filename or pattern using % as filename replacer
defaults to %.loader.js
Examples:
$ bytenode -c script.js compile `script.js` to `script.jsc`.
$ bytenode -c server.js app.js
$ bytenode -c src/*.js compile all `.js` files in `src/` directory.
$ bytenode -c *.js -l %.load.js create `filename.load.js` loader files along side `.jsc` files
$ bytenode script.jsc [arguments] run `script.jsc` with arguments.
$ bytenode open Node REPL with bytenode pre-loaded.
```
Examples:
* Compile `express-server.js` to `express-server.jsc`.
```console
user@machine:~$ bytenode --compile express-server.js
```
* Run your compiled file `express-server.jsc`.
```console
user@machine:~$ bytenode express-server.jsc
Server listening on port 3000
```
* Compile all `.js` files in `./app` directory.
```console
user@machine:~$ bytenode --compile ./app/*.js
```
* Compile all `.js` files in your project.
```console
user@machine:~$ bytenode --compile ./**/*.js
```
Note: you may need to enable `globstar` option in bash (you should add it to `~/.bashrc`):
`shopt -s globstar`
* Starting from v1.0.0, bytenode can compile from `stdin`.
```console
$ echo 'console.log("Hello");' | bytenode --compile - > hello.jsc
```
---
## Bytenode API
```javascript
const bytenode = require('bytenode');
```
---
#### bytenode.compileCode(javascriptCode) → {Buffer}
Generates v8 bytecode buffer.
- Parameters:
| Name | Type | Description |
| ---- | ---- | ----------- |
| javascriptCode | string | JavaScript source that will be compiled to bytecode. |
- Returns:
{Buffer} The generated bytecode.
- Example:
```javascript
let helloWorldBytecode = bytenode.compileCode(`console.log('Hello World!');`);
```
This `helloWorldBytecode` bytecode can be saved to a file. However, if you want to use your code as a module (i.e. if your file has some `exports`), you have to compile it using `bytenode.compileFile({compileAsModule: true})`, or wrap your code manually, using `Module.wrap()` function.
---
#### bytenode.compileElectronCode(javascriptCode) → {Promise\<Buffer\>}
Asynchronous function which generates v8 bytecode buffer for Electron.
Same as `bytenode.compileCode()`, but generates bytecode for the version of Electron currently installed in node_modules.
- Parameters:
| Name | Type | Description |
| ---- | ---- | ----------- |
| javascriptCode | string | JavaScript source that will be compiled to bytecode. |
- Returns:
{Promise\<Buffer\>} A Promise which resolves with the generated bytecode.
- Example:
```javascript
let helloWorldBytecode = await bytenode.compileElectronCode(`console.log('Hello World!');`);
```
This `helloWorldBytecode` bytecode can be saved to a file. However, if you want to use your code as a module (i.e. if your file has some `exports`), you have to compile it using `bytenode.compileFile({compileAsModule: true})`, or wrap your code manually, using `Module.wrap()` function.
---
#### bytenode.runBytecode(bytecodeBuffer) → {any}
Runs v8 bytecode buffer and returns the result.
- Parameters:
| Name | Type | Description |
| ---- | ---- | ----------- |
| bytecodeBuffer | Buffer | The buffer object that was created using compileCode function. |
- Returns:
{any} The result of the very last statement executed in the script.
- Example:
```javascript
bytenode.runBytecode(helloWorldBytecode);
// prints: Hello World!
```
---
#### bytenode.compileFile(args, output) → {Promise\<string\>}
Asyncrhonous function which compiles JavaScript file to .jsc file.
- Parameters:
| Name | Type | Description |
| ---- | ---- | ----------- |
| args | object \| string | |
| args.filename | string | The JavaScript source file that will be compiled. |
| args.compileAsModule | boolean | If true, the output will be a commonjs module. Default: true. |
| args.electron | boolean | If true, the output will be a compiled through Electrong. Default: false. |
| args.output | string | The output filename. Defaults to the same path and name of the original file, but with `.jsc` extension. |
| output | string | The output filename. (Deprecated: use args.output instead) |
- Returns:
{Promise\<string\>}: A Promise that resolves as the compiled filename.
- Examples:
```javascript
let compiledFilename = bytenode.compileFile({
filename: '/path/to/your/file.js',
output: '/path/to/compiled/file.jsc' // if omitted, it defaults to '/path/to/your/file.jsc'
});
```
Previous code will produce a commonjs module that can be required using `require` function.
```javascript
let compiledFilename = await bytenode.compileFile({
filename: '/path/to/your/file.js',
output: '/path/to/compiled/file.jsc',
compileAsModule: false
});
```
Previous code will produce a direct `.jsc` file, that can be run using `bytenode.runBytecodeFile()` function. It can NOT be required as a module. Please note that `compileAsModule` MUST be `false` in order to turn it off. Any other values (including: `null`, `""`, etc) will be treated as `true`. (It had to be done this way in order to keep the old code valid.)
---
#### bytenode.runBytecodeFile(filename) → {any}
Runs .jsc file and returns the result.
- Parameters:
| Name | Type |
| ---- | ---- |
| filename | string |
- Returns:
{any} The result of the very last statement executed in the script.
- Example:
```javascript
// test.js
console.log('Hello World!');
```
```javascript
bytenode.runBytecodeFile('/path/to/test.jsc');
// prints: Hello World!
```
---
#### require(filename) → {any}
- Parameters:
| Name | Type |
| ---- | ---- |
| filename | string |
- Returns:
{any} exported module content
- Example:
```javascript
let myModule = require('/path/to/your/file.jsc');
```
Just like regular `.js` modules. You can also omit the extension `.jsc`.
`.jsc` file must have been compiled using `bytenode.compileFile()`, or have been wrapped inside `Module.wrap()` function. Otherwise it won't work as a module and it can NOT be required.
Please note `.jsc` files must run with the same Node.js version that was used to compile it (using same architecture of course). Also, `.jsc` files are CPU-agnostic. However, you should run your tests before and after deployment, because V8 sanity checks include some checks related to CPU supported features, so this may cause errors in some rare cases.
---
## Acknowledgements
I had the idea of this tool many years ago. However, I finally decided to implement it after seeing this [issue](https://github.com/nodejs/node/issues/11842) by @hashseed. Also, some parts were inspired by [v8-compile-cache](https://github.com/zertosh/v8-compile-cache) by @zertosh.

View File

@ -1,157 +0,0 @@
#!/usr/bin/env node
'use strict';
const fs = require('fs');
const path = require('path');
const wrap = require('module').wrap;
const spawnSync = require('child_process').spawnSync;
const bytenode = require('./index.js');
const args = process.argv.slice(2);
if (args.includes('-c')) {
args[args.indexOf('-c')] = '--compile';
}
if (args.includes('-o')) {
args[args.indexOf('-o')] = '--out';
}
if (args.includes('-h')) {
args[args.indexOf('-h')] = '--help';
}
if (args.includes('-v')) {
args[args.indexOf('-v')] = '--version';
}
if (args.includes('-n')) {
args[args.indexOf('-n')] = '--no-module';
}
if (args.includes('-e')) {
args[args.indexOf('-e')] = '--electron';
}
if (args.includes('-l')) {
args[args.indexOf('-l')] = '--loader';
}
let loaderFilename;
let createLoader = false;
if (args.includes('--loader')) {
createLoader = true;
const nextIndex = args.indexOf('--loader') + 1;
const nextItem = args[nextIndex];
if (nextItem && nextItem[0] !== '-') {
loaderFilename = nextItem;
// remove the loader filename from the args so it
// isn't mistaken for a file to compile
args.splice(nextIndex, 1);
}
}
if (args.includes('--no-loader')) {
createLoader = false;
}
const program = {
dirname: __dirname,
filename: __filename,
nodeBin: process.argv[0],
flags: args.filter(arg => arg[0] === '-'),
files: args.filter(arg => arg[0] !== '-' && arg[1] !== '-')
};
if (program.flags.includes('--compile')) {
program.files.forEach(async function (filename) {
filename = path.resolve(filename);
if (fs.existsSync(filename) && fs.statSync(filename).isFile()) {
const compileAsModule = !program.flags.includes('--no-module');
const electron = program.flags.includes('--electron');
try {
await bytenode.compileFile({ filename, compileAsModule, electron, createLoader, loaderFilename });
} catch (error) {
console.error(error);
}
} else {
console.error(`Error: Cannot find file '${filename}'.`);
}
});
if (program.files.length === 0) {
let script = '';
process.stdin.setEncoding('utf-8');
process.stdin.on('readable', () => {
const data = process.stdin.read();
if (data !== null) {
script += data;
}
});
process.stdin.on('end', () => {
try {
if (program.flags.includes('--no-module')) {
process.stdout.write(bytenode.compileCode(script));
} else {
process.stdout.write(bytenode.compileCode(wrap(script)));
}
} catch (error) {
console.error(error);
}
});
}
} else if (program.flags.includes('--help')) {
console.log(`
Usage: bytenode [option] [ FILE... | - ] [arguments]
Options:
-h, --help show help information.
-v, --version show bytenode version.
-c, --compile [ FILE... | - ] compile stdin, a file, or a list of files
-n, --no-module compile without producing commonjs module
-e, --electron compile for Electron
--no-loader do not create a loader file, conflicts with -l
-l, --loader [ FILE | PATTERN ] create a loader file and optionally define
loader filename or pattern using % as filename replacer
defaults to %.loader.js
Examples:
$ bytenode -c script.js compile \`script.js\` to \`script.jsc\`.
$ bytenode -c server.js app.js
$ bytenode -c src/*.js compile all \`.js\` files in \`src/\` directory.
$ bytenode script.jsc [arguments] run \`script.jsc\` with arguments.
$ bytenode open Node REPL with bytenode pre-loaded.
$ echo 'console.log("Hello");' | bytenode --compile - > hello.jsc
compile from stdin and save to \`hello.jsc\`
`);
} else if (program.flags.includes('--version') && program.flags.length === 1 && program.files.length === 0) {
const pkg = require('../package.json');
console.log(pkg.name, pkg.version);
console.log('Node', process.versions.node);
if (process.versions.electron) {
console.log('Electron', process.versions.electron);
}
} else {
try {
spawnSync(program.nodeBin, [
'-r',
path.resolve(__dirname, 'index.js')
].concat(args), {
stdio: 'inherit'
});
} catch (error) {
console.error(error);
}
}

View File

@ -1,17 +0,0 @@
/// <reference types="node" />
export declare const compileCode: (javascriptCode: string) => Buffer;
export declare const compileElectronCode: (javascriptCode: string) => Promise<Buffer>;
export declare const runBytecode: (bytecodeBuffer: Buffer) => any;
interface BytenodeOptions {
filename: string;
output?: string;
compileAsModule?: boolean;
electron?: boolean;
createLoader?: boolean;
loaderFilename?: string;
}
export declare const compileFile: (args: BytenodeOptions | string, output?: string | undefined) => Promise<string>;
export declare const runBytecodeFile: (filename: string) => any;
export declare function addLoaderFile(fileToLoad: string, loaderFilename?: string): void;
export declare function loaderCode(targetPath: string): string;
export {};

View File

@ -1,343 +0,0 @@
'use strict';
const fs = require('fs');
const vm = require('vm');
const v8 = require('v8');
const path = require('path');
const Module = require('module');
const fork = require('child_process').fork;
v8.setFlagsFromString('--no-lazy');
if (Number.parseInt(process.versions.node, 10) >= 12) {
v8.setFlagsFromString('--no-flush-bytecode'); // Thanks to A-Parser (@a-parser)
}
const COMPILED_EXTNAME = '.jsc';
/**
* Generates v8 bytecode buffer.
* @param {string} javascriptCode JavaScript source that will be compiled to bytecode.
* @returns {Buffer} The generated bytecode.
*/
const compileCode = function (javascriptCode) {
if (typeof javascriptCode !== 'string') {
throw new Error(`javascriptCode must be string. ${typeof javascriptCode} was given.`);
}
const script = new vm.Script(javascriptCode, {
produceCachedData: true
});
const bytecodeBuffer = (script.createCachedData && script.createCachedData.call)
? script.createCachedData()
: script.cachedData;
return bytecodeBuffer;
};
/**
* This function runs the compileCode() function (above)
* via a child process usine Electron as Node
* @param {string} javascriptCode
* @returns {Promise<Buffer>} - returns a Promise which resolves in the generated bytecode.
*/
const compileElectronCode = function (javascriptCode) {
return new Promise((resolve, reject) => {
let data = Buffer.from([]);
const electronPath = path.join('node_modules', 'electron', 'cli.js');
if (!fs.existsSync(electronPath)) {
throw new Error('Electron not installed');
}
const bytenodePath = path.join(__dirname, 'cli.js');
// create a subprocess in which we run Electron as our Node and V8 engine
// running Bytenode to compile our code through stdin/stdout
const proc = fork(electronPath, [bytenodePath, '--compile', '--no-module', '-'], {
env: { ELECTRON_RUN_AS_NODE: '1' },
stdio: ['pipe', 'pipe', 'pipe', 'ipc']
});
if (proc.stdin) {
proc.stdin.write(javascriptCode);
proc.stdin.end();
}
if (proc.stdout) {
proc.stdout.on('data', (chunk) => {
data = Buffer.concat([data, chunk]);
});
proc.stdout.on('error', (err) => {
console.error(err);
});
proc.stdout.on('end', () => {
resolve(data);
});
}
if (proc.stderr) {
proc.stderr.on('data', (chunk) => {
console.error('Error: ', chunk);
});
proc.stderr.on('error', (err) => {
console.error('Error: ', err);
});
}
proc.addListener('message', (message) => console.log(message));
proc.addListener('error', err => console.error(err));
proc.on('error', (err) => reject(err));
proc.on('exit', () => { resolve(data); });
});
};
// TODO: rewrite this function
const fixBytecode = function (bytecodeBuffer) {
if (!Buffer.isBuffer(bytecodeBuffer)) {
throw new Error('bytecodeBuffer must be a buffer object.');
}
const dummyBytecode = compileCode('"ಠ_ಠ"');
if (process.version.startsWith('v8.8') || process.version.startsWith('v8.9')) {
// Node is v8.8.x or v8.9.x
dummyBytecode.slice(16, 20).copy(bytecodeBuffer, 16);
dummyBytecode.slice(20, 24).copy(bytecodeBuffer, 20);
} else if (process.version.startsWith('v12') ||
process.version.startsWith('v13') ||
process.version.startsWith('v14') ||
process.version.startsWith('v15') ||
process.version.startsWith('v16')) {
dummyBytecode.slice(12, 16).copy(bytecodeBuffer, 12);
} else {
dummyBytecode.slice(12, 16).copy(bytecodeBuffer, 12);
dummyBytecode.slice(16, 20).copy(bytecodeBuffer, 16);
}
};
// TODO: rewrite this function
const readSourceHash = function (bytecodeBuffer) {
if (!Buffer.isBuffer(bytecodeBuffer)) {
throw new Error('bytecodeBuffer must be a buffer object.');
}
if (process.version.startsWith('v8.8') || process.version.startsWith('v8.9')) {
// Node is v8.8.x or v8.9.x
// eslint-disable-next-line no-return-assign
return bytecodeBuffer.slice(12, 16).reduce((sum, number, power) => sum += number * Math.pow(256, power), 0);
} else {
// eslint-disable-next-line no-return-assign
return bytecodeBuffer.slice(8, 12).reduce((sum, number, power) => sum += number * Math.pow(256, power), 0);
}
};
/**
* Runs v8 bytecode buffer and returns the result.
* @param {Buffer} bytecodeBuffer The buffer object that was created using compileCode function.
* @returns {any} The result of the very last statement executed in the script.
*/
const runBytecode = function (bytecodeBuffer) {
if (!Buffer.isBuffer(bytecodeBuffer)) {
throw new Error('bytecodeBuffer must be a buffer object.');
}
fixBytecode(bytecodeBuffer);
const length = readSourceHash(bytecodeBuffer);
let dummyCode = '';
if (length > 1) {
dummyCode = '"' + '\u200b'.repeat(length - 2) + '"'; // "\u200b" Zero width space
}
const script = new vm.Script(dummyCode, {
cachedData: bytecodeBuffer
});
if (script.cachedDataRejected) {
throw new Error('Invalid or incompatible cached data (cachedDataRejected)');
}
return script.runInThisContext();
};
/**
* Compiles JavaScript file to .jsc file.
* @param {object|string} args
* @param {string} args.filename The JavaScript source file that will be compiled
* @param {boolean} [args.compileAsModule=true] If true, the output will be a commonjs module
* @param {string} [args.output=filename.jsc] The output filename. Defaults to the same path and name of the original file, but with `.jsc` extension.
* @param {boolean} [args.electron=false] If true, compile code for Electron (which needs to be installed)
* @param {boolean} [args.createLoader=false] If true, create a loader file.
* @param {boolean} [args.loaderFilename='%.loader.js'] Filename or pattern for generated loader files. Defaults to originalFilename.loader.js. Use % as a substitute for originalFilename.
* @param {string} [output] The output filename. (Deprecated: use args.output instead)
* @returns {Promise<string>} A Promise which returns the compiled filename
*/
const compileFile = async function (args, output) {
let filename, compileAsModule, electron, createLoader, loaderFilename;
if (typeof args === 'string') {
filename = args;
compileAsModule = true;
electron = false;
createLoader = false;
} else if (typeof args === 'object') {
filename = args.filename;
compileAsModule = args.compileAsModule !== false;
electron = args.electron;
createLoader = args.createLoader;
loaderFilename = args.loaderFilename;
if (loaderFilename) createLoader = true;
}
if (typeof filename !== 'string') {
throw new Error(`filename must be a string. ${typeof filename} was given.`);
}
// @ts-ignore
const compiledFilename = args.output || output || filename.slice(0, -3) + COMPILED_EXTNAME;
if (typeof compiledFilename !== 'string') {
throw new Error(`output must be a string. ${typeof compiledFilename} was given.`);
}
const javascriptCode = fs.readFileSync(filename, 'utf-8');
let code;
if (compileAsModule) {
code = Module.wrap(javascriptCode.replace(/^#!.*/, ''));
} else {
code = javascriptCode.replace(/^#!.*/, '');
}
let bytecodeBuffer;
if (electron) {
bytecodeBuffer = await compileElectronCode(code);
} else {
bytecodeBuffer = compileCode(code);
}
fs.writeFileSync(compiledFilename, bytecodeBuffer);
if (createLoader) {
addLoaderFile(compiledFilename, loaderFilename);
}
return compiledFilename;
};
/**
* Runs .jsc file and returns the result.
* @param {string} filename
* @returns {any} The result of the very last statement executed in the script.
*/
const runBytecodeFile = function (filename) {
if (typeof filename !== 'string') {
throw new Error(`filename must be a string. ${typeof filename} was given.`);
}
const bytecodeBuffer = fs.readFileSync(filename);
return runBytecode(bytecodeBuffer);
};
Module._extensions[COMPILED_EXTNAME] = function (fileModule, filename) {
const bytecodeBuffer = fs.readFileSync(filename);
fixBytecode(bytecodeBuffer);
const length = readSourceHash(bytecodeBuffer);
let dummyCode = '';
if (length > 1) {
dummyCode = '"' + '\u200b'.repeat(length - 2) + '"'; // "\u200b" Zero width space
}
const script = new vm.Script(dummyCode, {
filename: filename,
lineOffset: 0,
displayErrors: true,
cachedData: bytecodeBuffer
});
if (script.cachedDataRejected) {
throw new Error('Invalid or incompatible cached data (cachedDataRejected)');
}
/*
This part is based on:
https://github.com/zertosh/v8-compile-cache/blob/7182bd0e30ab6f6421365cee0a0c4a8679e9eb7c/v8-compile-cache.js#L158-L178
*/
function require (id) {
return fileModule.require(id);
}
require.resolve = function (request, options) {
// @ts-ignore
return Module._resolveFilename(request, fileModule, false, options);
};
if (process.mainModule) {
require.main = process.mainModule;
}
// @ts-ignore
require.extensions = Module._extensions;
// @ts-ignore
require.cache = Module._cache;
const compiledWrapper = script.runInThisContext({
filename: filename,
lineOffset: 0,
columnOffset: 0,
displayErrors: true
});
const dirname = path.dirname(filename);
const args = [fileModule.exports, require, fileModule, filename, dirname, process, global];
return compiledWrapper.apply(fileModule.exports, args);
};
/**
* Add a loader file for a given .jsc file
* @param {String} fileToLoad path of the .jsc file we're loading
* @param {String} loaderFilename - optional pattern or name of the file to write - defaults to filename.loader.js. Patterns: "%" represents the root name of .jsc file.
*/
const addLoaderFile = function (fileToLoad, loaderFilename) {
let loaderFilePath;
if (typeof loaderFilename === 'boolean' || loaderFilename === undefined || loaderFilename === '') {
loaderFilePath = fileToLoad.replace('.jsc', '.loader.js');
} else {
loaderFilename = loaderFilename.replace('%', path.parse(fileToLoad).name);
loaderFilePath = path.join(path.dirname(fileToLoad), loaderFilename);
}
const relativePath = path.relative(path.dirname(loaderFilePath), fileToLoad);
const code = loaderCode('./' + relativePath);
fs.writeFileSync(loaderFilePath, code);
};
const loaderCode = function (targetPath) {
return `
require('bytenode');
require('${targetPath}');
`;
};
global.bytenode = {
compileCode,
compileFile,
compileElectronCode,
runBytecode,
runBytecodeFile,
addLoaderFile,
loaderCode
};
module.exports = global.bytenode;

View File

@ -1,66 +0,0 @@
{
"_from": "bytenode",
"_id": "bytenode@1.3.3",
"_inBundle": false,
"_integrity": "sha512-N/d5zwUSsl7WbwY3xVmh8TzDjW4PyVxbb0RQdwc80PKs97a99WVfO+k/dfdG49Xr4NQyab8s6lQJd4tdUo7X1Q==",
"_location": "/bytenode",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
"raw": "bytenode",
"name": "bytenode",
"escapedName": "bytenode",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/bytenode/-/bytenode-1.3.3.tgz",
"_shasum": "cec8ef591647baa9ba6e8059c29625f95372fcc3",
"_spec": "bytenode",
"_where": "E:\\Github_Repositories\\EreshkigalMods_reworked\\AdvancedBotLoadouts_new\\ZEreshkigal-AdvancedBotLoadouts",
"author": {
"name": "Osama Abbas",
"email": "pw.osama@gmail.com"
},
"bin": {
"bytenode": "lib/cli.js"
},
"bugs": {
"url": "https://github.com/bytenode/bytenode/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "A minimalist bytecode compiler for Node.js",
"devDependencies": {
"electron": "^12.0.9",
"mocha": "^8.4.0"
},
"files": [
"lib"
],
"homepage": "https://github.com/bytenode/bytenode#readme",
"keywords": [
"bytenode",
"bytecode",
"v8-snapshots",
"compile",
"compiler"
],
"license": "MIT",
"main": "lib/index.js",
"name": "bytenode",
"repository": {
"type": "git",
"url": "git+https://github.com/bytenode/bytenode.git"
},
"scripts": {
"test": "mocha ./test/*.test.js"
},
"types": "lib/index.d.ts",
"version": "1.3.3"
}

View File

@ -0,0 +1,32 @@
/*
エレシュキガル
*/
"use strict";
//AIO Modules
const Other = require("./src/other.js");
const Items = require("./src/items.js");
const Raids = require("./src/raids.js");
const Traders = require("./src/traders.js");
const Players = require("./src/player.js");
const Warnings = require("./src/warnings.js");
class Ereshkigal {
constructor() {
const mod = require("./package.json")
const config = require("./config/config.json");
Logger.info(`Loading: ${mod.name} : ${mod.version}`);
ModLoader.onLoad["AioMod-items"] = Items.ApplyItemsModifications;
ModLoader.onLoad["AioMod-raids"] = Raids.ApplyRaidsModifications;
ModLoader.onLoad["AioMod-traders"] = Traders.ApplyTradersModifications;
ModLoader.onLoad["AioMod-players"] = Players.ApplyPlayerModifications;
ModLoader.onLoad["AioMod-other"] = Other.ApplyVariousModifications;
if (config.other.ShowModLogs === true) {
ModLoader.onLoad["AioMod-warnings"] = Warnings.SendUserInformations;
}
}
}
module.exports = new Ereshkigal();

Binary file not shown.

View File

@ -1,10 +1,10 @@
{ {
"name": "AllinOneMod", "name": "AllinOneMod",
"author": "Ereshkigal", "author": "Ereshkigal",
"version": "2.2.1", "version": "2.3.0",
"license": "NCSA Open Source", "license": "NCSA Open Source",
"dependencies": { "dependencies": {
"CoreMod": "2.0.1" "CoreMod": "2.1.0"
}, },
"main": "loader.js" "main": "package.js"
} }

View File

@ -10,6 +10,7 @@ class itemsModification {
const config = require("../config/config.json"); const config = require("../config/config.json");
const database = DatabaseServer.tables; const database = DatabaseServer.tables;
const items = database.templates.items; const items = database.templates.items;
const global = database.globals
const CoreMod = require("../../CoreMod/src/Core.js") const CoreMod = require("../../CoreMod/src/Core.js")
const OtherModitication = require("./other.js"); const OtherModitication = require("./other.js");
@ -63,39 +64,68 @@ class itemsModification {
} }
} }
if (config.items.RemoveItemsDurabilityBurn === true) { if (config.items.RemoveItemsDurabilityBurn === true) {
Logger.log("RemoveItemsDurabilityBurn: You aren't on 12.11 yet, disable that :)")
/*
if (base._props.DurabilityBurnModificator) { if (base._props.DurabilityBurnModificator) {
CoreMod.EditSimpleItemData(id, "DurabilityBurnModificator", 0) CoreMod.EditSimpleItemData(id, "DurabilityBurnModificator", 0)
} }
*/
}
if (config.items.RemoveBulletsWeaponDurabilityDamage === true) {
if (base._props.Deterioration) {
CoreMod.EditSimpleItemData(id, "Deterioration", 0)
} }
if (config.items.StackableBarters === true) { }
if (config.items.StackableBarters.activated === true) {
switch (base._parent) { switch (base._parent) {
case "57864ee62459775490116fc1": // Battery case "57864ee62459775490116fc1": // Battery
CoreMod.EditSimpleItemData(id, "StackMaxSize", 5) if (typeof config.items.StackableBarters.Battery === "number" && config.items.StackableBarters.Battery != 0) {
CoreMod.EditSimpleItemData(id, "StackMaxSize", config.items.StackableBarters.Battery)
}
break; break;
case "57864ada245977548638de91": //Building materials case "57864ada245977548638de91": //Building materials
CoreMod.EditSimpleItemData(id, "StackMaxSize", 100) if (typeof config.items.StackableBarters["Building materials"] === "number" && config.items.StackableBarters["Building materials"] != 0) {
CoreMod.EditSimpleItemData(id, "StackMaxSize", config.items.StackableBarters["Building materials"])
}
break; break;
case "57864a66245977548f04a81f": //Electronics case "57864a66245977548f04a81f": //Electronics
CoreMod.EditSimpleItemData(id, "StackMaxSize", 150) if (typeof config.items.StackableBarters.Electronics === "number" && config.items.StackableBarters.Electronics != 0) {
CoreMod.EditSimpleItemData(id, "StackMaxSize", config.items.StackableBarters.Electronics)
}
break; break;
case "57864c322459775490116fbf": //Household goods case "57864c322459775490116fbf": //Household goods
CoreMod.EditSimpleItemData(id, "StackMaxSize", 50) if (typeof config.items.StackableBarters["Household goods"] === "number" && config.items.StackableBarters["Household goods"] != 0) {
CoreMod.EditSimpleItemData(id, "StackMaxSize", config.items.StackableBarters["Household goods"])
}
break; break;
case "57864a3d24597754843f8721": // Jewelry case "57864a3d24597754843f8721": // Jewelry
CoreMod.EditSimpleItemData(id, "StackMaxSize", 25) if (typeof config.items.StackableBarters.Jewelry === "number" && config.items.StackableBarters.Jewelry != 0) {
CoreMod.EditSimpleItemData(id, "StackMaxSize", config.items.StackableBarters.Jewelry)
}
break; break;
case "57864c8c245977548867e7f1": //Medical supplies case "57864c8c245977548867e7f1": //Medical supplies
CoreMod.EditSimpleItemData(id, "StackMaxSize", 65) if (typeof config.items.StackableBarters.Jewelry === "number" && config.items.StackableBarters["Medical supplies"] != 0) {
CoreMod.EditSimpleItemData(id, "StackMaxSize", config.items.StackableBarters["Medical supplies"])
}
break; break;
case "57864e4c24597754843f8723": //Flammable case "57864e4c24597754843f8723": //Flammable
CoreMod.EditSimpleItemData(id, "StackMaxSize", 100) if (typeof config.items.StackableBarters.Flammable === "number" && config.items.StackableBarters.Flammable != 0) {
CoreMod.EditSimpleItemData(id, "StackMaxSize", config.items.StackableBarters.Flammable)
}
break; break;
case "57864bb7245977548b3b66c2": //Tools case "57864bb7245977548b3b66c2": //Tools
CoreMod.EditSimpleItemData(id, "StackMaxSize", 120) if (typeof config.items.StackableBarters.Tools === "number" && config.items.StackableBarters.Tools != 0) {
CoreMod.EditSimpleItemData(id, "StackMaxSize", config.items.StackableBarters.Tools)
}
break; break;
case "590c745b86f7743cc433c5f2": //Other case "590c745b86f7743cc433c5f2": //Other
CoreMod.EditSimpleItemData(id, "StackMaxSize", 150) if (typeof config.items.StackableBarters.Other === "number" &&config.items.StackableBarters.Other != 0) {
CoreMod.EditSimpleItemData(id, "StackMaxSize", config.items.StackableBarters.Other)
}
break; break;
} }
@ -181,7 +211,139 @@ class itemsModification {
} }
} }
} //End of the loot for items modifications } //End of the loop for items modifications
if (config.other["Pre-Wipe events"]["Make Obdolbos Powerfull"] === true) {
const obdolbosBuff = [
{
"BuffType": "StaminaRate",
"Chance": 1,
"Delay": 1,
"Duration": 1800,
"Value": 0.5,
"AbsoluteValue": true,
"SkillName": ""
},
{
"BuffType": "SkillRate",
"Chance": 1,
"Delay": 1,
"Duration": 1800,
"Value": 10,
"AbsoluteValue": true,
"SkillName": "Endurance"
},
{
"BuffType": "SkillRate",
"Chance": 1,
"Delay": 1,
"Duration": 1800,
"Value": 10,
"AbsoluteValue": true,
"SkillName": "Strength"
},
{
"BuffType": "SkillRate",
"Chance": 1,
"Delay": 1,
"Duration": 1800,
"Value": 20,
"AbsoluteValue": true,
"SkillName": "StressResistance"
},
{
"BuffType": "SkillRate",
"Chance": 1,
"Delay": 1,
"Duration": 1800,
"Value": 20,
"AbsoluteValue": true,
"SkillName": "Charisma"
},
{
"BuffType": "SkillRate",
"Chance": 1,
"Delay": 1,
"Duration": 1800,
"Value": -20,
"AbsoluteValue": true,
"SkillName": "Memory"
},
{
"BuffType": "SkillRate",
"Chance": 1,
"Delay": 1,
"Duration": 1800,
"Value": -20,
"AbsoluteValue": true,
"SkillName": "Intellect"
},
{
"BuffType": "SkillRate",
"Chance": 1,
"Delay": 1,
"Duration": 1800,
"Value": -20,
"AbsoluteValue": true,
"SkillName": "Attention"
},
{
"BuffType": "Pain",
"Chance": 0.25,
"Delay": 1,
"Duration": 1800,
"Value": 0,
"AbsoluteValue": false,
"SkillName": ""
},
{
"BuffType": "StomachBloodloss",
"Chance": 0.25,
"Delay": 1,
"Duration": 1800,
"Value": 0,
"AbsoluteValue": false,
"SkillName": ""
},
{
"BuffType": "HydrationRate",
"Chance": 0.25,
"Delay": 1,
"Duration": 1800,
"Value": -0.05,
"AbsoluteValue": true,
"SkillName": ""
},
{
"BuffType": "EnergyRate",
"Chance": 0.25,
"Delay": 1,
"Duration": 1800,
"Value": -0.05,
"AbsoluteValue": true,
"SkillName": ""
},
{
"BuffType": "DamageModifier",
"Chance": 0.25,
"Delay": 1,
"Duration": 1800,
"Value": 0.2,
"AbsoluteValue": false,
"SkillName": ""
},
{
"BuffType": "QuantumTunnelling",
"Chance": 0.25,
"Delay": 1,
"Duration": 1800,
"Value": 0,
"AbsoluteValue": false,
"SkillName": ""
}]
global.config.Health.Effects.Stimulator.Buffs.Buffs_Obdolbos = obdolbosBuff
}
//Individual items proprety changes //Individual items proprety changes
if (config.items.ChangeIndividualItemProperty.activated === true) { if (config.items.ChangeIndividualItemProperty.activated === true) {

View File

@ -48,13 +48,27 @@ class OtherModifications {
Logger.log("[" + prefix + "]" + text + " " + suffix, "white", "red") Logger.log("[" + prefix + "]" + text + " " + suffix, "white", "red")
} }
static IsStolenModsLoaded() { static SpawnRaidersEverywhere(url, info, sessionID){
if (ModLoader.onLoad.SVM) { for (let type in info.conditions) {
this.CustomWarning("AIOMod","You have loaded a stolen mod on your server. Please remove SVM from your modlist in order to use this mod.") let roles = info.conditions[type]
return true; roles.Role = "pmcBot"
} else { roles.Difficulty = "impossible"
return false
} }
return HttpResponse.getBody(BotController.generate(info));
}
static CreateBossWave(role,chance,followers,escortAmount,zones){
const newWave = {
"BossName": role,
"BossChance": chance,
"BossZone": zones,
"BossPlayer": false,
"BossDifficult": "normal",
"BossEscortType": followers,
"BossEscortDifficult": "normal",
"BossEscortAmount": escortAmount,
"Time": -1
}
return newWave
} }
} }

View File

@ -62,8 +62,7 @@ class PlayerModifications {
globals.SkillFatiguePerPoint = 0; globals.SkillFatiguePerPoint = 0;
globals.SkillFreshEffectiveness = 1.0; globals.SkillFreshEffectiveness = 1.0;
} else if (config.player.DisableSkillFatigue === "Custom") { } else if (config.player.DisableSkillFatigue === "Custom") {
Logger.info("AllinOne Mod: DisableSkillFatigue activated on Custom settings");
Logger.info("AllinOne Mod: Fatigue Settings: MinEffect: " + config.player.SkillMinEffectiveness + " FatiguePerPoint: " + config.player.SkillFatiguePerPoint + " FreshEffect: " + config.player.SkillFreshEffectiveness + " FreshPoints: " + config.player.SkillFreshPoints + " PointsBeforeFatigue: " + config.player.SkillPointsBeforeFatigue + " FatigueResetTime: " + config.player.SkillFatigueReset);
globals.SkillMinEffectiveness = config.player.SkillMinEffectiveness; globals.SkillMinEffectiveness = config.player.SkillMinEffectiveness;
globals.SkillFatiguePerPoint = config.player.SkillFatiguePerPoint; globals.SkillFatiguePerPoint = config.player.SkillFatiguePerPoint;
globals.SkillFreshEffectiveness = config.player.SkillFreshEffectiveness; globals.SkillFreshEffectiveness = config.player.SkillFreshEffectiveness;
@ -71,7 +70,6 @@ class PlayerModifications {
globals.SkillPointsBeforeFatigue = config.player.SkillPointsBeforeFatigue; globals.SkillPointsBeforeFatigue = config.player.SkillPointsBeforeFatigue;
globals.SkillFatigueReset = config.player.SkillFatigueReset; globals.SkillFatigueReset = config.player.SkillFatigueReset;
} else if (config.player.DisableSkillFatigue !== "Custom" && config.player.DisableSkillFatigue !== false && config.player.DisableSkillFatigue !== true) { } else if (config.player.DisableSkillFatigue !== "Custom" && config.player.DisableSkillFatigue !== false && config.player.DisableSkillFatigue !== true) {
Logger.warning("DisableSkillFatigue variable is incorrect, please read carefully the description")
} }

View File

@ -10,6 +10,7 @@ class RaidsModifications {
const database = DatabaseServer.tables; const database = DatabaseServer.tables;
const hideout = database.hideout const hideout = database.hideout
const locations = database.locations; const locations = database.locations;
const botList = database.bots.types
const OtherModitication = require("./other.js"); const OtherModitication = require("./other.js");
//Change hideout fuel consumption //Change hideout fuel consumption
@ -184,6 +185,69 @@ class RaidsModifications {
} }
} }
if(config.other["Pre-Wipe events"]["Raiders on all maps"] === true){
HttpRouter.onStaticRoute["/client/game/bot/generate"]["aki"] = OtherModitication.SpawnRaidersEverywhere.bind(this);
}
if(config.other["Pre-Wipe events"]["Killa on factory"] === true){
const KillaWave = OtherModitication.CreateBossWave("bossKilla",100,"followerBully",0,locations["factory4_day"].base.OpenZones)
locations["factory4_day"].base.BossLocationSpawn.push(KillaWave)
locations["factory4_night"].base.BossLocationSpawn.push(KillaWave)
}
if(config.other["Pre-Wipe events"]["All bosses on reserve"] === true){
let bossWave = OtherModitication.CreateBossWave("bossKilla",100,"followerBully",0,locations["rezervbase"].base.OpenZones)
locations["rezervbase"].base.BossLocationSpawn.push(bossWave)
bossWave = OtherModitication.CreateBossWave("bossBully",100,"followerBully",4,locations["rezervbase"].base.OpenZones)
locations["rezervbase"].base.BossLocationSpawn.push(bossWave)
bossWave = OtherModitication.CreateBossWave("bossKojaniy",100,"followerKojaniy",2,locations["rezervbase"].base.OpenZones)
locations["rezervbase"].base.BossLocationSpawn.push(bossWave)
bossWave = OtherModitication.CreateBossWave("bossSanitar",100,"followerSanitar",2,locations["rezervbase"].base.OpenZones)
locations["rezervbase"].base.BossLocationSpawn.push(bossWave)
}
if(config.other["Pre-Wipe events"]["Gluhkar on labs"] === true){
const GlugluWave = {
"BossName": "bossGluhar",
"BossChance": 43,
"BossZone": "ZoneRailStrorage,ZoneRailStrorage,ZoneRailStrorage,ZonePTOR1,ZonePTOR2,ZoneBarrack,ZoneBarrack,ZoneBarrack,ZoneSubStorage",
"BossPlayer": false,
"BossDifficult": "normal",
"BossEscortType": "followerGluharAssault",
"BossEscortDifficult": "normal",
"BossEscortAmount": "0",
"Time": -1,
"TriggerId": "",
"TriggerName": "",
"Supports": [
{
"BossEscortType": "followerGluharAssault",
"BossEscortDifficult": [
"normal"
],
"BossEscortAmount": "2"
},
{
"BossEscortType": "followerGluharSecurity",
"BossEscortDifficult": [
"normal"
],
"BossEscortAmount": "2"
},
{
"BossEscortType": "followerGluharScout",
"BossEscortDifficult": [
"normal"
],
"BossEscortAmount": "2"
}
]
}
GlugluWave.BossZone = locations["laboratory"].base.OpenZones
locations["laboratory"].base.BossLocationSpawn.push(GlugluWave)
}
//Extend raids to 16 hours //Extend raids to 16 hours
if (config.raids.ExtendedRaid === true) { if (config.raids.ExtendedRaid === true) {
Logger.info("AllinOne Mod: Extended Raid activated"); Logger.info("AllinOne Mod: Extended Raid activated");

View File

@ -81,6 +81,23 @@ class TradersModifications {
} }
} }
//All cheap items on traders
if(config.other["Pre-Wipe events"]["All traders sells cheap items"] === true){
for(const trader in traders){
for(const assort in traders[trader].assort.barter_scheme){
let itemScheme = traders[trader].assort.barter_scheme[assort]
if(itemScheme[0][0]._tpl === "5449016a4bdc2d6f028b456f"){ //Roubles
itemScheme[0][0].count = itemScheme[0][0].count * 0.01
}else if(itemScheme[0][0]._tpl === "5696686a4bdc2da3298b456a"){ //Dollars
itemScheme[0][0].count = itemScheme[0][0].count * 0.1
}else if(itemScheme[0][0]._tpl === "5696686a4bdc2da3298b456a"){ //euros
itemScheme[0][0].count = itemScheme[0][0].count * 0.05
}
}
}
}
//Change insurances return times //Change insurances return times
if (config.traders.InsuranceTime.activated === true) { if (config.traders.InsuranceTime.activated === true) {
Logger.info("AllinOne Mod: InsuranceTime activated"); Logger.info("AllinOne Mod: InsuranceTime activated");
@ -105,9 +122,10 @@ class TradersModifications {
function lvlUp(traderID, sessionID) { function lvlUp(traderID, sessionID) {
if (config.traders.PreventFenceMastering === true) { if (config.traders.PreventFenceMastering === true) {
if (traderID === "579dc571d53a0658a154fbec") { Logger.error("AIOMod : PreventFenceMastering isn't available yet, it's for 12.11 so disable it :)")
continue; /*
} if (traderID === "579dc571d53a0658a154fbec") {}
*/
} }
let pmcData = ProfileController.getPmcProfile(sessionID); let pmcData = ProfileController.getPmcProfile(sessionID);
let loyaltyLevels = DatabaseServer.tables.traders[traderID].base.loyalty.loyaltyLevels; let loyaltyLevels = DatabaseServer.tables.traders[traderID].base.loyalty.loyaltyLevels;

View File

@ -23,7 +23,7 @@ class Warnings {
if (typeof config.items.AllExaminedItems !== "boolean") { if (typeof config.items.AllExaminedItems !== "boolean") {
OtherModitication.CustomWarning("AIO Mod", errors.items.AllExaminedItems) OtherModitication.CustomWarning("AIO Mod", errors.items.AllExaminedItems)
} }
if (typeof config.items.StackableBarters !== "boolean") { if (typeof config.items.StackableBarters.activated !== "boolean") {
OtherModitication.CustomWarning("AIO Mod", errors.items.StackableBarters) OtherModitication.CustomWarning("AIO Mod", errors.items.StackableBarters)
} }
if (typeof config.items.RemoveAllGearPenalties !== "boolean") { if (typeof config.items.RemoveAllGearPenalties !== "boolean") {
@ -182,6 +182,24 @@ class Warnings {
if (config.player.DisableSkillFatigue !== "Custom" && config.player.DisableSkillFatigue !== false && config.player.DisableSkillFatigue !== true) { if (config.player.DisableSkillFatigue !== "Custom" && config.player.DisableSkillFatigue !== false && config.player.DisableSkillFatigue !== true) {
OtherModitication.CustomWarning("AIO Mod", errors.player.DisableSkillFatigue) OtherModitication.CustomWarning("AIO Mod", errors.player.DisableSkillFatigue)
} }
if (typeof config.other["Pre-Wipe events"]["Raiders on all maps"] !== "boolean") {
OtherModitication.CustomWarning("AIO Mod", errors.other["Pre-Wipe events"]["Raiders on all maps"])
}
if (typeof config.other["Pre-Wipe events"]["Killa on factory"] !== "boolean") {
OtherModitication.CustomWarning("AIO Mod", errors.other["Pre-Wipe events"]["Killa on factory"])
}
if (typeof config.other["Pre-Wipe events"]["All bosses on reserve"] !== "boolean") {
OtherModitication.CustomWarning("AIO Mod", errors.other["Pre-Wipe events"]["All bosses on reserve"])
}
if (typeof config.other["Pre-Wipe events"]["All traders sells cheap items"] !== "boolean") {
OtherModitication.CustomWarning("AIO Mod", errors.other["Pre-Wipe events"]["All traders sells cheap items"])
}
if (typeof config.other["Pre-Wipe events"]["Make Obdolbos Powerfull"] !== "boolean") {
OtherModitication.CustomWarning("AIO Mod", errors.other["Pre-Wipe events"]["Make Obdolbos Powerfull"])
}
if (typeof config.other["Pre-Wipe events"]["Gluhkar on labs"] !== "boolean") {
OtherModitication.CustomWarning("AIO Mod", errors.other["Pre-Wipe events"]["Gluhkar on labs"])
}
/////// Activation notices /////// Activation notices
if (config.items.RemoveKeysUsageNumber === true) { if (config.items.RemoveKeysUsageNumber === true) {
Logger.info("AllinOne Mod: RemoveKeysUsageNumber activated"); Logger.info("AllinOne Mod: RemoveKeysUsageNumber activated");
@ -313,8 +331,8 @@ class Warnings {
if (config.traders.AllTraders4Stars === true) { if (config.traders.AllTraders4Stars === true) {
Logger.info("AllInOne Mod: AllSkillsMaster activated") Logger.info("AllInOne Mod: AllSkillsMaster activated")
} }
if (config.items.StackableBarters === true) { if (config.items.StackableBarters.activated === true) {
Logger.info("AllInOne Mod: StackableBarters activated") Logger.info("AllInOne Mod: StackableBarters activated and applied")
} }
if (config.items.RemoveAllGearPenalties === true) { if (config.items.RemoveAllGearPenalties === true) {
Logger.info("AllInOne Mod: RemoveAllGearPenalties activated") Logger.info("AllInOne Mod: RemoveAllGearPenalties activated")
@ -338,6 +356,36 @@ class Warnings {
Logger.info("AllinOne Mod: DisableSkillFatigue activated on Custom settings"); Logger.info("AllinOne Mod: DisableSkillFatigue activated on Custom settings");
Logger.info(`AllinOne Mod: Fatigue Settings: MinEffect: ${config.player.SkillMinEffectiveness} FatiguePerPoint: ${config.player.SkillFatiguePerPoint} FreshEffect: ${config.player.SkillFreshEffectiveness} FreshPoints: ${config.player.SkillFreshPoints} PointsBeforeFatigue: ${config.player.SkillPointsBeforeFatigue} FatigueResetTime: ${config.player.SkillFatigueReset}`); Logger.info(`AllinOne Mod: Fatigue Settings: MinEffect: ${config.player.SkillMinEffectiveness} FatiguePerPoint: ${config.player.SkillFatiguePerPoint} FreshEffect: ${config.player.SkillFreshEffectiveness} FreshPoints: ${config.player.SkillFreshPoints} PointsBeforeFatigue: ${config.player.SkillPointsBeforeFatigue} FatigueResetTime: ${config.player.SkillFatigueReset}`);
} }
if (config.other["Pre-Wipe events"]["Raiders on all maps"] === true) {
Logger.info("AllinOne Mod: Prewipe event activated: Raiders on all maps");
}
if (config.other["Pre-Wipe events"]["Killa on factory"] === true) {
Logger.info("AllinOne Mod: Prewipe event activated: Killa on factory");
}
if (config.other["Pre-Wipe events"]["All bosses on reserve"] === true) {
Logger.info("AllinOne Mod: Prewipe event activated: All bosses on reserve");
}
if (config.other["Pre-Wipe events"]["All traders sells cheap items"] === true) {
Logger.info("AllinOne Mod: Prewipe event activated: All traders sells cheap items");
}
if (config.other["Pre-Wipe events"]["Make Obdolbos Powerfull"] === true) {
Logger.info("AllinOne Mod: Prewipe event activated: Make Obdolbos Powerfull");
}
if (config.other["Pre-Wipe events"]["Gluhkar on labs"] === true) {
Logger.info("AllinOne Mod: Prewipe event activated: Gluhkar on labs");
}
if (config.traders.PreventFenceMastering === true) {
Logger.info("AllinOne Mod: PreventFenceMastering isn't available yet, it's for 12.11 so disable it :)");
}
if (config.player.RemoveScavKarma === true) {
Logger.info("AllinOne Mod: RemoveScavKarma activated");
}
if (config.items.RemoveItemsDurabilityBurn === true) {
Logger.info("AllinOne Mod: RemoveItemsDurabilityBurn activated");
}
if (config.items.RemoveBulletsWeaponDurabilityDamage === true) {
Logger.info("AllinOne Mod: RemoveBulletsWeaponDurabilityDamage activated");
}
} }
} }