Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
For some reason I can't get the crafting menu to open up in 1.7.7.1. Did something change that affects this script?
//spawn ai traders
[] execVM "\z\addons\dayz_server\compile\horror_traders.sqf";
_this = createCenter resistance;
_center_1 = _this;
_group_1 = createGroup _center_1;
_unit_101 = objNull;
if (true) then
{
_this = _group_1 createUnit ["SurvivorW2_DZ", [11088.3, 3315.59], [], 0, "CAN_COLLIDE"];
_unit_101 = _this;
_this setDir 350;
_this setVehicleInit "this allowDammage false; this disableAI 'FSM'; _this disableAI 'ANIM'; 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 'ANIM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setBehaviour 'SAFE'; _this forceSpeed 0;_this enableSimulation false;
_this setVariable ["traderType","medical",true];
};
_unit_102 = objNull;
if (true) then
{
_this = _group_1 createUnit ["Hero_1_3_DZT", [11112.4, 3342.69], [], 0, "CAN_COLLIDE"];
_unit_102 = _this;
_this setDir 305;
_this setVehicleInit "this allowDammage false; this disableAI 'FSM'; _this disableAI 'ANIM'; 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 'ANIM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setBehaviour 'CARELESS'; _this forceSpeed 0;_this enableSimulation false;
_this setVariable ["traderType","weapons",true];
};
_aitypes = ["Survivor2_DZ","SurvivorW2_DZ","Hero_1_3_DZT","Bandit_1_1_DZT"];
// AI Traders
if ((typeOf cursorTarget in _aitypes) and (_cursorDistance < 5)) then {
if (horror_traders < 0) then {
_aitype = cursorTarget getVariable["traderType","blahblahblah"];
switch (_aitype) do {
case "medical": { horror_traders = player addAction [("<t color=""#FFC726"">" + ("Medical Trader") + "</t>"), "dayzhorror\tradepost\traderhub.sqf",cursorTarget, 99, false, false, "",""];};
case "weapons": { horror_traders = player addAction [("<t color=""#FFC726"">" + ("Weapon Trader") + "</t>"), "dayzhorror\tradepost\traderhub.sqf",cursorTarget, 99, false, false, "",""];};
case "industrial": { horror_traders = player addAction [("<t color=""#FFC726"">" + ("Industrial Trader") + "</t>"), "dayzhorror\tradepost\traderhub.sqf",cursorTarget, 99, false, false, "",""];};
case "survival": { horror_traders = player addAction [("<t color=""#FFC726"">" + ("Survival Trader") + "</t>"), "dayzhorror\tradepost\traderhub.sqf",cursorTarget, 99, false, false, "",""];};
default {};
};
};
} else {
player removeAction horror_traders;
horror_traders = -1;
};
_aitrader = _this select 3;
_category = _aitrader getVariable["traderType","blahblahblah"];
switch (_category) do {
case "medical": {
{player removeAction _x;} foreach horror_ai_trader;
horror_ai_trader = [];
horror_ai_trader set [count horror_ai_trader, player addaction [("<t color=""#CC9900"">" + (" 2 Toilet Paper for 1 Bandage") +"</t>"),"dayzhorror\tradepost\oven.sqf",[[0,"Bandage","ItemBandage",1],[[0,"ItemTrashToiletpaper",2]]],97,false,true,"","(getPosATL player select 2) < 1 && count ((position player) nearObjects ['SurvivorW2_DZ', 5]) > 0"]];
horror_ai_trader set [count horror_ai_trader, player addaction [("<t color=""#CC9900"">" + (" 1 Bandage for 2 Toilet Paper") +"</t>"),"dayzhorror\tradepost\oven.sqf",[[0,"Toilet Paper","ItemTrashToiletpaper",2],[[0,"ItemBandage",1]]],97,false,true,"","(getPosATL player select 2) < 1 && count ((position player) nearObjects ['SurvivorW2_DZ', 5]) > 0"]];
horror_ai_trader set [count horror_ai_trader, player addaction [("<t color=""#CC9900"">" + (" 3 Pain Killers for 1 Antibiotics") +"</t>"),"dayzhorror\tradepost\oven.sqf",[[0,"Antibiotics","ItemAntibiotic",1],[[0,"ItemPainkiller",3]]],97,false,true,"","(getPosATL player select 2) < 1 && count ((position player) nearObjects ['SurvivorW2_DZ', 5]) > 0"]];
horror_ai_trader set [count horror_ai_trader, player addaction [("<t color=""#CC9900"">" + (" 1 Antibiotics for 3 Pain Killers") +"</t>"),"dayzhorror\tradepost\oven.sqf",[[0,"Pain Killers","ItemPainkiller",3],[[0,"ItemAntibiotic",1]]],97,false,true,"","(getPosATL player select 2) < 1 && count ((position player) nearObjects ['SurvivorW2_DZ', 5]) > 0"]];
horror_ai_trader set [count horror_ai_trader, player addaction [("<t color=""#CC9900"">" + (" 2 Epinephrine for 1 Morphine") +"</t>"),"dayzhorror\tradepost\oven.sqf",[[0,"Morphine","ItemMorphine",1],[[0,"ItemEpinephrine",2]]],97,false,true,"","(getPosATL player select 2) < 1 && count ((position player) nearObjects ['SurvivorW2_DZ', 5]) > 0"]];
horror_ai_trader set [count horror_ai_trader, player addaction [("<t color=""#CC9900"">" + (" 1 Morphine for 2 Epinephrine") +"</t>"),"dayzhorror\tradepost\oven.sqf",[[0,"Epinephrine","ItemEpinephrine",2],[[0,"ItemMorphine",1]]],97,false,true,"","(getPosATL player select 2) < 1 && count ((position player) nearObjects ['SurvivorW2_DZ', 5]) > 0"]];
horror_ai_trader set [count horror_ai_trader, player addaction [("<t color=""#CC9900"">" + (" 2 Water Bottles for 1 Blood Bag") +"</t>"),"dayzhorror\tradepost\oven.sqf",[[0,"Blood Bag","ItemBloodbag",1],[[0,"ItemWaterbottle",2]]],97,false,true,"","(getPosATL player select 2) < 1 && count ((position player) nearObjects ['SurvivorW2_DZ', 5]) > 0"]];
horror_ai_trader set [count horror_ai_trader, player addaction [("<t color=""#CC9900"">" + (" 1 Blood Bag for 2 Water Bottles") +"</t>"),"dayzhorror\tradepost\oven.sqf",[[0,"Water Bottle","ItemWaterbottle",2],[[0,"ItemBloodbag",1]]],97,false,true,"","(getPosATL player select 2) < 1 && count ((position player) nearObjects ['SurvivorW2_DZ', 5]) > 0"]];
horror_ai_trader set [count horror_ai_trader, player addaction [("<t color=""#CC9900"">" + (" 4 Empty Soda for 1 Coke") +"</t>"),"dayzhorror\tradepost\oven.sqf",[[0,"Soda - Coke","ItemSodaCoke",1],[[0,"ItemSodaEmpty",4]]],97,false,true,"","(getPosATL player select 2) < 1 && count ((position player) nearObjects ['SurvivorW2_DZ', 5]) > 0"]];
horror_ai_trader set [count horror_ai_trader, player addaction [("<t color=""#CC9900"">" + (" 4 Empty Cans for 1 Pasta") +"</t>"),"dayzhorror\tradepost\oven.sqf",[[0,"Can - Pasta","FoodCanPasta",1],[[0,"TrashTinCan",4]]],97,false,true,"","(getPosATL player select 2) < 1 && count ((position player) nearObjects ['SurvivorW2_DZ', 5]) > 0"]];
};
default {};
};
BillyA, which files?
And Allen, lets get to it.
16:06:38 Error in expression <mage false; this disableAI 'FSM'; _this disableAI 'ANIM'; this disableAI 'MOVE';>
16:06:38 Error position: <disableAI 'ANIM'; this disableAI 'MOVE';>
16:06:38 Error disableai: Type Array, expected Object
oops, remove this parts from the AI server side:
_this disableAI 'ANIM';