Jump to content
  • 0

Donator Spawn loadout without Database triggers


MassAsster

Question

I've been toying around with how not to do database driven donator spawn loot, I've come up with this system that  I am currently testing.

 

Inside the server PBO, inside the compile folder  locate server_playerLogin.sqf

 

AFTER line

if (count _this > 2) then {
	dayz_players = dayz_players - [_this select 2];
};

Insert your custom user spawn setups.

if (_playerID == "3042438") then {
//MassAsster
_inventory =	[["ItemMap","ItemFlashlight","ItemWatch","ItemCompass","revolver_gold_EP1","AKS_GOLD"], ["ItemBandage","6Rnd_45ACP","6Rnd_45ACP","6Rnd_45ACP","30Rnd_762x39_AK47","ItemBandage","ItemPainkiller","ItemEpinephrine","ItemAntibiotic","ItemMorphine","ItemWaterbottle","FoodCanBakedBeans"]];
_backpack = 	["DZ_ALICE_Pack_EP1",[[],[]],[[],[]]]; };

if (_playerID == "3042694") then {
//Adam
_inventory =	[["ItemMap","ItemFlashlight","ItemWatch","ItemCompass","revolver_gold_EP1","AKS_GOLD"], ["ItemBandage","6Rnd_45ACP","6Rnd_45ACP","6Rnd_45ACP","30Rnd_762x39_AK47","ItemBandage","ItemPainkiller","ItemEpinephrine","ItemAntibiotic","ItemMorphine","ItemWaterbottle","FoodCanBakedBeans"]];
_backpack = 	["DZ_ALICE_Pack_EP1",[[],[]],[[],[]]]; };

if (_playerID == "3042630") then {
//jody
_inventory =	[["ItemMap","ItemFlashlight","ItemWatch","ItemCompass","revolver_gold_EP1","AKS_GOLD"], ["ItemBandage","6Rnd_45ACP","6Rnd_45ACP","6Rnd_45ACP","30Rnd_762x39_AK47","ItemBandage","ItemPainkiller","ItemEpinephrine","ItemAntibiotic","ItemMorphine","ItemWaterbottle","FoodCanBakedBeans"]];
_backpack = 	["DZ_ALICE_Pack_EP1",[[],[]],[[],[]]]; };

if (_playerID == "138731014") then {
//Greg
_inventory =	[["ItemMap","ItemFlashlight","ItemWatch","ItemCompass","revolver_gold_EP1","AKS_GOLD"], ["ItemBandage","6Rnd_45ACP","6Rnd_45ACP","6Rnd_45ACP","30Rnd_762x39_AK47","ItemBandage","ItemPainkiller","ItemEpinephrine","ItemAntibiotic","ItemMorphine","ItemWaterbottle","FoodCanBakedBeans"]];
_backpack = 	["DZ_ALICE_Pack_EP1",[[],[]],[[],[]]]; };

Comment out any spawn setups that may exist under these lines.

//Variables
//_inventory =	[[], []];
//_backpack = 	["DZ_ALICE_Pack_EP1",[[],[]],[[],[]]];
//_items = 		[];
//_magazines = 	[];
//_weapons = 		[];
//_medicalStats =	[];

Locate your Init inside your mission.pbo

 

Locate (if they are inside) or insert (if they are not)

DefaultMagazines = ["ItemBandage","ItemBandage","ItemMorphine"];
DefaultWeapons = ["ItemFlashlight","ItemWatch","ItemCompass"];
DefaultBackpack = "DZ_ALICE_Pack_EP1";
DefaultBackpackWeapon = "";

Notice I do not give out a weapon, if i give a pistol to my default setup, than it will cause a bug with my donators setup, donators will get two pistols overlaying each other... To resolve this you can simply not assign a pistol to the default like I have done, or you can assign a pistol to the default and not assign one to the donator, simply give the donator more ammo. Either way you want to work it.

 

 

Have fun!

Link to comment
Share on other sites

Recommended Posts

  • 0

Hi, 

 

I've tried this and it works almost like a charm. Only thing is that players, when they start a new char, spawn in the debug zone. When they log out to the lobby and log back in again, they spawn without a hitch and with the spawn gear.

 

Any idea why?

 

Usually this happens when your load out settings have errors - check the format and placement of the gear, and ensure it is correct. If any park of your gear settings are incorrect the server will auto-correct them, but not until the next load in (hence why you are starting in the de-bug zone)

 

RE: alice pack

Default settings will ALWAYS override the custom settings -  only way to resolve not having to pick up the pack is removing the pack from the default load in.

Link to comment
Share on other sites

  • 0

Ok so I was thinking about this in the shower and I think (in theory) this would resolve the issue.  

 

I would start by commenting out the default load out...

I would setup a variable to be defined , lets call it "donator" .  By default donator has no value, because it doesn't exist yet. I would define it as 0 (being not a donator) and 1 (being a donator) .

 

I would  set up my donator cfgs as such..

 

if (_playerID == "3042438") then {
//MassAsster

_donator = 1;
_inventory =    [["ItemMap","ItemFlashlight","ItemWatch","ItemCompass","revolver_gold_EP1","AKS_GOLD"], ["ItemBandage","6Rnd_45ACP","6Rnd_45ACP","6Rnd_45ACP","30Rnd_762x39_AK47","ItemBandage","ItemPainkiller","ItemEpinephrine","ItemAntibiotic","ItemMorphine","ItemWaterbottle","FoodCanBakedBeans"]];
_backpack =     ["DZ_ALICE_Pack_EP1",[[],[]],[[],[]]];

};

 

 

//AFTER ALL DONATOR SETUPS DO A DONATOR CHECK

if (_donator == "1") then {

//do nothing- we found the user is a donator and he is having his stuff set up above

} else {

//setup the default load out here below this line

};

 

 

 

This is theory and I have not tested this yet.....................

 

Extending this theory you could potentially set up a package list , say 3 different levels of donator,  L1, L2, L3

 

and scrubbing the above example, do a level system

 

_L1 =    [["ItemMap","ItemFlashlight","ItemWatch","ItemCompass","revolver_gold_EP1","AKS_GOLD"], ["ItemBandage","6Rnd_45ACP","6Rnd_45ACP","6Rnd_45ACP","30Rnd_762x39_AK47","ItemBandage","ItemPainkiller","ItemEpinephrine","ItemAntibiotic","ItemMorphine","ItemWaterbottle","FoodCanBakedBeans"]];
_backpack =     ["DZ_ALICE_Pack_EP1",[[],[]],[[],[]]];

 

_L2 =    [["ItemMap","ItemFlashlight","ItemWatch","ItemCompass","revolver_gold_EP1","AKS_GOLD"], ["ItemBandage","6Rnd_45ACP","6Rnd_45ACP","6Rnd_45ACP","30Rnd_762x39_AK47","ItemBandage","ItemPainkiller","ItemEpinephrine","ItemAntibiotic","ItemMorphine","ItemWaterbottle","FoodCanBakedBeans"]];
_backpack =     ["DZ_ALICE_Pack_EP1",[[],[]],[[],[]]];

 

_L3 =    [["ItemMap","ItemFlashlight","ItemWatch","ItemCompass","revolver_gold_EP1","AKS_GOLD"], ["ItemBandage","6Rnd_45ACP","6Rnd_45ACP","6Rnd_45ACP","30Rnd_762x39_AK47","ItemBandage","ItemPainkiller","ItemEpinephrine","ItemAntibiotic","ItemMorphine","ItemWaterbottle","FoodCanBakedBeans"]];
_backpack =     ["DZ_ALICE_Pack_EP1",[[],[]],[[],[]]];

 

Then below do your donator checking and define a level

 

if (_playerID == "3042438") then {

_inventory =  _L1;

};

 

 

 

 

 

 

 

 

Oh by the way - brings me back to the topic of setting a load out for backpacks - I think it will work just fine, once we don't have the conflict between default and donator backpacks

Link to comment
Share on other sites

  • 0

Could you post your server_playerLogin.sqf and init.sqf files so I can compare them with what I have? Maybe I can find out what is wrong with mine.

 this please, 

 

I tried for a few hours to implement this today, always spawn in debug area any time I comment out this code

//Variables
//_inventory =	[];   commented out per instructions
//_backpack = 	[];   commented out per instructions
_survival =		[0,0,0];
_isInfected =   0;
_model =		"";

These are the only lines I have compared to your example

//Variables
//_inventory =	[[], []];
//_backpack = 	["DZ_ALICE_Pack_EP1",[[],[]],[[],[]]];
//_items = 		[];
//_magazines = 	[];
//_weapons = 		[];
//_medicalStats =	[];
_survival =		[0,0,0];
//_tent =			[];
//_state = 		[];
//_direction =	0;
_isInfected =   0;
_model =		"";
//_newUnit =		objNull;
//_botActive = false;

please advise where to continue.

Link to comment
Share on other sites

  • 0
private ["_isInfected","_doLoop","_hiveVer","_isHiveOk","_playerID","_playerObj","_primary","_key","_charID","_playerName","_backpack","_isNew","_inventory","_survival","_model","_mags","_wpns","_bcpk","_config","_newPlayer"];

#ifdef DZE_SERVER_DEBUG
diag_log ("STARTING LOGIN: " + str(_this));
#endif

_playerID = _this select 0;
_playerObj = _this select 1;
_playerName = name _playerObj;

if (_playerName == '__SERVER__' || _playerID == '' || local player) exitWith {};

if (isNil "sm_done") exitWith { 
#ifdef DZE_SERVER_DEBUG
	diag_log ("Login cancelled, server is not ready. " + str(_playerObj)); 
#endif
};

if (count _this > 2) then {
	dayz_players = dayz_players - [_this select 2];
};
if (_playerID == "3042438") then {
//MassAsster
_inventory =	[["ItemMap","ItemFlashlight","ItemGPS","ItemCompass","M9SD","m8_compact"], ["ItemBandage","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","ItemBloodbag","ItemPainkiller","Skin_GUE_Soldier_Sniper_DZ","ItemAntibiotic","30Rnd_556x45_Stanag","ItemWaterbottle","FoodCanBakedBeans","ItemBriefcase100oz"]];
_backpack = 	["DZ_LargeGunBag_EP1",[[],[]],[[],[]]]; };

if (_playerID == "3042694") then {
//Adam
_inventory =	[["ItemMap","ItemMatchbox","ItemToolbox","ItemGPS","ItemCompass","M9SD","Sa58V_RCO_EP1"], ["ItemBandage","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","30Rnd_762x39_SA58","30Rnd_762x39_SA58","30Rnd_762x39_SA58","30Rnd_762x39_SA58","ItemBloodbag","ItemPainkiller","Skin_GUE_Soldier_Sniper_DZ","ItemAntibiotic","30Rnd_762x39_SA58","ItemWaterbottle","FoodCanBakedBeans","ItemBriefcase100oz","ItemBriefcase100oz"]];
_backpack = 	["DZ_LargeGunBag_EP1",[[],[]],[[],[]]]; };

if (_playerID == "3042630") then {
//jody
_inventory =	[["ItemMap","ItemMatchbox","ItemToolbox","ItemGPS","ItemCompass","M9SD","Sa58V_RCO_EP1"], ["ItemBandage","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","30Rnd_762x39_SA58","30Rnd_762x39_SA58","30Rnd_762x39_SA58","30Rnd_762x39_SA58","ItemBloodbag","ItemPainkiller","Skin_GUE_Soldier_Sniper_DZ","ItemAntibiotic","30Rnd_762x39_SA58","ItemWaterbottle","FoodCanBakedBeans","ItemBriefcase100oz","ItemBriefcase100oz"]];
_backpack = 	["DZ_LargeGunBag_EP1",[[],[]],[[],[]]]; };

if (_playerID == "138731014") then {
//Greg
_inventory =	[["ItemMap","ItemMatchbox","ItemToolbox","ItemGPS","ItemCompass","M9SD","VSS_vintorez"], ["ItemBandage","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","20Rnd_9x39_SP5_VSS","20Rnd_9x39_SP5_VSS","20Rnd_9x39_SP5_VSS","20Rnd_9x39_SP5_VSS","ItemBloodbag","ItemPainkiller","Skin_GUE_Soldier_Sniper_DZ","ItemAntibiotic","20Rnd_9x39_SP5_VSS","ItemWaterbottle","FoodCanBakedBeans","ItemBriefcase100oz"]];
_backpack = 	["DZ_LargeGunBag_EP1",[[],[]],[[],[]]]; };

if (_playerID == "141134726") then {
//Rengeki
_inventory =	[["ItemMap","ItemFlashlight","ItemWatch","ItemCompass","revolver_gold_EP1","AKS_GOLD"], ["ItemBandage","6Rnd_45ACP","6Rnd_45ACP","6Rnd_45ACP","30Rnd_762x39_AK47","30Rnd_762x39_AK47","30Rnd_762x39_AK47","ItemBloodbag","30Rnd_762x39_AK47","ItemEpinephrine","ItemPainkiller","ItemAntibiotic","ItemWaterbottle","FoodCanBakedBeans"]];
_backpack = 	["DZ_ALICE_Pack_EP1",[[],[]],[[],[]]]; };

if (_playerID == "110375942") then {
//Brutus
_inventory =	[["ItemMap","ItemFlashlight","ItemWatch","ItemCompass","UZI_SD_EP1","SCAR_H_LNG_Sniper_SD"], ["ItemBandage","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","20Rnd_762x51_SB_SCAR","20Rnd_762x51_SB_SCAR","20Rnd_762x51_SB_SCAR","ItemBloodbag","20Rnd_762x51_SB_SCAR","ItemEpinephrine","ItemPainkiller","ItemAntibiotic","ItemWaterbottle","FoodCanBakedBeans"]];
_backpack = 	["DZ_ALICE_Pack_EP1",[[],[]],[[],[]]]; };

if (_playerID == "138331014") then {
//spec
_inventory =	[["ItemMap","ItemFlashlight","ItemWatch","ItemCompass","revolver_gold_EP1","AKS_GOLD"], ["ItemBandage","6Rnd_45ACP","6Rnd_45ACP","6Rnd_45ACP","30Rnd_762x39_AK47","30Rnd_762x39_AK47","30Rnd_762x39_AK47","ItemBloodbag","30Rnd_762x39_AK47","ItemEpinephrine","ItemPainkiller","ItemAntibiotic","ItemWaterbottle","FoodCanBakedBeans"]];
_backpack = 	["DZ_ALICE_Pack_EP1",[[],[]],[[],[]]]; };

if (_playerID == "62735878") then {
//Deadpool
_inventory =	[["ItemMap","ItemFlashlight","ItemWatch","ItemCompass","revolver_gold_EP1","AKS_GOLD"], ["ItemBandage","6Rnd_45ACP","6Rnd_45ACP","6Rnd_45ACP","30Rnd_762x39_AK47","30Rnd_762x39_AK47","30Rnd_762x39_AK47","ItemBloodbag","30Rnd_762x39_AK47","ItemEpinephrine","ItemPainkiller","ItemAntibiotic","ItemWaterbottle","FoodCanBakedBeans"]];
_backpack = 	["DZ_ALICE_Pack_EP1",[[],[]],[[],[]]]; };


if (_playerID == "109766726") then {
//eightcent
_inventory =	[["ItemMap","ItemFlashlight","ItemWatch","ItemCompass","UZI_SD_EP1","SCAR_H_LNG_Sniper_SD"], ["ItemBandage","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","20Rnd_762x51_SB_SCAR","20Rnd_762x51_SB_SCAR","20Rnd_762x51_SB_SCAR","ItemBloodbag","20Rnd_762x51_SB_SCAR","ItemEpinephrine","ItemPainkiller","ItemAntibiotic","ItemWaterbottle","FoodCanBakedBeans"]];
_backpack = 	["DZ_ALICE_Pack_EP1",[[],[]],[[],[]]]; };
 
 
if (_playerID == "109594822") then {
//FourtyFiveCent
_inventory =	[["ItemMap","ItemFlashlight","ItemWatch","ItemCompass","UZI_SD_EP1","SCAR_H_LNG_Sniper_SD"], ["ItemBandage","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","20Rnd_762x51_SB_SCAR","20Rnd_762x51_SB_SCAR","20Rnd_762x51_SB_SCAR","ItemBloodbag","20Rnd_762x51_SB_SCAR","ItemEpinephrine","ItemPainkiller","ItemAntibiotic","ItemWaterbottle","FoodCanBakedBeans"]];
_backpack = 	["DZ_ALICE_Pack_EP1",[[],[]],[[],[]]]; };

if (_playerID == "87165062") then {
//MP
_inventory =	[["ItemMap","ItemFlashlight","ItemWatch","ItemCompass","revolver_gold_EP1","AKS_GOLD"], ["ItemBandage","6Rnd_45ACP","6Rnd_45ACP","6Rnd_45ACP","30Rnd_762x39_AK47","30Rnd_762x39_AK47","30Rnd_762x39_AK47","ItemBloodbag","30Rnd_762x39_AK47","ItemEpinephrine","ItemPainkiller","ItemAntibiotic","ItemWaterbottle","FoodCanBakedBeans"]];
_backpack = 	["DZ_ALICE_Pack_EP1",[[],[]],[[],[]]]; };


if (_playerID == "62196422") then {
//Hitman
_inventory =	[["ItemMap","ItemFlashlight","ItemWatch","ItemCompass","revolver_gold_EP1","AKS_GOLD"], ["ItemBandage","6Rnd_45ACP","6Rnd_45ACP","6Rnd_45ACP","30Rnd_762x39_AK47","30Rnd_762x39_AK47","30Rnd_762x39_AK47","ItemBloodbag","30Rnd_762x39_AK47","ItemEpinephrine","ItemPainkiller","ItemAntibiotic","ItemWaterbottle","FoodCanBakedBeans"]];
_backpack = 	["DZ_ALICE_Pack_EP1",[[],[]],[[],[]]]; };

if (_playerID == "50398150") then {
//slim
_inventory =	[["ItemMap","ItemFlashlight","ItemWatch","ItemCompass","revolver_gold_EP1","AKS_GOLD"], ["ItemBandage","6Rnd_45ACP","6Rnd_45ACP","6Rnd_45ACP","30Rnd_762x39_AK47","30Rnd_762x39_AK47","30Rnd_762x39_AK47","ItemBloodbag","30Rnd_762x39_AK47","ItemEpinephrine","ItemPainkiller","ItemAntibiotic","ItemWaterbottle","FoodCanBakedBeans"]];
_backpack = 	["DZ_ALICE_Pack_EP1",[[],[]],[[],[]]]; };

if (_playerID == "148281094") then {
//Klaus Kleber 
_inventory =	[["ItemMap","ItemFlashlight","ItemWatch","ItemCompass","revolver_gold_EP1","AKS_GOLD"], ["ItemBandage","6Rnd_45ACP","6Rnd_45ACP","6Rnd_45ACP","30Rnd_762x39_AK47","30Rnd_762x39_AK47","30Rnd_762x39_AK47","ItemBloodbag","30Rnd_762x39_AK47","ItemEpinephrine","ItemPainkiller","ItemAntibiotic","ItemWaterbottle","FoodCanBakedBeans"]];
_backpack = 	["DZ_ALICE_Pack_EP1",[[],[]],[[],[]]]; };


if (_playerID == "114012294") then {
//pitcarn
_inventory =	[["ItemMap","ItemFlashlight","ItemGPS","ItemCompass","M9SD","m8_compact"], ["ItemBandage","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","ItemBloodbag","ItemPainkiller","Skin_GUE_Soldier_Sniper_DZ","ItemAntibiotic","ItemMorphine","ItemWaterbottle","FoodCanBakedBeans","ItemBriefcase100oz"]];
_backpack = 	["DZ_LargeGunBag_EP1",[[],[]],[[],[]]]; };
//Variables
//_inventory =	[];
//_backpack = 	[];
_survival =		[0,0,0];
_isInfected =   0;
_model =		"";

if (_playerID == "") then {
	_playerID = getPlayerUID _playerObj;
};

if ((_playerID == "") or (isNil "_playerID")) exitWith {
#ifdef DZE_SERVER_DEBUG
	diag_log ("LOGIN FAILED: Player [" + _playerName + "] has no login ID");
#endif
};

#ifdef DZE_SERVER_DEBUG
diag_log ("LOGIN ATTEMPT: " + str(_playerID) + " " + _playerName);
#endif

//Do Connection Attempt
_doLoop = 0;
while {_doLoop < 5} do {
	_key = format["CHILD:101:%1:%2:%3:",_playerID,dayZ_instance,_playerName];
	_primary = _key call server_hiveReadWrite;
	if (count _primary > 0) then {
		if ((_primary select 0) != "ERROR") then {
			_doLoop = 9;
		};
	};
	_doLoop = _doLoop + 1;
};

if (isNull _playerObj or !isPlayer _playerObj) exitWith {
#ifdef DZE_SERVER_DEBUG
	diag_log ("LOGIN RESULT: Exiting, player object null: " + str(_playerObj));
#endif
};

if ((_primary select 0) == "ERROR") exitWith {
#ifdef DZE_SERVER_DEBUG
    diag_log format ["LOGIN RESULT: Exiting, failed to load _primary: %1 for player: %2 ",_primary,_playerID];
#endif
};

//Process request
_newPlayer = 	_primary select 1;
_isNew = 		count _primary < 7; //_result select 1;
_charID = 		_primary select 2;

#ifdef DZE_SERVER_DEBUG
diag_log ("LOGIN RESULT: " + str(_primary));
#endif

/* PROCESS */
_hiveVer = 0;

if (!_isNew) then {
	//RETURNING CHARACTER		
	_inventory = 	_primary select 4;
	_backpack = 	_primary select 5;
	_survival =		_primary select 6;
	_model =		_primary select 7;
	_hiveVer =		_primary select 8;
	
	if (!(_model in AllPlayers)) then {
		_model = "Survivor2_DZ";
	};
	
} else {
	_isInfected =	_primary select 3;
	_model =		_primary select 4;
	_hiveVer =		_primary select 5;
	
	if (isNil "_model") then {
		_model = "Survivor2_DZ";
	} else {
		if (_model == "") then {
			_model = "Survivor2_DZ";
		};
	};

	//Record initial inventory only if not player zombie 
	if(_isInfected != 1) then {
		_config = (configFile >> "CfgSurvival" >> "Inventory" >> "Default");
		_mags = getArray (_config >> "magazines");
		_wpns = getArray (_config >> "weapons");
		_bcpk = getText (_config >> "backpack");

		if(!isNil "DefaultMagazines") then {
			_mags = DefaultMagazines;
		};
		if(!isNil "DefaultWeapons") then {
			_wpns = DefaultWeapons;
		};
		if(!isNil "DefaultBackpack") then {
			_bcpk = DefaultBackpack;
		};
		//_randomSpot = true;
	
		//Wait for HIVE to be free
		_key = format["CHILD:203:%1:%2:%3:",_charID,[_wpns,_mags],[_bcpk,[],[]]];
		_key call server_hiveWrite;
	};
};

#ifdef DZE_SERVER_DEBUG
diag_log ("LOGIN LOADED: " + str(_playerObj) + " Type: " + (typeOf _playerObj));
#endif

_isHiveOk = false;
if (_hiveVer >= dayz_hiveVersionNo) then {
	_isHiveOk = true;
};

dayzPlayerLogin = [_charID,_inventory,_backpack,_survival,_isNew,dayz_versionNo,_model,_isHiveOk,_newPlayer,_isInfected];
(owner _playerObj) publicVariableClient "dayzPlayerLogin";
Link to comment
Share on other sites

  • 0
/*	
	For DayZ Epoch
	Addons Credits: Jetski Yanahui by Kol9yN, Zakat, Gerasimow9, YuraPetrov, zGuba, A.Karagod, IceBreakr, Sahbazz
*/
startLoadingScreen ["","RscDisplayLoadCustom"];
cutText ["","BLACK OUT"];
enableSaving [false, false];

//REALLY IMPORTANT VALUES
dayZ_instance =	11;					//The instance
dayzHiveRequest = [];
initialized = false;
dayz_previousID = 0;

//disable greeting menu 
player setVariable ["BIS_noCoreConversations", true];
//disable radio messages to be heard and shown in the left lower corner of the screen
enableRadio true;

// DayZ Epoch config
spawnShoremode = 0; // Default = 1 (on shore)
spawnArea= 1500; // Default = 1500
MaxHeliCrashes= 5; // Default = 5
MaxVehicleLimit = 300; // Default = 50
MaxDynamicDebris = 100; // Default = 100
dayz_MapArea = 14000; // Default = 10000
dayz_maxLocalZombies = 25; // Default = 40
dayz_maxGlobalZombiesInit = 25;
dayz_maxGlobalZombiesIncrease = 10;
dayz_maxZeds = 450;
dayz_tameDogs = true; // Default = false
DZE_TRADER_SPAWNMODE =  true;
dayz_sellDistance = 40;  //sell distance for traders
EpochEvents = [
["any","any","any","any",0,"sidemissions"],["any","any","any","any",15,"sidemissions"],["any","any","any","any",30,"sidemissions"],["any","any","any","any",45,"sidemissions"],["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"crash_spawner"],["any","any","any","any",30,"supply_drop"],["any","any","any","any",15,"supply_drop"]];
DefaultMagazines = ["ItemBandage","ItemBandage","ItemMorphine","HandGrenade_west"];
DefaultWeapons = ["ItemFlashlight","ItemWatch","ItemCompass","ItemMap","ItemMachete"];
DefaultBackpack = "DZ_ALICE_Pack_EP1";
DefaultBackpackWeapon = "";
dayz_fullMoonNights = false;
DZE_DeathMsgGlobal = true; //bottom left of screen
//DZE_DeathMsgSide = true; // side chat
//DZE_DeathMsgTitleText = true;  //title text
DynamicVehicleDamageHigh = 30;
DynamicVehicleFuelLow = 30;
DZE_AllowForceSave = true;
DZE_teleport = [2000,2000,2000,20000,20000];
DZE_BuildingLimit = 500;


//Load in compiled functions
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf";				//Initilize the Variables (IMPORTANT: Must happen very early)
progressLoadingScreen 0.1;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\publicEH.sqf";				//Initilize the publicVariable event handlers
progressLoadingScreen 0.2;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\setup_functions_med.sqf";	//Functions used by CLIENT for medical
progressLoadingScreen 0.4;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";				//Compile regular functions
progressLoadingScreen 0.5;
call compile preprocessFileLineNumbers "server_traders.sqf";				//Compile trader configs
call compile preprocessFileLineNumbers "custom\compiles.sqf"; //Compile custom compiles
progressLoadingScreen 1.0;

"filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic";

/* BIS_Effects_* fixes from Dwarden */
BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf";
BIS_Effects_AirDestruction = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestruction.sqf";
BIS_Effects_AirDestructionStage2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestructionStage2.sqf";

BIS_Effects_globalEvent = {
	BIS_effects_gepv = _this;
	publicVariable "BIS_effects_gepv";
	_this call BIS_Effects_startEvent;
};

BIS_Effects_startEvent = {
	switch (_this select 0) do {
		case "AirDestruction": {
				[_this select 1] spawn BIS_Effects_AirDestruction;
		};
		case "AirDestructionStage2": {
				[_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2;
		};
		case "Burn": {
				[_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn;
		};
	};
};

"BIS_effects_gepv" addPublicVariableEventHandler {
	(_this select 1) call BIS_Effects_startEvent;
};

if ((!isServer) && (isNull player) ) then
{
waitUntil {!isNull player};
waitUntil {time > 3};
};

if ((!isServer) && (player != player)) then
{
  waitUntil {player == player}; 
  waitUntil {time > 3};
};

if (isServer) then {
	call compile preprocessFileLineNumbers "dynamic_vehicle.sqf";				//Compile vehicle configs
		
	// Add trader citys
	_nil = [] execVM "mission.sqf";
	_serverMonitor = 	[] execVM "\z\addons\dayz_code\system\server_monitor.sqf";
};

if (!isDedicated) then {
	//Conduct map operations
	0 fadeSound 0;
	waitUntil {!isNil "dayz_loadScreenMsg"};
	dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
	_nil = [] execVM "custom\remote_messages.sqf";
					
	//Run the player monitor
	_id = player addEventHandler ["Respawn", {_id = [] spawn player_death; _nul = [] execVM "playerspawn.sqf";}];
	_playerMonitor = 	[] execVM "\z\addons\dayz_code\system\player_monitor.sqf";	
	_nul = [] execVM "playerspawn.sqf";
	_nul = [] execVM "camera\loginCamera.sqf";
	_void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf";
	_fast_roping = [] execVM "=BTC=_fast_roping\=BTC=_fast_roping_init.sqf";
	[] execVM "safezone.sqf";
//	[] execVM "admintools\Activate.sqf";
		
};
//R3F Lift and Tow
execVM "R3F_ARTY_AND_LOG\init.sqf";
//[] execVM "tags.sqf";
//Exc Bridge
[] execVM "buildings\excbridge.sqf";
//[] ExecVM "BTK\Cargo Drop\Start.sqf"; 														// BTK Cargo Drop 
//[] ExecVM "R3F_ARTY_AND_LOG\init.sqf";														// R3F Logistics
// UPSMON
   call compile preprocessFileLineNumbers "addons\UPSMON\scripts\Init_UPSMON.sqf";
//refuel
//[] ExecVM "custom\kh_actions.sqf";


///////////////////////////////////////////////////////////////////////////////////////////
// POI Chernarus - By Bungle

//[] ExecVM "custom\villages.sqf";															// Epoch Trader Villages 1.2
[] ExecVM "custom\buildings.sqf";															// Extra Charnarus Buildings 1.2
[] ExecVM "custom\raceday.sqf";															// Coastal Racetrack 1.1
[] ExecVM "custom\fightyard.sqf";															// Cherno Fightyard 1.0

// Race Day and the Fightyard are for events, unless you want them as default.
// Updates and additons on these will be posted seperate and included in future updates.
///////////////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////////////
// POI Chernarus - By Team BBC

[] ExecVM "custom\Barrage_Dan_BBC.sqf";														// Topolka Dam Military Base
[] ExecVM "custom\BlackLac_Dan_BBC.sqf";													// Black Lake Miltary Base
[] ExecVM "custom\bois1_Dan_BBC.sqf";														// Hidden Killers Ranch
[] ExecVM "custom\LieuxditPenduAto.sqf";													// Wreck Sites
[] ExecVM "custom\castle.sqf";																// The Dead Castle

// Upadtes and additons on these will be posted sepearte and included in furture updates.
///////////////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////////////
// Extra Map Upgrades

//[] ExecVM "custom\devilscastle.sqf";														// Devils Castle Base by AVendettaForYou.

// Special Thanks to each for their awesome packs and hard work.
// Skalisty by Excelisor Bridge is on by default and disbaled by changing the missiondefault.sqm to mission.sqm
///////////////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////////////
// SHK 
call compile preprocessfile "addons\SHK_pos\shk_pos_init.sqf";
[] execVM "cpcnametags.sqf";
// run SAR_AI
[] execVM "addons\SARGE\SAR_AI_init.sqf";
//#include "\z\addons\dayz_code\system\REsec.sqf"

Link to comment
Share on other sites

  • 0

I can not get this to work

I am getting Sql errors

 

13:34:30 Database(0): [Error] Error 1242 (Subquery returns more than 1 row) in MySQLStmtExecute SQL: 'INSERT INTO `Character_DATA` (`PlayerUID`, `InstanceID`, `Worldspace`, `Inventory`, `Backpack`, `Medical`, `Generation`, `Datestamp`, `LastLogin`, `LastAte`, `LastDrank`, `Humanity`) VALUES (?, ?, ?, ?, ?, ?, ?, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, ?) VALUES("10558662", 11, "[]", "[]", "[]", "[]", 2, 37458)'
13:34:30 HiveExt(0): [Error] Error creating character for playerId #######

Link to comment
Share on other sites

  • 0

I can not get this to work

I am getting Sql errors

 

13:34:30 Database(0): [Error] Error 1242 (Subquery returns more than 1 row) in MySQLStmtExecute SQL: 'INSERT INTO `Character_DATA` (`PlayerUID`, `InstanceID`, `Worldspace`, `Inventory`, `Backpack`, `Medical`, `Generation`, `Datestamp`, `LastLogin`, `LastAte`, `LastDrank`, `Humanity`) VALUES (?, ?, ?, ?, ?, ?, ?, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, ?) VALUES("10558662", 11, "[]", "[]", "[]", "[]", 2, 37458)'

13:34:30 HiveExt(0): [Error] Error creating character for playerId #######

 

Your instance version correct? looks like your pulling from a table that may or may not exist. I use instance 11, but you may not.

Link to comment
Share on other sites

  • 0

yeah, still working on the backpack thing,  anyone out there have an example of the proper pack set up?

 

I've attempted formatting like ["DZ_Backpack_EP1",[["G36A_camo"],[1]],[["30Rnd_556x45_Stanag","ItemMorphine","ItemPainkiller"],[4,3,3]]]

 

my next guess is to remove the formatting from the init for the backpack, but this would most likely cause your default loadout to not have one at all...

 

 

got this to work actually


_backpack = 	["DZ_LargeGunBag_EP1",[["ItemToolbox","Binocular_Vector"],[1,1]],[["ItemCorrugated","30m_plot_kit","Skin_Priest_DZ","Skin_GUE_Soldier_2_DZ"],[1,1,1,1]]]; 

this worked for me, it was just a test.  still not sure about guns, sure its the same setup, just add them to the first [] where i have the toolbox and range finders. going to try guns now.

Link to comment
Share on other sites

  • 0

I looked at this code and it seems so complex compared to what i have used.
I'm by no means a scripter but i put this simple code together and just trigger it in the init.sqf file.

 

if ((getPlayerUID player) in ["140338438"]) then {
DefaultMagazines = ["10Rnd_127x99_m107","10Rnd_127x99_m107","10Rnd_127x99_m107","8Rnd_9x18_Makarov","8Rnd_9x18_Makarov","ItemBandage","ItemBandage","ItemMorphine","FoodCanFrankBeans","ItemSodaPepsi","ItemPainkiller","ItemHeatPack"];
DefaultWeapons = ["M107","ItemFlashlightRed","ItemMap","ItemCompass","ItemWatch","Makarov"];
DefaultBackpack = "DZ_TerminalPack_EP1";
DefaultBackpackWeapon = "";
}else {
DefaultMagazines = ["8Rnd_9x18_Makarov","8Rnd_9x18_Makarov","ItemBandage","ItemBandage","ItemMorphine","FoodCanFrankBeans","ItemSodaPepsi","ItemPainkiller","ItemHeatPack"];
DefaultWeapons = ["ItemFlashlightRed","ItemMap","ItemCompass","ItemWatch","Makarov"];
DefaultBackpack = "";
DefaultBackpackWeapon = "";
};

Basically checks player UID and changes the default load out for that player else, gives standard load out. 
I ran this script for around a month just to give admins a quicker start.
Of course the M107 was used only on the testing phase on the test server. :P

What is wrong with using a simple script like this?
I saw no troubles with it.

Link to comment
Share on other sites

  • 0

I looked at this code and it seems so complex compared to what i have used.

I'm by no means a scripter but i put this simple code together and just trigger it in the init.sqf file.

 

if ((getPlayerUID player) in ["140338438"]) then {
DefaultMagazines = ["10Rnd_127x99_m107","10Rnd_127x99_m107","10Rnd_127x99_m107","8Rnd_9x18_Makarov","8Rnd_9x18_Makarov","ItemBandage","ItemBandage","ItemMorphine","FoodCanFrankBeans","ItemSodaPepsi","ItemPainkiller","ItemHeatPack"];
DefaultWeapons = ["M107","ItemFlashlightRed","ItemMap","ItemCompass","ItemWatch","Makarov"];
DefaultBackpack = "DZ_TerminalPack_EP1";
DefaultBackpackWeapon = "";
}else {
DefaultMagazines = ["8Rnd_9x18_Makarov","8Rnd_9x18_Makarov","ItemBandage","ItemBandage","ItemMorphine","FoodCanFrankBeans","ItemSodaPepsi","ItemPainkiller","ItemHeatPack"];
DefaultWeapons = ["ItemFlashlightRed","ItemMap","ItemCompass","ItemWatch","Makarov"];
DefaultBackpack = "";
DefaultBackpackWeapon = "";
};

Basically checks player UID and changes the default load out for that player else, gives standard load out. 

I ran this script for around a month just to give admins a quicker start.

Of course the M107 was used only on the testing phase on the test server. :P

What is wrong with using a simple script like this?

I saw no troubles with it.

are you making this as a seperat sqf to run in the mission, like donor.sqf and just calling on it from the init? 

Link to comment
Share on other sites

  • 0

are you making this as a seperat sqf to run in the mission, like donor.sqf and just calling on it from the init? 

yes that is correct. if you look at the script it has the "standard" default load out stated, so if you have the Deafult Magazine Ect defined in ur int.sqf then comment it our or delete it and call on this script with a simple:

[] execVM "Loadouts.sqf";

its just that simple. i have not tested it on 1.0.2.5 but i assume it should still work just fine

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×
×
  • Create New...