mdavidg Posted January 10, 2014 Report Share Posted January 10, 2014 I was just Messing about in DayZ Epoch and thought of an idea, what if i could make "New" traders for say a "Hero" level 2, this hero would have 10k humanity in order to access this trader, and the trader would have a new list that only people with 10k+ humanity could access. i was just wondering, whether this would be possible and if so, which files would i need to edit on my server? Link to comment Share on other sites More sharing options...
mdavidg Posted January 11, 2014 Author Report Share Posted January 11, 2014 Know-one knows if this is possible? Link to comment Share on other sites More sharing options...
Radec59437 Posted January 11, 2014 Report Share Posted January 11, 2014 I had a similar concept a while back, but it would have involved using humanity as currency.No idea how to accomplish that though. Link to comment Share on other sites More sharing options...
wokkelwakker Posted January 12, 2014 Report Share Posted January 12, 2014 That should be possible. I haven't tested this, but i guess you can try it? :p There are a few things you have to know how to do: 1. Adding new traders to the server. Here's a tutorial by mysticviperx: 2. Making a custom compiles.sqf & fn_selfactions.sqf (Step 1-3): http://epochmod.com/forum/index.php?/topic/965-release-trader-menu-dialogs/?p=6646 3. Editing fn_selfactions.sqf for your purpose. Find this in fn_selfactions.sqf: _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["Your humanity is too %1 this trader refuses to talk to you.",_low_high], "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""]; s_player_parts set [count s_player_parts,_cancel]; } else { Add one extra "if statement" below it, and lets call the new trader superhero + the 10k humanity so it will look like this: _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((_traderMenu select 2) == "superhero") then { _humanity_logic = (_humanity < 10000); }; if(_humanity_logic) then { _cancel = player addAction [format["Your humanity is too %1 this trader refuses to talk to you.",_low_high], "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""]; s_player_parts set [count s_player_parts,_cancel]; } else { Lastly you should edit server_traders.sqf (assuming you already added a new trader!) Example of a newly added trader in server_Traders.sqf: // Super Hero Vendor menu_Tanny_PMC = [ [["Ammunition",478],["Clothes",476],["Helicopter Armed",493],["Military Armed",562],["Trucks Armed",479],["Weapons",477]], [], "hero" ]; change the "hero" to "superhero" (same as in fn_selfactions.sqf) like this: // Super Hero Vendor menu_Tanny_PMC = [ [["Ammunition",478],["Clothes",476],["Helicopter Armed",493],["Military Armed",562],["Trucks Armed",479],["Weapons",477]], [], "superhero" ]; This should work in theory :) ExXoTicC, koolaidman04 and SadPanda 3 Link to comment Share on other sites More sharing options...
mdavidg Posted January 13, 2014 Author Report Share Posted January 13, 2014 i have tried Above, but im unable to get the trader menu to appear upon testing the first section >.> i dont know whether im doing it wrong or whether it no longer works, this is a pastebin link for my coding: the highlighted section is parts that ive edited http://pastebin.com/3bpwA0FQ Link to comment Share on other sites More sharing options...
wokkelwakker Posted January 13, 2014 Report Share Posted January 13, 2014 i have tried Above, but im unable to get the trader menu to appear upon testing the first section >.> i dont know whether im doing it wrong or whether it no longer works, this is a pastebin link for my coding: the highlighted section is parts that ive edited http://pastebin.com/3bpwA0FQ Huh? Where are you pasting that trader code? That should be in server_traders.sqf Link to comment Share on other sites More sharing options...
mdavidg Posted January 14, 2014 Author Report Share Posted January 14, 2014 That is the Server Traders.sqf, located in my Server.Pbo under compile, i followed the guide i think perfectly, but when i go to the trader itself he will be spawned in just he will have no "Trader menu" button? Link to comment Share on other sites More sharing options...
mdavidg Posted January 14, 2014 Author Report Share Posted January 14, 2014 NVM, i found out what i did wrong XD Link to comment Share on other sites More sharing options...
mdavidg Posted January 14, 2014 Author Report Share Posted January 14, 2014 can now confirm this works great :) thanks Link to comment Share on other sites More sharing options...
wokkelwakker Posted January 14, 2014 Report Share Posted January 14, 2014 Lol :p The server_traders.sqf you should edit isn't located in the server pbo, but the mission pbo. But i'm guessing that's what you figured out already ;) Glad to hear it works for you! Link to comment Share on other sites More sharing options...
Shadowking74 Posted January 27, 2014 Report Share Posted January 27, 2014 How does the vehicle spawn in when buying from a custom trader? how do you set that up? Link to comment Share on other sites More sharing options...
cen Posted January 27, 2014 Report Share Posted January 27, 2014 it uses HeliHEmpty object. Link to comment Share on other sites More sharing options...
Axle Posted January 27, 2014 Report Share Posted January 27, 2014 it uses HeliHEmpty object. Or the civilian. Link to comment Share on other sites More sharing options...
Randomness Posted January 27, 2014 Report Share Posted January 27, 2014 Ive always been wondering why -5000 and 5000 havent been replaced by DZE_HeroHumanity & DZE_BanditHumanity, or something similar Link to comment Share on other sites More sharing options...
ISHOOTMONDAYS Posted March 8, 2014 Report Share Posted March 8, 2014 Do you still need to make the edits for fn_selfactions in the linked thread for this to work or can you just make the additional if statement? Link to comment Share on other sites More sharing options...
Niverive Posted April 11, 2014 Report Share Posted April 11, 2014 Alright I'm trying to figure out what I'm doing wrong I am trying to make two new traders one for 30000 humanity and one for -30000 humanity. Both the traders are physically there, they have trader menus, however they aren't selling anything and are not turning me away for not having the required humanity. The only RPT errors I get are below. 12:35:48 Error in expression <menu_Soldier_Sniper_PMC_DZ;> 12:35:48 Error position: <menu_Soldier_Sniper_PMC_DZ;> 12:35:48 Error Undefined variable in expression: menu_soldier_sniper_pmc_dz 12:35:48 Error in expression <menu_Ins_Soldier_GL_DZ;> 12:35:48 Error position: <menu_Ins_Soldier_GL_DZ;> 12:35:48 Error Undefined variable in expression: menu_ins_soldier_gl_dz server_traders.sqf // Super Hero Trader Soldier_Sniper_PMC_DZ = [ [["Dangerous, Dangerous Weapons",694],["Dangerous Armed Vehicles",695]], [], "superhero" ]; // Terrorist Trader Ins_Soldier_GL_DZ = [ [["Dangerous, Dangerous Weapons",696],["Dangerous Armed Vehicles",697]], [], "terrorist" ]; mission.sqf _unit_1500 = objNull; if (true) then { _this = createAgent ["Soldier_Sniper_PMC_DZ", [14248, 14133, 0], [], 0, "CAN_COLLIDE"]; _unit_1500 = _this; _this setDir 0; _this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;"; _this setUnitAbility 0.60000002; _this allowDammage false; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setBehaviour 'CARELESS'; _this forceSpeed 0;_this enableSimulation false;}; _vehicle_1501 = objNull; if (true) then { _this = createVehicle ["HeliHCivil", [14236.6, 14152.1], [], 0, "CAN_COLLIDE"]; _vehicle_1501 = _this; _this setDir 326; _this setPos [14236.6, 14152.1]; }; _unit_1502 = objNull; if (true) then { _this = createAgent ["Ins_Soldier_GL_DZ", [2664.3, 14216.7, 0], [], 0, "CAN_COLLIDE"]; _unit_1502 = _this; _this setDir 208; _this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;"; _this setUnitAbility 0.60000002; _this allowDammage false; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setBehaviour 'CARELESS'; _this forceSpeed 0;_this enableSimulation false;}; _vehicle_1503 = objNull; if (true) then { _this = createVehicle ["HeliHCivil", [2649.8, 14200], [], 0, "CAN_COLLIDE"]; _vehicle_1503 = _this; _this setDir 72; _this setPos [2649.8, 14200]; }; fn_SelfActions.sqf // 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((_traderMenu select 2) == "superhero") then { _humanity_logic = (_humanity < 30000); }; if((_traderMenu select 2) == "terrorist") then { _low_high = "high"; _humanity_logic = (_humanity > -30000); }; if(_humanity_logic) then { _cancel = player addAction [format["Your humanity is too %1 this trader refuses to talk to you.",_low_high], "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""]; s_player_parts set [count s_player_parts,_cancel]; Edit: Was able to get it working, didn't realize I was using the DZ instead of the normal classnames and I forgot menu_ in front of the traders in the servers_trader.sqf. Link to comment Share on other sites More sharing options...
lipemr Posted April 14, 2014 Report Share Posted April 14, 2014 I was just Messing about in DayZ Epoch and thought of an idea, what if i could make "New" traders for say a "Hero" level 2, this hero would have 10k humanity in order to access this trader, and the trader would have a new list that only people with 10k+ humanity could access. i was just wondering, whether this would be possible and if so, which files would i need to edit on my server? then people will just infect a friend and use hundreds of bloodbags to acces it? No, thanks. Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted May 27, 2014 Report Share Posted May 27, 2014 I've set up hero traders that require three levels of humanity. Hero I is 5k, Hero II is 10k and Hero III is 15k. Is there a way to edit the text that tells you that a trader won't talk to you because of your humanity, to include how much humanity is required to trade with them? Link to comment Share on other sites More sharing options...
SuicideScout Posted May 31, 2014 Report Share Posted May 31, 2014 hey guys losing the will to live with this one now lol so im trying to add a super hero vendor to the map. i used this tutorial to add him to the map (https://docs.google.com/document/d/17qG ... UiZuQ/edit) and this tutorial to make a humanitys requirement of 20000 () what i dont understand in the first tutorial is updating the object number, what do i update it to? i have tried many different ones and whatever i change it to, my trader is still on the map. and for the database, what instance do i set it to? it says 11 in that tuorial. anyway the trader is on the map and displayes the menu and items just fine, however anyone can acess it, heros bandits and neutral. im sure my problem is coming from either the object number or the instance but i am at a loss now, if anyone has the answer ill love you for ever lol. here is what i added to my mission.sqf _unit_146 = objNull; if (true) then { _this = createAgent ["Tanny_PMC", [5898.0303, 10544.666], [], 0, "CAN_COLLIDE"]; _unit_146 = _this; _this setDir -83.040123; _this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;"; _this setUnitAbility 0.60000002; _this allowDammage false; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setBehaviour 'CARELESS'; _this forceSpeed 0;_this enableSimulation false; }; here is what my server traders looks like, i have added the tanny_pmc at the top also /*--------------------------------------------------------------------------- Super Hero Vendor ---------------------------------------------------------------------------*/ //super hero menu_Tanny_PMC = [ [["Super Hero Trader",693]], [], "super" ]; here is my fn_selfactions // 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((_traderMenu select 2) == "super") then { _humanity_logic = (_humanity < 20000); }; 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 { he is also set to super in my database written exctly the same and everything and is instance 17 at the moment however i have tried others i will take a screen shot of my database if that helps. Thanks in advance for any help, my mind is boggled lol, Brett. Link to comment Share on other sites More sharing options...
SuicideScout Posted May 31, 2014 Report Share Posted May 31, 2014 also tried lots of skins and lots of object ids and lots of instances lol Link to comment Share on other sites More sharing options...
Kenturrac Posted June 2, 2014 Report Share Posted June 2, 2014 Just be careful which skin you choose since player could be able to trade on other players as soon as they wear the skin of the trader. Link to comment Share on other sites More sharing options...
Havoc302 Posted July 9, 2014 Report Share Posted July 9, 2014 nvm, fixed it, thanks for this, works perfectly when you don't leave out a character :P Link to comment Share on other sites More sharing options...
fr1nk Posted July 9, 2014 Report Share Posted July 9, 2014 This is what I used: _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((_traderMenu select 2) == "hero2") then { _humanity_logic = (_humanity < 10000); }; if((_traderMenu select 2) == "hero3") then { _humanity_logic = (_humanity < 20000); }; 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 { Only things I added were "hero2" (+10k requirement) and "hero3" (+20k requirement). Everything else is default. Link to comment Share on other sites More sharing options...
UltimaBowBii Posted December 26, 2015 Report Share Posted December 26, 2015 Carefull: Don't forget to add "Menu_" before the classname, in server_traders.sqf. @Niverive On 4/11/2014 at 10:56 PM, Niverive said: 12:35:48 Error in expression <menu_Soldier_Sniper_PMC_DZ;> 12:35:48 Error position: <menu_Soldier_Sniper_PMC_DZ;> 12:35:48 Error Undefined variable in expression: menu_soldier_sniper_pmc_dz 12:35:48 Error in expression <menu_Ins_Soldier_GL_DZ;> 12:35:48 Error position: <menu_Ins_Soldier_GL_DZ;> 12:35:48 Error Undefined variable in expression: menu_ins_soldier_gl_dz server_traders.sqf // Super Hero Trader Soldier_Sniper_PMC_DZ = [ [["Dangerous, Dangerous Weapons",694],["Dangerous Armed Vehicles",695]], [], "superhero" ]; // Terrorist Trader Ins_Soldier_GL_DZ = [ [["Dangerous, Dangerous Weapons",696],["Dangerous Armed Vehicles",697]], [], "terrorist" ]; Edit: Was able to get it working, didn't realize I was using the DZ instead of the normal classnames and I forgot menu_ in front of the traders in the servers_trader.sqf. You forgot to add it. ;) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now