SmokeyMeadow
Well-Known Member
Okay, I've been working on something to allow players to combine the various meds for recreational use and even a bit of a power up. Got it working now to allow the player to combine morphine, epinephrin and painkillers to create a potent cocktail with effects similar to PCP. During the duration of the effects, players can still be killed, but cannot be injured or knocked unconscious. Damage taken during a drug trip will be applied after the effects of the drug wear off. Meanwhile, player vision becomes severely impaired, thanks to part of a Takistan Life script I found linked here. I'm posting this thread so people can suggest possible effects from the drugs. I don't want this to be like an invincibility powerup, but still make the player "feel" invulnerable.
Here is a pre-release version of the script for you all to try. It's still being tested, so keep that in mind. Not responsible for any weird effects or death if you try to jump off a building or something. Enjoy.
This goes in fn_selfactions:
Then create a scripts folder and a file called speedball.sqf, put this code in that sqf:
This code will be updated over the weekend, so check back. Or chime in if you have any ideas.
*Update: Updated last lines of the speedball.sqf
**Update 2: Humanity penalty added. Thanks for the idea, reeper
Here is a pre-release version of the script for you all to try. It's still being tested, so keep that in mind. Not responsible for any weird effects or death if you try to jump off a building or something. Enjoy.
This goes in fn_selfactions:
Code:
//SPEEDBALL START
if((speed player <= 1) && ("ItemMorphine" in magazines player) && ("ItemPainkiller" in magazines player) && ("ItemEpinephrine" in magazines player)) then {
hasSpeed = true;
} else {
hasSpeed = false;
};
if (hasSpeed) then {
if (takeSpeed < 0) then {
takeSpeed = player addAction [("<t color=""#0096ff"">" + ("Mix Medications") +"</t>"),"scripts\speedball.sqf","",5,false,true,"",""];
};
} else {
player removeAction takeSpeed;
takeSpeed = -1;
};
//SPEEDBALL END
Then create a scripts folder and a file called speedball.sqf, put this code in that sqf:
Code:
private ["_chance", "_drugTrip", "_trip"];
_chance = floor(random 100);
_trip = _this select 2;
_drugTrip = time + 60 + (_trip * 10);
player playActionNow "Medic";
sleep 1;
titleText ["You mix various medications into a potent cocktail.","PLAIN DOWN"]; titleFadeOut 5;
sleep 5;
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
dayzHumanity = [player,-100];
_id = dayzHumanity spawn player_humanityChange;
player removeMagazine "ItemPainkiller";
player removeMagazine "ItemMorphine";
player removeMagazine "ItemEpinephrine";
if (_chance > 10) then
{
titleText ["You are ready to kick ass!","PLAIN DOWN"]; titleFadeOut 5;
while {time < _drugTrip} do {
_force = random 10;
"chromAberration" ppEffectEnable true;
"chromAberration" ppEffectAdjust [_force / 24, _force / 24, false];
"chromAberration" ppEffectCommit (0.3 + random 0.1);
waituntil {ppEffectCommitted "chromAberration"};
r_player_inpain = false;
player setVariable["USEC_inPain",false,false];
r_player_injured = false;
player setVariable ["USEC_injured",false,false];
player setVariable ["NORRN_unconscious", false, false];
player setVariable ["unconsciousTime", 0, false];
r_fracture_legs = false;
player setVariable ["medForceUpdate",true,true];
r_fracture_arms = false;
player setHit["legs",0];
player setHit["hands",0];
sleep 0.6;
};
}
else
{
titleText ["You are tripping balls.","PLAIN DOWN"]; titleFadeOut 5;
while {time < _drugTrip} do {
_force = random 10;
"chromAberration" ppEffectEnable true;
"chromAberration" ppEffectAdjust [_force / 24, _force / 24, false];
"chromAberration" ppEffectCommit (0.3 + random 0.1);
"colorInversion" ppEffectEnable true;
"wetDistortion" ppEffectEnable true;
waituntil {ppEffectCommitted "chromAberration"};
sleep 0.6;
};
};
"colorInversion" ppEffectEnable false;
"wetDistortion" ppEffectEnable false;
"colorCorrections" ppEffectAdjust [1, 1, 0, [0.5,0.5,0.5,0], [0.5,0.5,0.5,0], [0.5,0.5,0.5,0]];
"colorCorrections" ppEffectCommit 10;
waitUntil {ppEffectCommitted "colorCorrections"};
"colorCorrections" ppEffectEnable false;
"chromAberration" ppEffectEnable false;
titleText ["Your brain is finally starting to feel normal again.","PLAIN DOWN"]; titleFadeOut 5;
r_player_inpain = false;
player setVariable["USEC_inPain",false,false];
r_player_injured = false;
player setVariable ["USEC_injured",false,false];
r_fracture_legs = false;
player setVariable ["medForceUpdate",true,true];
r_fracture_arms = false;
player setHit["legs",0];
player setHit["hands",0];
//Speedball by Smokey Meadow
This code will be updated over the weekend, so check back. Or chime in if you have any ideas.
*Update: Updated last lines of the speedball.sqf
**Update 2: Humanity penalty added. Thanks for the idea, reeper