From 4001f30d0d787fc56162079ca99974221811728b Mon Sep 17 00:00:00 2001 From: Skaronator Date: Sun, 2 Feb 2014 23:15:56 +0100 Subject: [PATCH] Example for #824 --- .../CfgServerTrader/CfgServerTrader.hpp | 17 +++++++ .../CfgServerTrader/TraderCategory.hpp | 51 +++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 SQF/dayz_code/Configs/CfgServerTrader/CfgServerTrader.hpp create mode 100644 SQF/dayz_code/Configs/CfgServerTrader/TraderCategory.hpp diff --git a/SQF/dayz_code/Configs/CfgServerTrader/CfgServerTrader.hpp b/SQF/dayz_code/Configs/CfgServerTrader/CfgServerTrader.hpp new file mode 100644 index 000000000..b53a336c3 --- /dev/null +++ b/SQF/dayz_code/Configs/CfgServerTrader/CfgServerTrader.hpp @@ -0,0 +1,17 @@ +#include "TraderCategory.hpp" + +class CfgServerTrader { + + //Hero Trader for Example + class RU_Functionary1 { //Classname of the person + humanity = "hero"; //If Hero, normal or bandit + category[] = { //{"DisplayName","LinkedCategory"} + {"Ammunition","ammunition_1"}, + {"Clothes","clothes_1"}, + {"Helicopter Armed","heliarmed_1"}, + {"Military Armed","militaryarmed_1"}, + {"Trucks Armed","truckarmed_1"}, + {"Weapons","weapons_1"} + }; + }; +}; \ No newline at end of file diff --git a/SQF/dayz_code/Configs/CfgServerTrader/TraderCategory.hpp b/SQF/dayz_code/Configs/CfgServerTrader/TraderCategory.hpp new file mode 100644 index 000000000..58589278b --- /dev/null +++ b/SQF/dayz_code/Configs/CfgServerTrader/TraderCategory.hpp @@ -0,0 +1,51 @@ + +class CfgTraderCategory { + class ammunition_1 { + type = "trade_items"; + class 30Rnd_556x45_Stanag { + buy[] = {"ItemSilverBar",4}; + sell[] = {"ItemSilverBar",2}; + }; + class 5Rnd_86x70_L115A1 { + buy[] = {"ItemGoldBar",5}; + sell[] = {"ItemSilverBar",2}; + }; + //AND SO ON.... + }; + class clothes_1 { + type = "trade_items"; + class Skin_Sniper1_DZ { + buy[] = {"ItemGoldBar",2}; + sell[] = {"ItemGoldBar",1}; + }; + }; + class heliarmed_1 { + type = "trade_any_vehicle"; + class CH_47F_EP1_DZE { + buy[] = {"ItemBriefcase100oz",2}; + sell[] = {"ItemBriefcase100oz",1}; + }; + }; + class militaryarmed_1 { + type = "trade_any_vehicles"; + class HMMWV_M1035_DES_EP1 { + buy[] = {"ItemGoldBar10oz",8}; + sell[] = {"ItemGoldBar10oz",4}; + }; + }; + class truckarmed_1 { + type = "trade_any_vehicles"; + class Pickup_PK_GUE_DZE { + buy[] = {"ItemGoldBar10oz",1}; + sell[] = {"ItemGoldBar",5}; + }; + }; + class weapons_1 { + type = "trade_weapons"; + class M4SPR { + buy[] = {"ItemGoldBar10oz",1}; + sell[] = {"ItemGoldBar",6}; + }; + }; + +}; \ No newline at end of file