Zupas Single Currency script updated for Epoch 1.0.6+ by salival.
-
Discussion URL: https://epochmod.com/forum/topic/43331-zsc-for-epoch-106-and-overwatch-025/
-
original install url: https://github.com/EpochSC/SingleCurrencyStorage
-
original discussion url: https://epochmod.com/forum/topic/28493-alpha-release-single-currency-30-storage-default-hive-no-global-banking/
-
Tested as working on a blank Epoch 1.0.6+ and OverWatch 0.25 server.
-
Designed to minimize duping/glitching of bank related saving with nearby players (checkWallet etc).
-
Lots of code snippets taken from the original Zupa release thread to stop multiple people checking wallet/depositing into the same safe etc.
-
Supports multiple configuration types, Safes/lockboxes only, vehicles only, safes/lockboxes AND vehicles.
-
Supports any map, currently only has server_traders files for Chernarus (default), napf and tavi.
- Zupa for his awesome script being a really good base to start from.
- JasonTM for getting a working copy of the global banking (https://github.com/worldwidesorrow)
- kingpapawawa for helping with testing and supplying the bank icon
- Mission folder install
- dayz_server folder install
- Battleye filter install
- Installing NPC based banks (optional)
- Changing so players don't lose coins on death (PVE weenies)
- Changing from default epoch CfgTraders to OverWatch CfgTraders
- Changing from default Chernarus server_traders to any other map
- Adding other classnames to the list of DZE_MoneyStorageClasses
- Using vehicles to store coins ONLY
- Using vehicles AND DZE_MoneyStorageClasses to store coins
- Giving NEW players coins on their first login
- This install basically assumes you have NO custom variables.sqf or compiles.sqf or fn_selfActions.sqf, I would recommend diffmerging where possible.
- This has all the config traders set up for epoch 1.0.6+ items and OverWatch guns/items. You will need to install the specific version you want to use, See install notes further down.
-
Please, if you report issues can you please attach (on pastebin or similar) your CLIENT rpt log file as this helps find out the errors very quickly. To find this logfile:
C:\users\<YOUR WINDOWS USERNAME>\AppData\Local\Arma 2 OA\ArmA2OA.RPT
-
In mission\init.sqf find:
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf";
and add directly below:
call compile preprocessFileLineNumbers "dayz_code\init\variables.sqf";
-
In mission\init.sqf find:
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";
and add directly below:
call compile preprocessFileLineNumbers "dayz_code\init\compiles.sqf";
-
In mission\init.sqf find:
call compile preprocessFileLineNumbers "server_traders.sqf";
and replace with:
call compile preprocessFileLineNumbers "scripts\traders\server_traders.sqf";
-
In mission\init.sqf find:
waitUntil {scriptDone progress_monitor};
and add directly above:
call compile preprocessFileLineNumbers "scripts\zsc\zscInit.sqf"; execVM "scripts\zsc\playerHud.sqf"; [] execVM "dayz_code\compile\remote_message.sqf";
-
Replace your original description.ext with the one provided or merge the contents if you have modified your own version.
-
Download the
stringTable.xml
file linked below from the Community Localization GitHub and copy it to your mission folder, it is a community based localization file and contains translations for major community mods including this one.
>> Download stringTable.xml <<
- Replace or merge the contents of
server_handleSafeGear.sqf
provided with your original copy.
-
In mission\dayz_code\init\variables.sqf find:
Z_globalBanking = false; // Enable global banking? Disabled by default.
and change to true so it looks like this:
Z_globalBanking = true; // Enable global banking? Disabled by default.
-
Battleye filters for global banking:
In your config<yourServerName>\Battleye\scripts.txt around line 12:
5 createDialog
or5 "createDialog"
add this to the end of it:!"createDialog \"atmDialog\";"
So it will then look like this for example:
5 "createDialog" <CUT> !"createDialog \"BankDialog\";" !"createDialog \"GivePlayerDialog\";" !"createDialog \"atmDialog\";"
-
In infiSTARS AHConfig.sqf, If you have the following line set to true:
/* Check Actions ? */ _CSA = false; /* true or false */ /* this checks mousewheel actions */
Then you will need to find this line in AHConfig.sqf:
"r_player_actions2","s_bank_dialog","s_bank_dialog2","s_build_Hedgehog_DZ","s_build_Sandbag1_DZ","s_build_Wire_cat1","s_building_snapping",
And replace it with this line:
"r_player_actions2","s_bank_dialog","s_bank_dialog1","s_bank_dialog2","s_build_Hedgehog_DZ","s_build_Sandbag1_DZ","s_build_Wire_cat1","s_building_snapping",
-
In your config<yourServerName>\Battleye\scripts.txt around line 12:
5 createDialog
add this to the end of it:!="createDialog \"BankDialog\";" !="createDialog \"GivePlayerDialog\";"
So it will then look like this for example:
5 createDialog <CUT> !="createDialog \"BankDialog\";" !="createDialog \"GivePlayerDialog\";"
-
In your config<yourServerName>\Battleye\scripts.txt around line 51:
5 toString
add this to the end of it:!"_input = parseNumber (toString (_input));"
So it will then look like this for example:
5 toString <CUT> !"_input = parseNumber (toString (_input));"
-
Copy the following directory to your
Arma2 OA\@dayz_epoch_server\addons\dayz_server
folder:dayz_server\bankTraders
-
In mission\init.sqf find this line:
execVM "\z\addons\dayz_server\traders\chernarus11.sqf"; //Add trader agents
add this line directly below:
if (Z_singleCurrency && {Z_globalBanking && Z_globalBankingTraders}) then {execVM "\z\addons\dayz_server\bankTraders\init.sqf";}; // Add global banking agents
-
In
dayz_code\init\variables.sqf
change the following line totrue
Z_globalBankingTraders = false; // Enable global banking traders at trader cities? Disabled by default.
-
In
dayz_code\configs
move or delete the folderCategory
and the filecfgServerTrader.hpp
-
Rename
Category - Overwatch
toCategory
-
Rename
cfgServerTrader - Overwatch.hpp
tocfgServerTrader.hpp
-
In
scripts\traders
move or delete the fileserver_traders.sqf
-
Rename
server_traders - overwatch.sqf
toserver_traders.sqf
-
In
scripts\traders
move or delete the fileserver_traders.sqf
-
Rename
server_traders - whatever-map-name.sqf
toserver_traders.sqf
-
In mission\dayz_code\init\variables.sqf find this line or similar relating to ZSC:
ZSC_MaxMoneyInStorageMultiplier = 50000; // Multiplier for how much money a bank object can hold, example: 200 magazine slots in the object (or the default value above ^^) multiplied by the 50,000 multiplier is 10 million coin storage. (200*50000=10m coins)
Add this line after it:
Z_moneyVariable = "GlobalMoney"; // Uncomment this this to make it so players don't lose coins on death. Will need to disable checkWallet as you can dupe if you have this and check wallet running.
You will also need to disable/remove check wallet as then players can get unlimited coins by constantly checking their body.
-
In
dayz_code\init\variables.sqf
find:DZE_MoneyStorageClasses = DZE_LockableStorage;
and replace with (using Plastic_Pole_EP1_DZ as an example):
DZE_MoneyStorageClasses = DZE_LockableStorage + ["Plastic_Pole_EP1_DZ"];
-
In
scripts\zsc\bankDialog.sqf
find:if !(_typeOf in DZE_MoneyStorageClasses) exitWith {
and replace with:
if !(ZSC_CurrentStorage isKindOf "AllVehicles") exitWith {
-
In
dayz_code\compile\fn_selfActions.sqf
find:if (_typeOfCursorTarget in DZE_MoneyStorageClasses && {!_isLocked} && {!(_typeOfCursorTarget in DZE_LockedStorage)}) then {
and replace with:
if (_isVehicle && {!_isMan} && {!_isLocked} && {_isAlive}) then {
-
dayz_server folder install:
Replace or merge the contents of
dayz_server\system\server_monitor.sqf
provided with your original copy.
-
In
scripts\zsc\bankDialog.sqf
find:if !(_typeOf in DZE_MoneyStorageClasses) exitWith {
and replace with:
if ((!(_typeOf in DZE_MoneyStorageClasses) && !(cursortarget isKindOf "AllVehicles"))) exitWith {
-
In
dayz_code\compile\fn_selfActions.sqf
find:if (_typeOfCursorTarget in DZE_MoneyStorageClasses && {!_isLocked} && {!(_typeOfCursorTarget in DZE_LockedStorage)}) then {
and replace with:
if ((_typeOfCursorTarget in DZE_MoneyStorageClasses || _isVehicle) && {!_isMan} && {!_isLocked} && {_isAlive} && {!(_typeOfCursorTarget in DZE_LockedStorage)}) then {
-
dayz_server folder install:
Replace or merge the contents of
dayz_server\system\server_monitor.sqf
provided with your original copy.In
dayz_server\system\server_monitor.sqf
find:if (Z_SingleCurrency && {_type in DZE_MoneyStorageClasses}) then {
and replace with:
if (Z_SingleCurrency && {(_type in DZE_MoneyStorageClasses) || (_object isKindOf "AllVehicles")}) then {
-
In
dayz_server\compile\server_playerLogin.sqf
find:PVCDZ_plr_Login = [_charID,_inventory,_backpack,_survival,_isNew,dayz_versionNo,_model,_isHiveOk,_newPlayer,_isInfected,_group,_CharacterCoins,_playerCoins,_BankCoins];
If you want to give the player (so coins are on the body) 5k coins, add this line before it:
if (_newPlayer) then {_characterCoins = 5000;};
If you want to give the player 5k coins into their bank, add this line instead:
if (_newPlayer) then {_bankCoins = 5000;};