Jump to content
Sign in to follow this  
juandayz

[EPOCH CEMETARY]

Recommended Posts

This might cause people to camp cemeteries for easy gear, even build bases nearby.

I would suggest that you rather randomise it with multiple locations of cemeteries instead.

_cemeteries = [
	[[0,0,0],"Name of Cemetery"],
	[[0,0,0],"Name of Cemetery"],
	[[0,0,0],"Name of Cemetery"],
	[[0,0,0],"Name of Cemetery"],
	[[0,0,0],"Name of Cemetery"],
	[[0,0,0],"Name of Cemetery"]
];

_rand = floor random (count _cemeteries);
_cemetery = _cemeteries select _rand select 0;
_cemeteryName = _cemeteries select _rand select 1;
systemchat format ["Your body was buried in %2 at %1",_cemetery, _cemeteryName]; //or hint or whatever

 

Share this post


Link to post
Share on other sites
Just now, harcosgoogle said:

@juandayz

How to change coin/gold (convert crate item?)

For goldsystem...

1-call player_death.sqf from your custom compiles.sqf

 

2-  create player_death.sqf

Spoiler

private ["_crossType","_backPackMag","_backPackWpn","_backPack","_crate","_crosspos","_cross","_position","_customPosition","_killer","_coins","_ammo","_body","_distance","_infected","_playerID","_sourceName","_sourceWeapon","_sourceVehicleType","_isBandit","_punishment","_humanityHit","_myKills","_kills","_killsV","_display","_myGroup","_camera","_deathPos","_animState","_animStateArray","_animCheck","_source","_method","_realSource"];

if (deathHandled) exitWith {};
deathHandled = true;

// Get reference to player object before respawn into new unit (respawnDelay=0 in description.ext)
if (typeName (_this select 0) == "ARRAY") then {
	_body = (_this select 0) select 0;
	_source = (_this select 0) select 1;
} else {
	_body = player;
	_source = _this select 0;
};


_cemeteries = [
	[[5205.2866, 8582.541,0],"kabanino"],
	[[8332.0488, 5945.0884, 0],"kumyrna"],
	[[10020.204, 5512.1753,0],"staroye"],
	[[11184.681, 12290.43,0],"krasnostav"],
	[[8531.7148, 11980.951,0],"Gvozdno"],
	[[6201.606, 10397.821,0],"Grishino"],
	[[4569.5361, 6375.5166,0],"pogorevka"],
	[[7417.0859, 5195.2876,0],"mogilevka"]
];

_rand = floor random (count _cemeteries);
_cemetery = _cemeteries select _rand select 0;
_cemeteryName = _cemeteries select _rand select 1;
systemchat format ["Your body was buried in The Church of: %2 at %1",_cemetery, _cemeteryName];
_customPosition = _cemetery; // CEMETARY POS
_deathPos = getPos _body;
_playerID = getPlayerUID player;


_camera = "camera" camCreate _customPosition;
_camera camSetDir 0;
_camera camSetFOV 1;
_camera cameraEffect ["Internal","back"];
_camera camSetTarget _customPosition;
_camera camSetPos [_customPosition select 0, (_customPosition select 1) + 2, 5];
_camera camCommit 0;

//SetDamage immediately so Arma registers the player as dead and respawns them into new unit
if (typeName (_this select 0) != "ARRAY") then {
    player setDamage 1;
};

if (dayz_onBack != "") then {
	_body addWeapon dayz_onBack;
};

//Get killer information immediately. Weapon, distance or vehicle can change in seconds.
_infected = if (r_player_infected && DZE_PlayerZed) then {1} else {0};
_sourceName = "unknown";
_sourceWeapon = "";
_distance = 0;

_method = switch true do {
	case (_this select 1 != "find"): {_this select 1}; //Manually passed method
	case (dayz_lastDamageSource != "none" && diag_tickTime - dayz_lastDamageTime < 30): {dayz_lastDamageSource}; //Major event takes priority for cause of death (zombie, melee, shot, fell, etc.)
	case (dayz_lastMedicalSource != "none" && diag_tickTime - dayz_lastMedicalTime < 10): {dayz_lastMedicalSource}; //Starve, Dehyd, Sick
	default {"bled"}; //No other damage sources in last 30 seconds
};
_ammo = if (count _this > 2) then {_this select 2} else {""};

if (!isNull _source) then {
	if (!isNull _body) then {
		_distance = round (_body distance _source);
	};
	
	_sourceVehicleType = typeOf (vehicle _source);
	_sourceWeapon = currentWeapon _source;
	_sourceWeapon = switch true do {
		case (_ammo in ["PipeBomb","Mine","MineE"]): {_ammo};
		case ({_sourceVehicleType isKindOf _x} count ["LandVehicle","Air","Ship"] > 0): {_sourceVehicleType};
		case (_sourceWeapon == "Throw"): {(weaponState _source) select 3};
		default {_sourceWeapon};
	};
	
	if (alive _source) then {
		_sourceName = if (isPlayer _source) then {name _source} else {"AI"};
	} else {
		if (_source == _body) then {_sourceName = dayz_playerName;};
	};
};

//Send Death Notice
diag_log format["Player_Death: Body:%1 BodyName:%2 Infected:%3 SourceName:%4 SourceWeapon:%5 Distance:%6 Method:%7",_body,dayz_playerName,_infected,_sourceName,_sourceWeapon,_distance,_method];
PVDZ_plr_Death = [dayz_characterID,0,_body,_playerID,toArray dayz_playerName,_infected,toArray _sourceName,toArray _sourceWeapon,_distance,_method]; //Send name as array to avoid publicVariable value restrictions
publicVariableServer "PVDZ_plr_Death";

_body setVariable ["deathType", if (_method == "suicide") then {"shot"} else {_method}, true];
////

_position = [_customPosition, 1, 20, 2, 0, 20, 0] call BIS_fnc_findSafePos;

_crossType = "GraveCrossHelmet";
_cross = createVehicle [_crosstype, _position, [], 0, "CAN_COLLIDE"];
_crosspos = getPosATL _cross;



_crate = createVehicle ["USOrdnanceBox_EP1",_crosspos,[],0,"CAN_COLLIDE"];
clearMagazineCargoGlobal _crate;
clearWeaponCargoGlobal _crate;
_crate setposATL [(_crosspos select 0)+0.5,(_crosspos select 1)+0.5,_crosspos select 2];
_crate setVariable ["permaLoot",true,true];

_backPack = typeOf (unitBackPack _body);
if (_backPack != "") then {
	_backPackWpn = getWeaponCargo unitBackpack _body;
	_backPackMag = getMagazineCargo unitBackpack _body;

	if (count _backPackWpn > 0) then {{_crate addWeaponCargoGlobal [_x,(_backPackWpn select 1) select _forEachIndex]} forEach (_backPackWpn select 0);};
	if (count _backPackMag > 0) then {{_crate addMagazineCargoGlobal [_x,(_backPackMag select 1) select _forEachIndex]} forEach (_backPackMag select 0);};

	_crate addBackpackCargoGlobal [_backPack,1];
};

{ _crate addWeaponCargoGlobal [_x, 1] } forEach weapons _body;
{ _crate addMagazineCargoGlobal [_x ,1] } forEach magazines _body;




if (!local _source && isPlayer _source && !(_body isKindOf "PZombie_VB")) then { //If corpse is a player zombie do not give killer a human or bandit kill
	//Values like humanity which were setVariabled onto player before death remain on corpse.
	_isBandit = (_body getVariable["humanity",0]) <= -2000;
	//_isBandit = (typeOf _body in ["Bandit1_DZ","BanditW1_DZ"]);
	
	//if you are a bandit or start first - player will not recieve humanity drop
	_punishment = (_isBandit or {_body getVariable ["OpenTarget",false]});
	_humanityHit = 0;
	_realSource = effectiveCommander vehicle _source;

	if (!_punishment) then {
		//I'm "not guilty" - kill me and be punished
		_myKills = (_body getVariable ["humanKills",0]) * 33.3;
		// how many non bandit players have I (the dead player) killed?
		// punish my killer 2000 for shooting a surivor
		// but subtract 500 for each survivor I've murdered
		_humanityHit = -(2000 - _myKills);
		_kills = _realSource getVariable ["humanKills",0];
		_realSource setVariable ["humanKills",(_kills + 1),true];
		PVDZ_send = [_realSource,"Humanity",[_humanityHit,300]];
		publicVariableServer "PVDZ_send";
	} else {
		// im guilty kill me as bandit
		_killsV = _realSource getVariable ["banditKills",0];
		_realSource setVariable ["banditKills",(_killsV + 1),true];
	};
	
		
	//Setup for study bodys.

	_crate setVariable ["KillingBlow",[_realSource,_punishment],true];

};

disableSerialization;

//Prevent client freezes
_display = findDisplay 49;
if (!isNull _display) then {_display closeDisplay 0;};
if (dialog) then {closeDialog 0;};
if (visibleMap) then {openMap false;};

disableUserInput true;

[_body,20,true,_customPosition] call player_alertZombies;
if (dayz_soundMuted) then {call player_toggleSoundMute;}; // hide icon before fadeSound
0.1 fadeSound 0;

_body setVariable ["NORRN_unconscious", false, true];
_body setVariable ["unconsciousTime", 0, true];
_body setVariable ["USEC_isCardiac",false,true];
_body setVariable ["medForceUpdate",true,true];
_body setVariable ["bloodTaken", false, true];
_body setVariable ["startcombattimer", 0]; //remove combat timer on death
_body setVariable ["inCombat", false, true];
r_player_unconscious = false;
r_player_cardiac = false;
dayz_autoRun = false;

terminate dayz_musicH;
terminate dayz_slowCheck;
terminate dayz_monitor1;

//Reset (just in case)
//deleteVehicle dayz_playerTrigger;
//disableUserInput false;
r_player_dead = true;

//Player is dead!
3 fadeSound 0;

dayz_originalPlayer enableSimulation true;
addSwitchableUnit dayz_originalPlayer;
setPlayable dayz_originalPlayer;
selectPlayer dayz_originalPlayer;

_myGroup = group _body;
[_body] joinSilent dayz_firstGroup;
deleteGroup _myGroup;

80000 cutText ["","PLAIN"]; //Clear group tags
3 cutRsc ["default", "PLAIN",3];
4 cutRsc ["default", "PLAIN",3];

_body setVariable["combattimeout", 0, true];

_animState = toLower (animationState _body);
_animStateArray = toArray _animState;
_animCheck = toString ([(_animStateArray select 0),(_animStateArray select 1),(_animStateArray select 2),(_animStateArray select 3)]);
if ((_body == (vehicle _body)) && {_animState != "deadstate" && {_animCheck != "adth"}}) then { //fix running corpses - death anims begin with Adth
	[nil, _body, rSWITCHMOVE, ""] call RE;
	_body SWITCHMOVE "";
	PVDZ_plr_SwitchMove = [_body,""];
	publicVariableServer "PVDZ_plr_SwitchMove";
};

[_body,_camera,_customPosition] spawn {	
	_body = _this select 0;
	_camera = _this select 1;
	_customPosition = _this select 2;
	
	waitUntil {camCommitted _camera};
	_camera camSetPos [_customPosition select 0, (_customPosition select 1) + 2, 25];
	_camera camCommit 8;
	uiSleep 8;
	
	1 cutRsc [if (DZE_DeathScreen) then {"DeathScreen_DZE"} else {"DeathScreen_DZ"},"BLACK OUT",3];
	playMusic "dayz_track_death_1";
	uiSleep 2;

	for "_x" from 5 to 1 step -1 do {
		titleText [format[localize "str_return_lobby", _x], "PLAIN DOWN", 1];
		uiSleep 1;
	};

	PVDZ_Server_Simulation = [_body, false];
	publicVariableServer "PVDZ_Server_Simulation";
	
	_camera cameraEffect ["Terminate","BACK"];
	camDestroy _camera;
deleteVehicle _body;



	endMission "END1";
};

 

3-Nothing more. (gold system not require modifys in fn_selfactions)----  Done.

Share this post


Link to post
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
Sign in to follow this  

  • Similar Content

    • By Bloodthirsty
      Hey I just need some files for this server, any and all you guys can come up with and think it deserve post that shit in chat rn. I want to see some crazy ideas and additions if you got em :) Lets see what you guys can come up with

    • By juandayz
      I JUST LEAVE THIS ONE CUZ I KNOW YOU GUYS GONNA NEED IT..
       
      The very old safezone script by infistar... i was using it in 1.0.5.1  and made some changes to use in 1.6.
      Instructions:
          1. Copy paste the code of below into a file called 16_safezone.sqf - save the file.
          2. Paste this 16_safezone.sqf into mpmissioms\instance_11.chernarus\custom\
          3. Open your init.sqf
          4. At the very bottom of the file add this line:  [] execVM "custom\16_safezone.sqf";
          5. Save the init.sqf and restart your server.
          6-WARNING!!! if ure using some kind of mod that allow vehicles with GodMode out of safezones..  then you will need in 16_safezone.sqf change the path for veh_handleDam.sqf by the path that youre using your custom veh_handleDam.sqf
      this line:  fnc_veh_handleDam = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\veh_handleDam.sqf';
          16_safezone.sqf
       
      OPTIONAL:
      @BetterDeadThanZed here you got.
      REMOVE LOOT FROM TRADER CITIES AND PLOT POLES. (should removes zeds from trader places and poles too)
       
       
  • Advertisement
  • Advertisement
  • Supporters
  • Advertisement
  • Discord

×