Jump to content
Sign in to follow this  
Hoplit

[NEED HELP] DayZ Private Hive custom scripts, heli crash loot

Recommended Posts

Hey Guys!

I rented a private hive server from Dayz.st. I spend 3 days searching, how to add custom scripts to the server like: No fog | vehicle lifting with heli | debug monitor | full moon at nights, etc... I only have permission to edit dayz_server.pbo and dayz_mission.pbo. Could anyone send me a tutorial, or tell me how to do this stuff?

Another question: I red this tutorial about how to add custom weapons to the crashed heli's loot table. http://fight2012.com/helicrash.html

When I open my server's server_functions.sqf I can't find this line: spawn_heliCrash

Pls somebody help me!

My server's server_functions.sqf (sorry for long Quote) :

waituntil {!isnil "bis_fnc_init"};

BIS_MPF_remoteExecutionServer = {

if ((_this select 1) select 2 == "JIPrequest") then {

[nil,(_this select 1) select 0,"loc",rJIPEXEC,[any,any,"per","execVM","ca\Modules\Functions\init.sqf"]] call RE;

};

};

BIS_Effects_Burn = {};

server_playerLogin = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerLogin.sqf";

server_playerSetup = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerSetup.sqf";

server_onPlayerDisconnect = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_onPlayerDisconnect.sqf";

server_updateObject = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_updateObject.sqf";

server_playerDied = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerDied.sqf";

server_publishObj = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_publishObject.sqf"; //Creates the object in DB

server_deleteObj = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_deleteObj.sqf"; //Removes the object from the DB

server_playerSync = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerSync.sqf";

zombie_findOwner = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\zombie_findOwner.sqf";

server_updateNearbyObjects = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_updateNearbyObjects.sqf";

server_spawnCrashSite = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnCrashSite.sqf";

//Get instance name (e.g. dayz_1.chernarus)

fnc_instanceName = {

"dayz_" + str(dayz_instance) + "." + worldName

};

vehicle_handleInteract = {

private["_object"];

_object = _this select 0;

needUpdate_objects = needUpdate_objects - [_object];

[_object, "all"] call server_updateObject;

};

vehicle_handleServerKilled = {

private["_unit","_killer"];

_unit = _this select 0;

_killer = _this select 1;

[_unit, "killed"] call server_updateObject;

_unit removeAllMPEventHandlers "MPKilled";

_unit removeAllEventHandlers "Killed";

_unit removeAllEventHandlers "HandleDamage";

_unit removeAllEventHandlers "GetIn";

_unit removeAllEventHandlers "GetOut";

};

check_publishobject = {

private["_allowed","_allowedObjects","_object"];

_object = _this select 0;

_playername = _this select 1;

_allowedObjects = ["TentStorage", "Hedgehog_DZ", "Sandbag1_DZ","TrapBear","Wire_cat1"];

_allowed = false;

diag_log format ["DEBUG: Checking if Object: %1 is allowed published by %2", _object, _playername];

if ((typeOf _object) in _allowedObjects) then {

diag_log format ["DEBUG: Object: %1 published by %2 is Safe",_object, _playername];

_allowed = true;

};

_allowed

};

//event Handlers

eh_localCleanup = {

private ["_object"];

_object = _this select 0;

_object addEventHandler ["local", {

if(_this select 1) then {

private["_type","_unit"];

_unit = _this select 0;

_type = typeOf _unit;

_myGroupUnit = group _unit;

_unit removeAllMPEventHandlers "mpkilled";

_unit removeAllMPEventHandlers "mphit";

_unit removeAllMPEventHandlers "mprespawn";

_unit removeAllEventHandlers "FiredNear";

_unit removeAllEventHandlers "HandleDamage";

_unit removeAllEventHandlers "Killed";

_unit removeAllEventHandlers "Fired";

_unit removeAllEventHandlers "GetOut";

_unit removeAllEventHandlers "GetIn";

_unit removeAllEventHandlers "Local";

clearVehicleInit _unit;

deleteVehicle _unit;

deleteGroup _myGroupUnit;

_unit = nil;

diag_log ("CLEANUP: DELETED A " + str(_type) );

};

}];

};

server_hiveWrite = {

private["_data"];

//diag_log ("ATTEMPT WRITE: " + _this);

_data = "HiveExt" callExtension _this;

diag_log ("WRITE: " +str(_data));

};

server_hiveReadWrite = {

private["_key","_resultArray","_data"];

_key = _this;

//diag_log ("ATTEMPT READ/WRITE: " + _key);

_data = "HiveExt" callExtension _key;

diag_log ("READ/WRITE: " +str(_data));

_resultArray = call compile format ["%1",_data];

_resultArray

};

server_characterSync = {

private ["_characterID","_playerPos","_playerGear","_playerBackp","_medical","_currentState","_currentModel","_key"];

_characterID = _this select 0;

_playerPos = _this select 1;

_playerGear = _this select 2;

_playerBackp = _this select 3;

_medical = _this select 4;

_currentState = _this select 5;

_currentModel = _this select 6;

_key = format["CHILD:201:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:",_characterID,_playerPos,_playerGear,_playerBackp,_medical,false,false,0,0,0,0,_currentState,0,0,_currentModel,0];

//diag_log ("HIVE: WRITE: "+ str(_key) + " / " + _characterID);

_key call server_hiveWrite;

};

//onPlayerConnected "[_uid,_name] spawn server_onPlayerConnect;";

onPlayerDisconnected "[_uid,_name] call server_onPlayerDisconnect;";

server_getDiff = {

private["_variable","_object","_vNew","_vOld","_result"];

_variable = _this select 0;

_object = _this select 1;

_vNew = _object getVariable[_variable,0];

_vOld = _object getVariable[(_variable + "_CHK"),_vNew];

_result = 0;

if (_vNew < _vOld) then {

//JIP issues

_vNew = _vNew + _vOld;

_object getVariable[(_variable + "_CHK"),_vNew];

} else {

_result = _vNew - _vOld;

_object setVariable[(_variable + "_CHK"),_vNew];

};

_result

};

server_getDiff2 = {

private["_variable","_object","_vNew","_vOld","_result"];

_variable = _this select 0;

_object = _this select 1;

_vNew = _object getVariable[_variable,0];

_vOld = _object getVariable[(_variable + "_CHK"),_vNew];

_result = _vNew - _vOld;

_object setVariable[(_variable + "_CHK"),_vNew];

_result

};

dayz_objectUID = {

private["_position","_dir","_key","_object"];

_object = _this;

_position = getPosATL _object;

_dir = direction _object;

_key = [_dir,_position] call dayz_objectUID2;

_key

};

dayz_objectUID2 = {

private["_position","_dir","_key"];

_dir = _this select 0;

_key = "";

_position = _this select 1;

{

_x = _x * 10;

if ( _x < 0 ) then { _x = _x * -10 };

_key = _key + str(round(_x));

} forEach _position;

_key = _key + str(round(_dir));

_key

};

dayz_recordLogin = {

private["_key"];

_key = format["CHILD:103:%1:%2:%3:",_this select 0,_this select 1,_this select 2];

_key call server_hiveWrite;

};

Share this post


Link to post
Share on other sites

You'd probably be better off with finding some sort of DayZ server creator forum or something, because most people don't know how to make a server here.

Share this post


Link to post
Share on other sites

Try http://opendayz.net/index.php?threads/dayz-1-7-5-1-heli-crash-loot.7638/

He believes it's now in compile\server_spawnCrashSite.sqf file, but doesn't feel comfortable about messing around.

Do know that the crash spawns now pull from three tables: Military, HeliCrash and MilitarySpecial.

http://dayzmod.com/forum/index.php?/topic/125753-dayz-mod-1761-hotfix/page__st__160#entry1210234

That would be -my- first order of business.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×