Karmafied

Paying for a *working* custom anti-death/delirium script

26 posts in this topic

Greetings!

I have a small, private server that I only play with my family on. I am capable of running and editing my server, but coding is way out of my area of expertise.

I am looking to pay someone $50.00 USD (via Paypal) to jumble the delirium script (ExileClientPostProcessingDelirium) so that when player damage reaches 1 (death), the player does not die, but experiences the most severe form of delirium (slow movement, awkward movement (if applicable)). No damage received (god-mode) for 15 minute countdown (the delirium should be so bad that they cannot properly aim/shoot).

If the player does not receive medical attention within 15 minutes (instadoc), they will die (player damage = 1).

For fairness and transparency, I would say that the first person to post a 100% WORKING version of this in this thread will receive payment. I will message the coder privately to obtain paypal info so I can send payment. PLEASE post below if you will be working on this.

Note: If anything in this request is not feasible or should be adjusted based on limitations, please post below and I will update post.

Edited by Karmafied

Share this post


Link to post
Share on other sites

Okay so i was able to create Delirium script you wanted, but i don't want money unless you really insist.

Here you go;

Open your config.cpp, add the code i have given below to class CfgExileCustomCode:

ExileClient_object_player_event_onHandleDamage = "client\ExileClient_object_player_event_onHandleDamage.sqf";

It should look like this:

https://dl.dropboxusercontent.com/s/i09voizbeagjzpf/20-Salı-WC752I6j22.png?dl=0

 

And content of ExileClient_object_player_event_onHandleDamage.sqf:

/**
 * Exile Mod
 * exile.majormittens.co.uk
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_unit","_selectionName","_amountOfDamage","_sourceOfDamage","_typeOfProjectile"];
_unit             = _this select 0;
_selectionName    = _this select 1;
_amountOfDamage   = _this select 2;
_sourceOfDamage   = _this select 3;
_typeOfProjectile = _this select 4;

_isDeliriumActive = true;
_neededDamageToActivateDelirium = 0.98;
deliriumMinutes  = 1;
minimumDamageToRestoreFromDeliriumStatus = 0.85;
restoreFullHealthAfterDelirium = true;
deliriumCameraShakeStrength = 8;
deliriumCameraShakeFrequency = 50;

if (_isDeliriumActive) then {
    if ((damage _unit) + _amountOfDamage > _neededDamageToActivateDelirium && !(player getVariable ["deliriumActive", false])) then
	{
		player setVariable ["deliriumActive", true];
		player allowDamage false;
		player setDamage _neededDamageToActivateDelirium;
		_amountOfDamage = 0;
		systemChat format ["You are DELIRIUM now for %1 minutes!", deliriumMinutes];
		enableCamShake true;
		_amountOfDamage;
		_this spawn
		{
			_endTime = time + (deliriumMinutes * 60);
			while{minimumDamageToRestoreFromDeliriumStatus <= damage player && time <= _endTime} do
			{
				addCamShake [deliriumCameraShakeStrength, deliriumMinutes * 60, deliriumCameraShakeFrequency];
				uiSleep 1;
			};
			systemChat "You are no longer DELIRIUM";
			player allowDamage true;
			enableCamShake false;
			resetCamShake;
			if (restoreFullHealthAfterDelirium) then {player setDamage 0;};
			player setVariable ["deliriumActive", false];
		};
    };
};

You are free to edit and distribute as you want, also all feedback is welcome.

Edited by RevoLand
  • Like 4

Share this post


Link to post
Share on other sites
Advertisement

Revo- Seriously... this is amazing. I am so impressed when you Coders do what you do. And, the fact that you don't want reimbursement for it, unreal. We will see, though. ;)

So I tested it, and it's awesome. I can see where I can modify things according to my liking (time of delirium, camera shake amount, etc.).

But, I noticed that after the delirium ends, you just go back to normal; you can never actually die.

Ideally, if it's possible, I would like the player to be able to heal themselves with an instadoc (before the delirium timer ends), but they don't receive healing in time, they die.

If you can add that, it's just about perfect.

And... thank you. :)

[Five Minutes Later]

Wait... am I an idiot? I just noticed this line:

restoreFullHealthAfterDelirium = true;

Do I just change that to false and it's what I am looking for?

Edited by Karmafied

Share this post


Link to post
Share on other sites

Well yeah, you never mentioned about how to/when to kill player so we can't die, hahaha. :D

Ideally, if it's possible, I would like the player to be able to heal themselves with an instadoc (before the delirium timer ends), but they don't receive healing in time, they die.

Okay, if i didn't understand wrong you can just change this line like this:

if (restoreFullHealthAfterDelirium) then {player setDamage 0;} else {player setDamage 1;};

So if you set restoreFullHealthAfterDelirium to false, it will kill the player when you out of delirium. :P

  • Like 1

Share this post


Link to post
Share on other sites

Well yeah, you never mentioned about how to/when to kill player so we can't die, hahaha. :D

Ahem... ;)

If the player does not receive medical attention within 15 minutes (instadoc), they will die (player damage = 1).

So, will this still apply? Can the player instadoc themselves during the delirium?

Share this post


Link to post
Share on other sites

Ahem... ;)

So, will this still apply? Can the player instadoc themselves during the delirium?

Use this:

/**
 * Exile Mod
 * exile.majormittens.co.uk
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_unit","_selectionName","_amountOfDamage","_sourceOfDamage","_typeOfProjectile"];
_unit             = _this select 0;
_selectionName    = _this select 1;
_amountOfDamage   = _this select 2;
_sourceOfDamage   = _this select 3;
_typeOfProjectile = _this select 4;

_isDeliriumActive = true;
_neededDamageToActivateDelirium = 0.98;
deliriumMinutes  = 1;
minimumDamageToRestoreFromDeliriumStatus = 0.85;
restoreFullHealthAfterDelirium = true;
deliriumCameraShakeStrength = 8;
deliriumCameraShakeFrequency = 50;

if (_isDeliriumActive) then {
    if ((damage _unit) + _amountOfDamage > _neededDamageToActivateDelirium && !(player getVariable ["deliriumActive", false])) then
	{
		player setVariable ["deliriumActive", true];
		player allowDamage false;
		player setDamage _neededDamageToActivateDelirium;
		_amountOfDamage = 0;
		systemChat format ["You are DELIRIUM now for %1 minutes!", deliriumMinutes];
		enableCamShake true;
		_amountOfDamage;
		_this spawn
		{
			_endTime = time + (deliriumMinutes * 60);
			while{minimumDamageToRestoreFromDeliriumStatus <= damage player && time <= _endTime} do
			{
				addCamShake [deliriumCameraShakeStrength, deliriumMinutes * 60, deliriumCameraShakeFrequency];
				uiSleep 1;
				
				if (time >= (_endTime - 2)) then {player setDamage 1;};
			};
			systemChat "You are no longer DELIRIUM";
			player allowDamage true;
			enableCamShake false;
			resetCamShake;
			if (restoreFullHealthAfterDelirium) then {player setDamage 0;};
			player setVariable ["deliriumActive", false];
		};
    };
};

So, if there is less time than 2 seconds to end delirium and user still didn't recover from delirium status player will get killed. :P

Edited by RevoLand

Share this post


Link to post
Share on other sites

Thanks so much, Revoland! I will be testing tonight. I will let you know how it goes. Super-psyched!

Update: Script works. Taking thread to private messages.

Edited by Karmafied

Share this post


Link to post
Share on other sites

revo, while your in the ExileClient_object_player_event_onHandleDamage.sqf

I would give my left nut if you could implement bleeding on damage, EXILE has this for NON PLAYER damage, it exists when you fall off soemthing etc, but never ever ever when you are shot. Insta docs stop the bleeding and heal you.

Id seriously bust a nut if you could implement bleeding....

Not particularly interested in the delerium script (however awesome it is) I just want players to bleed 5% damage per second until they insta doc 

 

infact looking at your script I reckon it wouldnt be difficult to alter it slightly to enable bleeding with the blood effect and set dmg x every 1 second.. im just not good enuff.. could use all the other effects aswel

 

 

 

Edited by John

Share this post


Link to post
Share on other sites

Could not seem to get it to work... i must be missing somthing. i put the sqf file right in the mission file, got rid of /client

ExileClient_object_player_event_onHandleDamage = "ExileClient_object_player_event_onHandleDamage.sqf";

then added to mission file 

/**
 * Exile Mod
 * exile.majormittens.co.uk
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_unit","_selectionName","_amountOfDamage","_sourceOfDamage","_typeOfProjectile"];
_unit             = _this select 0;
_selectionName    = _this select 1;
_amountOfDamage   = _this select 2;
_sourceOfDamage   = _this select 3;
_typeOfProjectile = _this select 4;

_isDeliriumActive = true;
_neededDamageToActivateDelirium = 0.50;
deliriumMinutes  = 1;
minimumDamageToRestoreFromDeliriumStatus = 0.85;
restoreFullHealthAfterDelirium = false;
deliriumCameraShakeStrength = 8;
deliriumCameraShakeFrequency = 50;

if (_isDeliriumActive) then {
    if ((damage _unit) + _amountOfDamage > _neededDamageToActivateDelirium && !(player getVariable ["deliriumActive", false])) then
	{
		player setVariable ["deliriumActive", true];
		player allowDamage false;
		player setDamage _neededDamageToActivateDelirium;
		_amountOfDamage = 0;
		systemChat format ["You are DELIRIUM now for %1 minutes!", deliriumMinutes];
		enableCamShake true;
		_amountOfDamage;
		_this spawn
		{
			_endTime = time + (deliriumMinutes * 60);
			while{minimumDamageToRestoreFromDeliriumStatus <= damage player && time <= _endTime} do
			{
				addCamShake [deliriumCameraShakeStrength, deliriumMinutes * 60, deliriumCameraShakeFrequency];
				uiSleep 1;
			};
			systemChat "You are no longer DELIRIUM";
			player allowDamage true;
			enableCamShake false;
			resetCamShake;
			if (restoreFullHealthAfterDelirium) then {player setDamage 0;};
			player setVariable ["deliriumActive", false];
		};
    };
};
You are free to edit and distribute as you want, also all feedback is welcome.

Edited Monday at 3:26 PM by RevoLand Karmafied likes this  Like this
 Quote

script looks amazing btw 

Share this post


Link to post
Share on other sites

Tuna, silly question but: You didn't also include this in the file, did you?

You are free to edit and distribute as you want, also all feedback is welcome.

Edited Monday at 3:26 PM by RevoLand Karmafied likes this  Like this
 Quote

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.