Randomize BlackMarket Trader count

This commit is contained in:
He-Man 2020-07-30 19:52:49 +02:00
parent 1877f46c09
commit 33d09c71a2
2 changed files with 4 additions and 3 deletions

View File

@ -4,7 +4,7 @@ class CfgBlackMarket
// will always get set to BlackMarkets // will always get set to BlackMarkets
// Example: {0,2} will set the 1st and 3rd defined static trader as a BlackMarket // Example: {0,2} will set the 1st and 3rd defined static trader as a BlackMarket
BlackMarketTraderCount = 2; // 2 Random Traders will be set to BlackMarkets (change every Restart) BlackMarketTraderCount[] = {1,2}; // {min,max} Random Traders will be set to BlackMarkets (change every Restart)
ShowBlackMarketTraders = "true"; // Show Marker for Blackmarket Traders? ShowBlackMarketTraders = "true"; // Show Marker for Blackmarket Traders?
BlackMarketMarkerColor = "ColorRed"; // Marker color for Blackmarket Traders (if ShowBlackMarketTraders = "true") BlackMarketMarkerColor = "ColorRed"; // Marker color for Blackmarket Traders (if ShowBlackMarketTraders = "true")
BlackMarketPurchaseMulti = 5; // Multi on purchase on top of the default price BlackMarketPurchaseMulti = 5; // Multi on purchase on top of the default price

View File

@ -192,7 +192,7 @@ publicvariable "EPOCH_Traders";
// Start Black Market Traders // Start Black Market Traders
_StaticBlackMarketIdx = ["CfgBlackMarket", "StaticBlackMarketIdx", []] call EPOCH_fnc_returnConfigEntryV2; _StaticBlackMarketIdx = ["CfgBlackMarket", "StaticBlackMarketIdx", []] call EPOCH_fnc_returnConfigEntryV2;
_BlackMarketTraderCount = ["CfgBlackMarket", "BlackMarketTraderCount", 0] call EPOCH_fnc_returnConfigEntryV2; _BlackMarketTraderCount = ["CfgBlackMarket", "BlackMarketTraderCount", [0,0]] call EPOCH_fnc_returnConfigEntryV2;
_ShowBlackMarketTraders = ["CfgBlackMarket", "ShowBlackMarketTraders", true] call EPOCH_fnc_returnConfigEntryV2; _ShowBlackMarketTraders = ["CfgBlackMarket", "ShowBlackMarketTraders", true] call EPOCH_fnc_returnConfigEntryV2;
_BlackMarketMarkerColor = ["CfgBlackMarket", "BlackMarketMarkerColor", "ColorRed"] call EPOCH_fnc_returnConfigEntryV2; _BlackMarketMarkerColor = ["CfgBlackMarket", "BlackMarketMarkerColor", "ColorRed"] call EPOCH_fnc_returnConfigEntryV2;
_BlackMarketItemsCount = ["CfgBlackMarket", "BlackMarketItemsCount", 100] call EPOCH_fnc_returnConfigEntryV2; _BlackMarketItemsCount = ["CfgBlackMarket", "BlackMarketItemsCount", 100] call EPOCH_fnc_returnConfigEntryV2;
@ -268,7 +268,8 @@ _Blackmarket_BlackList = ["CfgBlackMarket", "Blackmarket_BlackList", []] call EP
_BlackMarketTraders pushback _x; _BlackMarketTraders pushback _x;
}; };
} foreach EPOCH_StaticTraders; } foreach EPOCH_StaticTraders;
for "_i" from 1 to _BlackMarketTraderCount do { _BlackMarketTraderCount params [["_minmarkets",0],["_maxmarkets",0]];
for "_i" from 1 to (round (_minmarkets + random (_maxmarkets - _minmarkets))) do {
if (count Epoch_DynamicTraders > 0) then { if (count Epoch_DynamicTraders > 0) then {
_trader = selectrandom Epoch_DynamicTraders; _trader = selectrandom Epoch_DynamicTraders;
Epoch_DynamicTraders = Epoch_DynamicTraders - [_trader]; Epoch_DynamicTraders = Epoch_DynamicTraders - [_trader];