Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- waitUntil {!isNil "dayz_animalCheck"};
- sleep 1;
- /* ******************************************************************************************************************************************* */
- /* Turn debugging functionality on or off. */
- /* ******************************************************************************************************************************************* */
- tfv_DEBUGGING = true;
- /* ******************************************************************************************************************************************* */
- /* How many weapons will be sold per cycle. */
- /* ******************************************************************************************************************************************* */
- tfv_SALES_PER_ANIM = 5;
- /* ******************************************************************************************************************************************* */
- /* How many magazines will be sold per cycle. */
- /* ******************************************************************************************************************************************* */
- tfv_SALES_PER_ANIM_MAGS = 10;
- /* ******************************************************************************************************************************************* */
- /* A list of each trader, along with the weapons they accept. */
- /* ******************************************************************************************************************************************* */
- tfv_TRADERS_ITEMS = [
- ["RU_Policeman",["M9SD","glock17_EP1","Colt1911","M9","MakarovSD","revolver_gold_EP1","Makarov","revolver_EP1","Winchester1866","MR43","Crossbow_DZ","M1014","Remington870_lamp","LeeEnfield","15Rnd_9x19_M9","15Rnd_9x19_M9SD","17Rnd_9x19_glock17","6Rnd_45ACP","7Rnd_45ACP_1911","8Rnd_9x18_Makarov","8Rnd_9x18_MakarovSD","15Rnd_W1866_Slug","2Rnd_shotgun_74Pellets","2Rnd_shotgun_74Slug","8Rnd_B_Beneli_74Slug","8Rnd_B_Beneli_74Pellets","Quiver","10x_303],["weapons","magazines"]]
- ]; if (tfv_DEBUGGING) then { diag_log "tfv - Traders and their weapons loaded in!"; };
- /* ******************************************************************************************************************************************* */
- /* List of ALL weapons, regardless of trader, along with the prices. */
- /* ******************************************************************************************************************************************* */
- tfv_TRADERS_PRICES = [
- ["AKS_74_kobra",200],
- ["AKS_74_kobra",200],
- ["AKS_74_kobra",200],
- ["AKS_74_kobra",200],
- ["AKS_74_U",100],
- ["AKS_74_U",100],
- ["AKS_74_U",100],
- ["AKS_74_U",100],
- ["AK_47_M",600],
- ["AK_47_M",600],
- ["AK_47_M",600],
- ["AK_47_M",600],
- ["AK_74",100],
- ["AK_74",100],
- ["AK_74",100],
- ["AK_74",100],
- ["BAF_L85A2_RIS_Holo",600],
- ["BAF_L85A2_RIS_Holo",600],
- ["BAF_L85A2_RIS_Holo",600],
- ["BAF_L85A2_RIS_Holo",600],
- ["BAF_L85A2_RIS_SUSAT",300],
- ["BAF_L85A2_RIS_SUSAT",300],
- ["BAF_L85A2_RIS_SUSAT",300],
- ["BAF_L85A2_RIS_SUSAT",300],
- ["BAF_LRR_scoped",2000],
- ["BAF_LRR_scoped",2000],
- ["Binocular",1],
- ["Binocular",1],
- ["Binocular",1],
- ["Binocular",1],
- ["Binocular",1],
- ["Binocular_Vector",100],
- ["Binocular_Vector",100],
- ["Binocular_Vector",100],
- ["Binocular_Vector",100],
- ["Binocular_Vector",100],
- ["bizon",500],
- ["bizon",500],
- ["bizon",500],
- ["bizon",500],
- ["bizon_silenced",500],
- ["bizon_silenced",500],
- ["bizon_silenced",500],
- ["bizon_silenced",500],
- ["Colt1911",10],
- ["Colt1911",10],
- ["Colt1911",10],
- ["Colt1911",10],
- ["Crossbow_DZ",5],
- ["Crossbow_DZ",5],
- ["Crossbow_DZ",5],
- ["Crossbow_DZ",5],
- ["FN_FAL",500],
- ["FN_FAL",500],
- ["FN_FAL",500],
- ["FN_FAL",500],
- ["FN_FAL",500],
- ["FN_FAL",500],
- ["FN_FAL_ANPVS4",1000],
- ["FN_FAL_ANPVS4",1000],
- ["G36A_camo",300],
- ["G36A_camo",300],
- ["G36A_camo",300],
- ["G36A_camo",300],
- ["G36C",200],
- ["G36C",200],
- ["G36C",200],
- ["G36C",200],
- ["G36C_camo",300],
- ["G36C_camo",300],
- ["G36C_camo",300],
- ["G36C_camo",300],
- ["G36K_camo",300],
- ["G36K_camo",300],
- ["G36K_camo",300],
- ["G36K_camo",300],
- ["G36_C_SD_camo",500],
- ["G36_C_SD_camo",500],
- ["glock17_EP1",50],
- ["glock17_EP1",50],
- ["glock17_EP1",50],
- ["glock17_EP1",50],
- ["huntingrifle",100],
- ["huntingrifle",100],
- ["huntingrifle",100],
- ["huntingrifle",100],
- ["ItemCompass",3],
- ["ItemCompass",3],
- ["ItemCompass",3],
- ["ItemCompass",3],
- ["ItemCompass",3],
- ["ItemCrowbar",1],
- ["ItemCrowbar",1],
- ["ItemCrowbar",1],
- ["ItemCrowbar",1],
- ["ItemCrowbar",1],
- ["ItemEtool",60],
- ["ItemEtool",60],
- ["ItemEtool",60],
- ["ItemEtool",60],
- ["ItemEtool",60],
- ["ItemFishingPole",10],
- ["ItemFishingPole",10],
- ["ItemFishingPole",10],
- ["ItemFishingPole",10],
- ["ItemFishingPole",10],
- ["ItemFlashlight",1],
- ["ItemFlashlight",1],
- ["ItemFlashlight",1],
- ["ItemFlashlight",1],
- ["ItemFlashlight",1],
- ["ItemFlashlightRed",5],
- ["ItemFlashlightRed",5],
- ["ItemFlashlightRed",5],
- ["ItemFlashlightRed",5],
- ["ItemFlashlightRed",5],
- ["ItemGPS",100],
- ["ItemGPS",100],
- ["ItemGPS",100],
- ["ItemGPS",100],
- ["ItemGPS",100],
- ["ItemHatchet_DZE",1],
- ["ItemHatchet_DZE",1],
- ["ItemHatchet_DZE",1],
- ["ItemHatchet_DZE",1],
- ["ItemHatchet_DZE",1],
- ["ItemKnife",1],
- ["ItemKnife",1],
- ["ItemKnife",1],
- ["ItemKnife",1],
- ItemKnife",1],
- ["ItemMachete",1],
- ["ItemMachete",1],
- ["ItemMachete",1],
- ["ItemMachete",1],
- ["ItemMachete",1],
- ["ItemMap",3],
- ["ItemMap",3],
- ["ItemMap",3],
- ["ItemMap",3],
- ["ItemMap",3],
- ["ItemMatchbox_DZE",1],
- ["ItemMatchbox_DZE",1],
- ["ItemMatchbox_DZE",1],
- ["ItemMatchbox_DZE",1],
- ["ItemMatchbox_DZE",1],
- ["ItemToolbox",1],
- ["ItemToolbox",1],
- ["ItemToolbox",1],
- ["ItemToolbox",1],
- ["ItemToolbox",1],
- ["ItemWatch",1],
- ["ItemWatch",1],
- ["ItemWatch",1],
- ["ItemWatch",1],
- ["ItemWatch",1],
- ["KSVK_DZE",1000],
- ["KSVK_DZE",1000],
- ["KSVK_DZE",1000],
- ["KSVK_DZE",1000],
- ["LeeEnfield",10],
- ["LeeEnfield",10],
- ["LeeEnfield",10],
- ["LeeEnfield",10],
- ["M1014",200],
- ["M1014",200],
- ["M1014",200],
- ["M1014",200],
- ["M14_EP1",1000],
- ["M14_EP1",1000],
- ["M14_EP1",1000],
- ["M14_EP1",1000],
- ["M16A2",100],
- ["M16A2",100],
- ["M16A2",100],
- ["M16A2",100],
- ["M16A2GL",200],
- ["M16A2GL",200],
- ["M16A2GL",200],
- ["M16A2GL",200],
- ["M16A4_ACG",200],
- ["M16A4_ACG",200],
- ["M16A4_ACG",200],
- ["M16A4_ACG",200],
- ["M24",600],
- ["M24",600],
- ["M24",600],
- ["M24",600],
- ["M240_DZ",500],
- ["M240_DZ",500],
- ["M240_DZ",500],
- ["M240_DZ",500],
- ["M240_DZ",500],
- ["M240_DZ",500],
- ["m240_scoped_EP1_DZE",600],
- ["m240_scoped_EP1_DZE",600],
- ["m240_scoped_EP1_DZE",600],
- ["m240_scoped_EP1_DZE",600],
- ["M249_EP1_DZ",600],
- ["M249_EP1_DZ",600],
- ["M249_EP1_DZ",600],
- ["M249_EP1_DZ",600],
- ["M249_m145_EP1_DZE",600],
- ["M249_m145_EP1_DZE",600],
- ["M249_m145_EP1_DZE",600],
- ["M249_m145_EP1_DZE",600],
- ["M24_des_EP1",600],
- ["M24_des_EP1",600],
- ["M24_des_EP1",600],
- ["M24_des_EP1",600],
- ["M24_des_EP1",600],
- ["M40A3",600],
- ["M40A3",600],
- ["M40A3",600],
- ["M40A3",600],
- ["M4A1",200],
- ["M4A1",200],
- ["M4A1",200],
- ["M4A1",200],
- ["M4A1_Aim",400],
- ["M4A1_Aim",400],
- ["M4A1_Aim",400],
- ["M4A1_Aim",400],
- ["M4A1_AIM_SD_camo",500],
- ["M4A1_AIM_SD_camo",500],
- ["M4A1_HWS_GL_camo",400],
- ["M4A1_HWS_GL_camo",400],
- ["M4A1_HWS_GL_camo",400],
- ["M4A1_HWS_GL_camo",400],
- ["M4A1_HWS_GL_SD_Camo",1000],
- ["M4A1_HWS_GL_SD_Camo",1000],
- ["M4A1_HWS_GL_SD_Camo",1000],
- ["M4A1_HWS_GL_SD_Camo",1000],
- ["M4A3_CCO_EP1",500],
- ["M4A3_CCO_EP1",500],
- ["M4A3_CCO_EP1",500],
- ["M4A3_CCO_EP1",500],
- ["M4SPR",600],
- ["M4SPR",600],
- ["M4SPR",600],
- ["M4SPR",600],
- ["M60A4_EP1_DZE",1000],
- ["M60A4_EP1_DZE",1000],
- ["M60A4_EP1_DZE",1000],
- ["M60A4_EP1_DZE",1000],
- ["m8_carbine",200],
- ["m8_compact",200],
- ["m8_holo_sd",400],
- ["M8_SAW",600],
- ["M8_SAW",600],
- ["M8_SAW",600],
- ["M8_SAW",600],
- ["m8_sharpshooter",300],
- ["M9",20],
- ["M9",20],
- ["M9",20],
- ["M9",20],
- ["M9SD",100],
- ["M9SD",100],
- ["M9SD",100],
- ["M9SD",100],
- ["Makarov",10],
- ["Makarov",10],
- ["Makarov",10],
- ["Makarov",10],
- ["MakarovSD",100],
- ["MakarovSD",100],
- ["MakarovSD",100],
- ["MakarovSD",100],
- ["MG36",600],
- ["MG36",600],
- ["MG36",600],
- ["MG36",600],
- ["MG36_camo",600],
- ["MG36_camo",600],
- ["MG36_camo",600],
- ["MG36_camo",600],
- ["Mk_48_DZ",1000],
- ["Mk_48_DZ",1000],
- ["Mk_48_DZ",1000],
- ["Mk_48_DZ",1000],
- ["Mk_48_DZ",1000],
- ["Mk_48_DZ",1000],
- ["MP5A5",20],
- ["MP5A5",20],
- ["MP5A5",20],
- ["MP5A5",20],
- ["MP5SD",300],
- ["MP5SD",300],
- ["MP5SD",300],
- ["MP5SD",300],
- ["MR43",8],
- ["MR43",8],
- ["MR43",8],
- ["MR43",8],
- ["NVGoggles",100],
- ["NVGoggles",100],
- ["NVGoggles",100],
- ["NVGoggles",100],
- ["NVGoggles",100],
- ["Pecheneg_DZ",1000],
- ["Pecheneg_DZ",1000],
- ["Pecheneg_DZ",1000],
- ["Pecheneg_DZ",1000],
- ["Remington870_lamp",100],
- ["Remington870_lamp",100],
- ["Remington870_lamp",100],
- ["Remington870_lamp",100],
- ["revolver_EP1",10],
- ["revolver_EP1",10],
- ["revolver_EP1",10],
- ["revolver_EP1",10],
- ["revolver_gold_EP1",200],
- ["revolver_gold_EP1",200],
- ["revolver_gold_EP1",200],
- ["revolver_gold_EP1",200],
- ["RPK_74",600],
- ["RPK_74",600],
- ["RPK_74",600],
- ["RPK_74",600],
- ["Sa58P_EP1",100],
- ["Sa58P_EP1",100],
- ["Sa58P_EP1",100],
- ["Sa58P_EP1",100],
- ["Sa58V_CCO_EP1",400],
- ["Sa58V_CCO_EP1",400],
- ["Sa58V_CCO_EP1",400],
- ["Sa58V_CCO_EP1",400],
- ["Sa58V_EP1",100],
- ["Sa58V_EP1",100],
- ["Sa58V_EP1",100],
- ["Sa58V_EP1",100],
- ["Sa58V_RCO_EP1",400],
- ["Sa58V_RCO_EP1",400],
- ["Sa58V_RCO_EP1",400],
- ["Sa58V_RCO_EP1",400],
- ["Sa61_EP1",50],
- ["Sa61_EP1",50],
- ["Sa61_EP1",50],
- ["Sa61_EP1",50],
- ["Saiga12K",300],
- ["SCAR_H_LNG_Sniper_SD",1000],
- ["SCAR_H_LNG_Sniper_SD",1000],
- ["SVD",600],
- ["SVD",600],
- ["SVD",600],
- ["SVD",600],
- ["SVD",600],
- ["SVD_CAMO",600],
- ["SVD_CAMO",600],
- ["SVD_CAMO",600],
- ["SVD_CAMO",600],
- ["SVD_des_EP1",600],
- ["SVD_des_EP1",600],
- ["SVD_des_EP1",600],
- ["SVD_des_EP1",600],
- ["SVD_des_EP1",600],
- ["UZI_EP1",200],
- ["UZI_EP1",200],
- ["UZI_EP1",200],
- ["UZI_EP1",200],
- ["UZI_SD_EP1",500],
- ["UZI_SD_EP1",500],
- ["UZI_SD_EP1",500],
- ["UZI_SD_EP1",500],
- ["VSS_vintorez",400],
- ["Winchester1866",10],
- ["Winchester1866",10],
- ["Winchester1866",10],
- ["Winchester1866",10]
- ]; if (tfv_DEBUGGING) then { { diag_log format ["tfv - Price loaded - %1",_x]; } forEach tfv_TRADERS_PRICES; };
- /* ******************************************************************************************************************************************* */
- /* Anything below this line was not intended to be modified. */
- /* ******************************************************************************************************************************************* */
- tfv_TRADERS = [];
- { tfv_TRADERS set [(count tfv_TRADERS),(_x select 0)]; } forEach tfv_TRADERS_ITEMS;
- tfv_TRADERS_TYPES = [];
- { tfv_TRADERS_TYPES set [(count tfv_TRADERS_TYPES),(_x select 2)]; } forEach tfv_TRADERS_ITEMS;
- if (tfv_DEBUGGING) then { { diag_log format ["tfv - Trader loaded - %1",_x]; } forEach tfv_TRADERS; };
- tfv_SALE_SUCCESS_STRING = "Sold %1 weapons from your vehicle";
- tfv_SALE_SUCCESS_STRING_MAGS = "Sold %1 items from your vehicle";
- tfv_PREP_FOR_TRADE = "Starting trade in %1 seconds, move to cancel";
- tfv_CANCELLED_TRADE = "Trade cancelled";
- tfv_STARTING_TRADE = "Starting trade";
- tfv_TRADE_STEPS = "Trading, stage %1 of %2";
- tfv_TRADE_CANCELLED_END = "Trade cancelled\nMake sure your vehicle is empty and isn't moving";
- tfv_SIDENOTE = "You were paid an %1";
- tfv_VEHICLE_CONFIRM = "Trading from %1";
- tfv_NO_WEAPONS = "There is no weapons inside your vehicle (%1)";
- tfv_NO_MAGAZINES = "There is no items inside your vehicle (%1)";
- tfv_ACTION_INDEX = -1;
- tfv_ACTION = 0;
- tfv_ACTION_INDEX_MAGS = -1;
- tfv_ACTION_MAGS = 0;
- tfv_IS_TRADING = false;
- tfv_EXCHANGE = [
- ["ItemBriefcase100oz",10000],
- ["ItemBriefcase90oz",9000],
- ["ItemBriefcase80oz",8000],
- ["ItemBriefcase70oz",7000],
- ["ItemBriefcase60oz",6000],
- ["ItemBriefcase50oz",5000],
- ["ItemBriefcase40oz",4000],
- ["ItemBriefcase30oz",3000],
- ["ItemBriefcase20oz",2000],
- ["ItemGoldBar10oz",1000],
- ["ItemGoldBar9oz",900],
- ["ItemGoldBar8oz",800],
- ["ItemGoldBar7oz",700],
- ["ItemGoldBar6oz",600],
- ["ItemGoldBar5oz",500],
- ["ItemGoldBar4oz",400],
- ["ItemGoldBar3oz",300],
- ["ItemGoldBar2oz",200],
- ["ItemGoldBar",100],
- ["ItemBriefcaseS90oz",90],
- ["ItemBriefcaseS80oz",80],
- ["ItemBriefcaseS70oz",70],
- ["ItemBriefcaseS60oz",60],
- ["ItemBriefcaseS50oz",50],
- ["ItemBriefcaseS40oz",40],
- ["ItemBriefcaseS30oz",30],
- ["ItemBriefcaseS20oz",20],
- ["ItemSilverBar10oz",10],
- ["ItemSilverBar9oz",9],
- ["ItemSilverBar8oz",8],
- ["ItemSilverBar7oz",7],
- ["ItemSilverBar6oz",6],
- ["ItemSilverBar5oz",5],
- ["ItemSilverBar4oz",4],
- ["ItemSilverBar3oz",3],
- ["ItemSilverBar2oz",2],
- ["ItemSilverBar",1]
- ]; if (tfv_DEBUGGING) then { { diag_log format ["tfv - Exchange loaded - %1",_x]; } forEach tfv_EXCHANGE; };
- /* ******************************************************************************************************************************************* */
- /* Functions. */
- /* ******************************************************************************************************************************************* */
- tfv_fnc_aConcat = compile preprocessFileLineNumbers "TradeFromVehicle\functions\fnc_aConcat.sqf";
- tfv_fnc_checkTrade = compile preprocessFileLineNumbers "TradeFromVehicle\functions\fnc_checkTrade.sqf";
- tfv_fnc_Convert = compile preprocessFileLineNumbers "TradeFromVehicle\functions\fnc_Convert.sqf";
- tfv_fnc_findPrices = compile preprocessFileLineNumbers "TradeFromVehicle\functions\fnc_findPrices.sqf";
- tfv_fnc_findTrWeapons = compile preprocessFileLineNumbers "TradeFromVehicle\functions\fnc_findTrWeapons.sqf";
- tfv_fnc_getSteps = compile preprocessFileLineNumbers "TradeFromVehicle\functions\fnc_getSteps.sqf";
- tfv_fnc_payTrade = compile preprocessFileLineNumbers "TradeFromVehicle\functions\fnc_payTrade.sqf";
- tfv_fnc_wCount = compile preprocessFileLineNumbers "TradeFromVehicle\functions\fnc_wCount.sqf";
- tfv_fnc_mCount = compile preprocessFileLineNumbers "TradeFromVehicle\functions\fnc_mCount.sqf";
- tfv_fnc_checkTradeMags = compile preprocessFileLineNumbers "TradeFromVehicle\functions\fnc_checkTradeMags.sqf";
- tfv_fnc_aConcatMags = compile preprocessFileLineNumbers "TradeFromVehicle\functions\fnc_aConcatMags.sqf";
- tfv_fnc_getStepsMags = compile preprocessFileLineNumbers "TradeFromVehicle\functions\fnc_getStepsMags.sqf";
- tfv_fnc_payTradem = compile preprocessFileLineNumbers "TradeFromVehicle\functions\fnc_payTradem.sqf";
- /* ******************************************************************************************************************************************* */
- /* Init file finished. Start monitor script. */ [] ExecVM "TradeFromVehicle\monitor.sqf";
- /* ******************************************************************************************************************************************* */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement