Jump to content
  • 0

Changing Bandit trader to Superhero trader


TiMMaY

Question

I have been searching high and low.  I have recently changed one of our servers to PVE.  I want to change the bandit trader to  "Super"hero trader?  I have tried EVERY post in here and for what ever reason it just wont work.  Currently have CfgServerTrader installed and running Epoch Cherno Arma is 112555 and my dayz is 1.0.5.1,

 

Any help would be great!

 

Thanks in advance

 

TiMMaY[KoS] 

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Edit fn_selfActions.sqf =)

    // All Traders
    if (_isMan and !_isPZombie and _traderType in serverTraders) then {
        
        if (s_player_parts_crtl < 0) then {

            // get humanity
            _humanity = player getVariable ["humanity",0];
            _traderMenu = call compile format["menu_%1;",_traderType];

            // diag_log ("TRADER = " + str(_traderMenu));
            
            _low_high = "low";
            _humanity_logic = false;
            if((_traderMenu select 2) == "friendly") then {
                _humanity_logic = (_humanity < -5000);
            };
            if((_traderMenu select 2) == "hostile") then {
                _low_high = "high";
                _humanity_logic = (_humanity > -5000);
            };
            if((_traderMenu select 2) == "hero") then {
                _humanity_logic = (_humanity < 5000);
            };
            if(_humanity_logic) then {
                _cancel = player addAction [format[localize "STR_EPOCH_ACTIONS_HUMANITY",_low_high], "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""];
                s_player_parts set [count s_player_parts,_cancel];
            } else {
                
                // Static Menu
                {
                    //diag_log format["DEBUG TRADER: %1", _x];
                    _buy = player addAction [format["Trade %1 %2 for %3 %4",(_x select 3),(_x select 5),(_x select 2),(_x select 6)], "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",[(_x select 0),(_x select 1),(_x select 2),(_x select 3),(_x select 4),(_x select 5),(_x select 6)], (_x select 7), true, true, "",""];
                    s_player_parts set [count s_player_parts,_buy];
                
                } forEach (_traderMenu select 1);
                // Database menu
                _buy = player addAction [localize "STR_EPOCH_PLAYER_289", "\z\addons\dayz_code\actions\show_dialog.sqf",(_traderMenu select 0), 999, true, false, "",""];
                s_player_parts set [count s_player_parts,_buy];

            };
            s_player_parts_crtl = 1;
            
        };
    } else {
        {player removeAction _x} forEach s_player_parts;s_player_parts = [];
        s_player_parts_crtl = -1;
    };

 

Link to comment
Share on other sites

  • 0

Yep, if adding a new trader, add:

 

 
if((_traderMenu select 2) == "superhero") then {
_humanity_logic = (_humanity < 25000);
};
 
Under:
 
if((_traderMenu select 2) == "hero") then {
_humanity_logic = (_humanity < 5000);
};

 

 

The 25000 is the humanity needed. So, _humanity < 25000 is hero and _humanity > -25000 is bandit.

Also change the name for each custom trader.

 

If just changing the already current traders just change the 5000 to what you want

 

if((_traderMenu select 2) == "hero") then {
_humanity_logic = (_humanity < 5000);
};
 

 

 

 

 

 
 

 

 

 

 

Link to comment
Share on other sites

  • 0

Thanks for all of the ideas.  I have tried to edit the Bandit trader to 25000..tbh I tried to change the wording from hostile to super maybe that is my issue?  Should I just change the humanity and leave the bandit skin and the word hostile?  Also does someone have a link to creating a completely new trader city?

 

Thanks guys!  

TiMMaY

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...