/*this is the command line []execVM "\z\addons\dayz_server\addons\spawn_box_skalisty_island.sqf";//random box on Skalisty Island
put it in dayz_server\init\server_functions.sqf
at the bottom of the file
*/
if (_object isKindOf "ReammoBox") then {
// PermaLoot on top of ObjID because that "arma logic"
_object setVariable ["permaLoot",true];
_object setVariable ["Mission", "1", true];
};
};
Question
Kimarik
Hi can anyone help me with Skalisty lootboxes for Epoch 1.0.6.1 so that they don´t spam my serverlog with permaloot errors?
rpt log;
Error in expression <etVariable ["created",_created];
};
if (!(_x getVariable ["permaLoot",false]) AN>
Error position: <!(_x getVariable ["permaLoot",false]) AN>
Error !: Type Number, expected Bool
File z\addons\dayz_server\system\scheduler\sched_lootpiles.sqf, line 27
Error in expression <etVariable ["created",_created];
};
if (!(_x getVariable ["permaLoot",false]) AN>
Error position: <!(_x getVariable ["permaLoot",false]) AN>
Error !: Type Number, expected Bool
File z\addons\dayz_server\system\scheduler\sched_lootpiles.sqf, line 27
Error in expression <etVariable ["created",_created];
};
if (!(_x getVariable ["permaLoot",false]) AN>
Error position: <!(_x getVariable ["permaLoot",false]) AN>
Error !: Type Number, expected Bool
File z\addons\dayz_server\system\scheduler\sched_lootpiles.sqf, line 27
Error in expression <etVariable ["created",_created];
};
if (!(_x getVariable ["permaLoot",false]) AN>
Error position: <!(_x getVariable ["permaLoot",false]) AN>
Error !: Type Number, expected Bool
File z\addons\dayz_server\system\scheduler\sched_lootpiles.sqf, line 27
Error in expression <etVariable ["created",_created];
};
if (!(_x getVariable ["permaLoot",false]) AN>
Error position: <!(_x getVariable ["permaLoot",false]) AN>
Error !: Type Number, expected Bool
File z\addons\dayz_server\system\scheduler\sched_lootpiles.sqf, line 27
Error in expression <etVariable ["created",_created];
};
if (!(_x getVariable ["permaLoot",false]) AN>
Error position: <!(_x getVariable ["permaLoot",false]) AN>
Error !: Type Number, expected Bool
File z\addons\dayz_server\system\scheduler\sched_lootpiles.sqf, line 27
Error in expression <etVariable ["created",_created];
};
if (!(_x getVariable ["permaLoot",false]) AN>
Error position: <!(_x getVariable ["permaLoot",false]) AN>
Error !: Type Number, expected Bool
File z\addons\dayz_server\system\scheduler\sched_lootpiles.sqf, line 27
Error in expression <etVariable ["created",_created];
};
if (!(_x getVariable ["permaLoot",false]) AN>
Error position: <!(_x getVariable ["permaLoot",false]) AN>
Error !: Type Number, expected Bool
File z\addons\dayz_server\system\scheduler\sched_lootpiles.sqf, line 27
Error in expression <etVariable ["created",_created];
};
if (!(_x getVariable ["permaLoot",false]) AN>
Error position: <!(_x getVariable ["permaLoot",false]) AN>
Error !: Type Number, expected Bool
File z\addons\dayz_server\system\scheduler\sched_lootpiles.sqf, line 27
Error in expression <etVariable ["created",_created];
};
if (!(_x getVariable ["permaLoot",false]) AN>
Error position: <!(_x getVariable ["permaLoot",false]) AN>
Error !: Type Number, expected Bool
File z\addons\dayz_server\system\scheduler\sched_lootpiles.sqf, line 27
Error in expression <etVariable ["created",_created];
};
if (!(_x getVariable ["permaLoot",false]) AN>
Error position: <!(_x getVariable ["permaLoot",false]) AN>
Error !: Type Number, expected Bool
File z\addons\dayz_server\system\scheduler\sched_lootpiles.sqf, line 27
Error in expression <etVariable ["created",_created];
};
if (!(_x getVariable ["permaLoot",false]) AN>
Error position: <!(_x getVariable ["permaLoot",false]) AN>
Error !: Type Number, expected Bool
File z\addons\dayz_server\system\scheduler\sched_lootpiles.sqf, line 27
Error in expression <etVariable ["created",_created];
};
if (!(_x getVariable ["permaLoot",false]) AN>
Error position: <!(_x getVariable ["permaLoot",false]) AN>
Error !: Type Number, expected Bool
File z\addons\dayz_server\system\scheduler\sched_lootpiles.sqf, line 27
Error in expression <etVariable ["created",_created];
};
if (!(_x getVariable ["permaLoot",false]) AN>
Error position: <!(_x getVariable ["permaLoot",false]) AN>
Error !: Type Number, expected Bool
File z\addons\dayz_server\system\scheduler\sched_lootpiles.sqf, line 27
Error in expression <etVariable ["created",_created];
};
if (!(_x getVariable ["permaLoot",false]) AN>
Error position: <!(_x getVariable ["permaLoot",false]) AN>
Error !: Type Number, expected Bool
File z\addons\dayz_server\system\scheduler\sched_lootpiles.sqf, line 27
Error in expression <etVariable ["created",_created];
};
if (!(_x getVariable ["permaLoot",false]) AN>
Error position: <!(_x getVariable ["permaLoot",false]) AN>
Error !: Type Number, expected Bool
File z\addons\dayz_server\system\scheduler\sched_lootpiles.sqf, line 27
Error in expression <etVariable ["created",_created];
};
if (!(_x getVariable ["permaLoot",false]) AN>
Error position: <!(_x getVariable ["permaLoot",false]) AN>
Error !: Type Number, expected Bool
File z\addons\dayz_server\system\scheduler\sched_lootpiles.sqf, line 27
This error comes only when I activate the Skalisty Lootbox in the Mission init.sqf
skalisty_island_lottery.sqf
if (isServer) then {
//skalisty island lottery box behind palace
_vehicle_107 = objNull;
if (true) then
{
_this = createVehicle ["BAF_VehicleBox", [13714, 2930.62, 0.00144156], [], 0, "CAN_COLLIDE"];
_vehicle_107 = _this;
_this setDir 20;
_this setVariable ["permaLoot",true];
clearWeaponCargoGlobal _this;
clearMagazineCargoGlobal _this;
_this addMagazineCargoGlobal ["ItemAmethyst",10];
_this addMagazineCargoGlobal ["ItemTunaCooked",5];
_this addMagazineCargoGlobal ["ItemComboLock",2];
_this addMagazineCargoGlobal ["ItemTinBar",2];
_this addMagazineCargoGlobal ["ItemWoodStairs",2];
_this addMagazineCargoGlobal ["cinder_wall_kit",2];
_this addMagazineCargoGlobal ["CinderBlocks",6];
_this addMagazineCargoGlobal ["metal_floor_kit",2];
_this addMagazineCargoGlobal ["MortarBucket",2];
_this addMagazineCargoGlobal ["PartPlywoodPack",5];
_this addMagazineCargoGlobal ["PartPlankPack",5];
_this addMagazineCargoGlobal ["ItemWoodWallLg",2];
_this addMagazineCargoGlobal ["ItemWoodWallGarageDoor",2];
_this addMagazineCargoGlobal ["ItemSodaOrangeSherbet",5];
_this addMagazineCargoGlobal ["Skin_SurvivorWurban_DZ",2];
_this addMagazineCargoGlobal ["Skin_SurvivorWpink_DZ",2];
_this addMagazineCargoGlobal ["Skin_Priest_DZ",2];
_this addMagazineCargoGlobal ["Skin_BanditW2_DZ",2];
_this addMagazineCargoGlobal ["Skin_Graves_Light_DZ",2];
_this addMagazineCargoGlobal ["Skin_CZ_Special_Forces_GL_DES_EP1_DZ",2];
_this addMagazineCargoGlobal ["Bandit2_DZ",2];
};
};
spawn_box_skalisty_island.sqf
/*this is the command line []execVM "\z\addons\dayz_server\addons\spawn_box_skalisty_island.sqf";//random box on Skalisty Island
put it in dayz_server\init\server_functions.sqf
at the bottom of the file
*/
private ["_crate","_crate2"];
DZMSProtectObj = {
private ["_object","_objectID"];
_object = _this select 0;
_objectID = str(round(random 999999));
_object setVariable ["ObjectID", _objectID, true];
_object setVariable ["ObjectUID", _objectID, true];
if (_object isKindOf "ReammoBox") then {
// PermaLoot on top of ObjID because that "arma logic"
_object setVariable ["permaLoot",true];
_object setVariable ["Mission", "1", true];
};
};
//This is _crate
WeaponBox = {
private ["_object","_crate"];
_crate = _this select 0;
_wpns = ["AKS_74_UN_kobra","AK_107_pso","AK_107_GL_pso","AK_107_GL_kobra","M4A3_CCO_EP1","M4A1_AIM_SD_camo","M16A4_ACG","M8_carbineGL","VSS_vintorez","M8_sharpshooter","M40A3","Mk_48_DZ","M240_DZ","M249_DZ","Pecheneg_DZ","RPK_74","BAF_LRR_scoped","DMR","SVD_CAMO","SCAR_H_LNG_Sniper_SD","M110_NVG_EP1","Sa58V_RCO_EP1","KSVK_DZE","BAF_L86A2_ACOG","M14_EP1","Sa58V_CCO_EP1",
"AK_47_M","AK_74","AKS_74_kobra","AKS_74_U","BAF_L85A2_RIS_Holo","bizon_silenced","FN_FAL_ANPVS4","FN_FAL","G36A_camo","G36C_camo","G36C","G36K_camo","M1014","M16A2","M16A2GL","M4A1_AIM_SD_camo","M4A1_Aim","M4A1_HWS_GL_camo","M4A1","M4A3_CCO_EP1","Remington870_lamp","Sa58P_EP1","Sa58V_CCO_EP1","Sa58V_EP1","Sa58V_RCO_EP1"];
_pstl = ["Colt1911","glock17_EP1","M9","M9SD","Makarov","MakarovSD","revolver_EP1","UZI_EP1"];
_bld = ["CinderBlocks","MortarBucket","ItemTankTrap","ItemPole","PartGeneric","PartPlywoodPack","PartPlankPack","ItemTentOld","ItemTentDomed","ItemTentDomed2","ItemSandbag",
"ItemWire","workbench_kit","ItemGenerator","forest_net_kit","ItemWoodStairs","ItemWoodStairsSupport","ItemWoodLadder","ItemWoodWall","ItemWoodWallThird","ItemWoodWallDoor",
"ItemWoodWallWithDoor","ItemWoodWallGarageDoor","light_pole_kit","metal_panel_kit","wood_ramp_kit","bulk_ItemSandbag","bulk_ItemTankTrap","bulk_ItemTankTrapHalf","bulk_PartGeneric",
"deer_stand_kit","fuel_pump_kit","sandbag_nest_kit","storage_shed_kit","ItemFuelPump","ItemScaffoldingKit"];
_bld_rare = ["metal_floor_kit","30m_plot_kit","cinder_door_kit","cinder_garage_kit","cinder_wall_kit","ItemRuby",
"ItemPlotDeed","ItemORP","ItemAVE","ItemLRK","ItemTNK","ItemVault"];
_tools = ["ItemToolbox","ItemCrowbar","ItemKnife","ItemEtool","ItemHatchet_DZE","ItemMatchbox_DZE","Binocular_Vector","ItemCompass","ItemFishingPole","ItemFlashlightRed","ItemGPS","NVGoggles"];
// Define lists. Some lists are defined in DZMSWeaponCrateList.sqf in the ExtConfig.
_bpackList = ["DZ_LargeGunBag_EP1","DZ_British_ACU","DZ_CivilBackpack_EP1","DZ_Backpack_EP1"];
_gshellList = ["HandGrenade_west","FlareGreen_M203","FlareWhite_M203","1Rnd_HE_M203","FlareRed_M203","FlareYellow_M203","Skin_GUE_Soldier_MG_DZ","Skin_GUE_Soldier_Sniper_DZ","Skin_GUE_Soldier_Crew_DZ",
"Skin_GUE_Soldier_CO_DZ","Skin_GUE_Soldier_2_DZ","Skin_TK_INS_Warlord_EP1_DZ","Skin_CZ_Special_Forces_GL_DES_EP1_DZ","6Rnd_HE_M203","6Rnd_FlareWhite_M203","6Rnd_FlareGreen_M203","6Rnd_SmokeRed_M203"];
_medical = ["ItemBandage","ItemMorphine","ItemEpinephrine","ItemPainkiller","FoodMRE","ItemAntibiotic","ItemBloodbag","ItemSodaRabbit"];
_money = ["ItemCitrine","ItemGoldBar10oz","ItemBriefcase100oz"];
_scount = count _gshellList;
for "_x" from 0 to 8 do {
_sSelect = floor(random _sCount);
_item = _gshellList select _sSelect;
_crate addMagazineCargoGlobal [_item,(round(random 2))];
};
// load packs
_scount = count _bpackList;
for "_x" from 0 to 2 do {
_sSelect = floor(random _sCount);
_item = _bpackList select _sSelect;
_crate addBackpackCargoGlobal [_item,1];
};
// load pistols
_scount = count _pstl;
for "_x" from 0 to 4 do {
_sSelect = floor(random _sCount);
_item = _pstl select _sSelect;
_crate addWeaponCargoGlobal [_item,1];
_ammo = [] + getArray (configFile >> "cfgWeapons" >> _item >> "magazines");
if (count _ammo > 0) then {
_crate addMagazineCargoGlobal [(_ammo select 0),(round(random 4))];
};
};
//load primary
_scount = count _wpns;
for "_x" from 0 to 4 do {
_sSelect = floor(random _sCount);
_item = _wpns select _sSelect;
_crate addWeaponCargoGlobal [_item,1];
_ammo = [] + getArray (configFile >> "cfgWeapons" >> _item >> "magazines");
if (count _ammo > 0) then {
_crate addMagazineCargoGlobal [(_ammo select 0),(round(random 4))];
};
};
_scount = count _money;
for "_x" from 0 to 4 do {
_sSelect = floor(random _sCount);
_item = _money select _sSelect;
_crate addMagazineCargoGlobal [_item,(round(random 2))];
};
_scount = count _medical;
for "_x" from 0 to 8 do {
_sSelect = floor(random _sCount);
_item = _medical select _sSelect;
_crate addMagazineCargoGlobal [_item,(round(random 2))];
};
};
//This is _crate2
BuildBox = {
private ["_object","_crate2"];
_crate2 = _this select 0;
_wpns = ["AKS_74_UN_kobra","AK_107_pso","AK_107_GL_pso","AK_107_GL_kobra","M4A3_CCO_EP1","M4A1_AIM_SD_camo","M16A4_ACG","M8_carbineGL","VSS_vintorez","M8_sharpshooter","M40A3","Mk_48_DZ",
"M240_DZ","M249_DZ","Pecheneg_DZ","RPK_74","BAF_LRR_scoped","DMR","SVD_CAMO","SCAR_H_LNG_Sniper_SD","M110_NVG_EP1","Sa58V_RCO_EP1","KSVK_DZE","BAF_L86A2_ACOG","M14_EP1","Sa58V_CCO_EP1",
"AK_47_M","AK_74","AKS_74_kobra","AKS_74_U","BAF_L85A2_RIS_Holo","bizon_silenced","FN_FAL_ANPVS4","FN_FAL","G36A_camo","G36C_camo","G36C","G36K_camo","M1014","M16A2","M16A2GL",
"M4A1_AIM_SD_camo","M4A1_Aim","M4A1_HWS_GL_camo","M4A1","M4A3_CCO_EP1","Remington870_lamp","Sa58P_EP1","Sa58V_CCO_EP1","Sa58V_EP1","Sa58V_RCO_EP1"];
_pstl = ["Colt1911","glock17_EP1","M9","M9SD","Makarov","MakarovSD","revolver_EP1","UZI_EP1",
"RH_deagle","RH_Deagleg","RH_Deaglem","RH_Deaglemz","RH_Deaglemzb","RH_Deagles","RH_g17","RH_g17sd","RH_g18",
"RH_g19","RH_g19t","RH_m1911","RH_m1911old","RH_m1911sd","RH_m9","RH_m93r","RH_m9c","RH_m9csd","RH_m9sd","RH_usp",
"RH_uspm","RH_uspsd"];
_bld = ["CinderBlocks","MortarBucket","ItemTankTrap","ItemPole","PartGeneric","PartPlywoodPack","PartPlankPack","ItemTentOld","ItemTentDomed","ItemTentDomed2","ItemSandbag",
"ItemWire","workbench_kit","ItemGenerator","forest_net_kit","ItemWoodStairs","ItemWoodStairsSupport","ItemWoodLadder","ItemWoodWall","ItemWoodWallThird","ItemWoodWallDoor",
"ItemWoodWallWithDoor","ItemWoodWallGarageDoor","light_pole_kit","metal_panel_kit","wood_ramp_kit","bulk_ItemSandbag","bulk_ItemTankTrap","bulk_ItemTankTrapHalf","bulk_PartGeneric",
"deer_stand_kit","fuel_pump_kit","sandbag_nest_kit","storage_shed_kit","ItemFuelPump","ItemScaffoldingKit"];
_bld_rare = ["metal_floor_kit","30m_plot_kit","cinder_door_kit","cinder_garage_kit","cinder_wall_kit","ItemLockbox","ItemRuby","ItemPlotDeed","ItemORP","ItemAVE","ItemLRK","ItemTNK","ItemVault"];
_tools = ["ItemToolbox","ItemCrowbar","ItemKnife","ItemEtool","ItemHatchet_DZE","ItemMatchbox_DZE","Binocular_Vector","ItemCompass","ItemFishingPole","ItemFlashlightRed","ItemGPS","NVGoggles"];
// Define lists. Some lists are defined in DZMSWeaponCrateList.sqf in the ExtConfig.
_bpackList = ["DZ_LargeGunBag_EP1","DZ_British_ACU","DZ_CivilBackpack_EP1","DZ_Backpack_EP1"];
_gshellList = ["HandGrenade_west","FlareGreen_M203","FlareWhite_M203","1Rnd_HE_M203","FlareRed_M203","FlareYellow_M203",
"Skin_GUE_Soldier_MG_DZ","Skin_GUE_Soldier_Sniper_DZ","Skin_GUE_Soldier_Crew_DZ","Skin_GUE_Soldier_CO_DZ","Skin_GUE_Soldier_2_DZ",
"Skin_TK_INS_Warlord_EP1_DZ","Skin_CZ_Special_Forces_GL_DES_EP1_DZ","6Rnd_HE_M203","6Rnd_FlareWhite_M203","6Rnd_FlareGreen_M203","6Rnd_SmokeRed_M203"];
_medical = ["ItemBandage","ItemMorphine","ItemEpinephrine","ItemPainkiller","FoodMRE","ItemAntibiotic","ItemBloodbag","ItemSodaRabbit"];
_money = ["ItemCitrine","ItemGoldBar10oz","ItemBriefcase100oz"];
// load tools
_scount = count _tools;
for "_x" from 0 to 6 do {
_sSelect = floor(random _sCount);
_item = _tools select _sSelect;
_crate2 addWeaponCargoGlobal [_item, 1];
};
// load construction
_scount = count _bld_rare;
for "_x" from 0 to 6 do {
_sSelect = floor(random _sCount);
_item = _bld_rare select _sSelect;
_crate2 addMagazineCargoGlobal [_item,1];
};
_scount = count _bld;
for "_x" from 0 to 20 do {
_sSelect = floor(random _sCount);
_item = _bld select _sSelect;
_crate2 addMagazineCargoGlobal [_item,(round(random 2))];
};
_scount = count _money;
for "_x" from 0 to 4 do {
_sSelect = floor(random _sCount);
_item = _money select _sSelect;
_crate2 addMagazineCargoGlobal [_item,(round(random 2))];
};
_scount = count _medical;
for "_x" from 0 to 8 do {
_sSelect = floor(random _sCount);
_item = _medical select _sSelect;
_crate2 addMagazineCargoGlobal [_item,(round(random 2))];
};
};
_coords = [[14072.7, 2824.46, 0], [13602.9, 3141.8, 0], [13413.9, 2761.31, 0], [13696.2, 2991.8, 0], [13267.7, 3235.02, 0]] call BIS_fnc_selectRandom;
_coords2 = [[13788.6, 2950.67, 0], [13310.8, 2734.6, 0], [13920.5, 2918.4, 0], [14067.9, 2770.47, 0], [13456.6, 3327.34, 0]] call BIS_fnc_selectRandom;
// fills the box, DZMSProtectObj prevents it from disappearing
_crate = createVehicle ["RUVehicleBox",[(_coords select 0) + 2.6778,(_coords select 1) - 3.0889,0],[], 0, "CAN_COLLIDE"];
clearWeaponCargoGlobal _crate;
clearMagazineCargoGlobal _crate;
[_crate] call WeaponBox;
[_crate] call DZMSProtectObj;
_crate setDir -28.85478;
_crate2 = createVehicle ["RUVehicleBox",[(_coords2 select 0) + 1.4805,(_coords2 select 1) - 3.7432,0],[], 0, "CAN_COLLIDE"];
clearWeaponCargoGlobal _crate2;
clearMagazineCargoGlobal _crate2;
[_crate2] call BuildBox;
[_crate2] call DZMSProtectObj;
_crate2 setDir 62.744293;;
I thik if this can be fixed many users will be happy.
Thx for help.
Link to comment
Share on other sites
8 answers to this question
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