Jump to content

[WIP] Nuke a random town from laptop.


Recommended Posts

Looks like you edited the script. Cant help you with that just don't have the time.. sorry man.

 

All I can say is v0.5 is 100% working using infiSTAR AH along with Dami's AH, I can't support people not running it as I'm no mega scripter Just a noob and have no time to figure out why it isn't working for you.

 

Yeap yeap, i understand you man, no problem with that! =D Just in case some other people have the same problem.. 

But we are migrating to Infistar AH, so maybe it will work fine =D

Btw, thanks for all the support you gave me!

Link to comment
Share on other sites

The RPT logs I entered myself so I can check how the script is running through. As far as editing the script, it's being called as an epoch event instead of being called by the laptop. I prefer the event to take place at random rather than at my command.

 

I think perhaps lag is causing some problems as I heard the blast sound effect and experienced the earthquake 20 minutes after the nuke exploded. I'm using v0.4. I appreciate your attention in this, as I said. I'll keep poking around and I'll post a solution if/when I get one.

 

Thanks again...

Link to comment
Share on other sites

Here is a few extra towns if you want i'm too lazy to do all them xD

_rndSel = floor(random 14); //Set total number of cases here ( 5 Locations = number 5 here )
TTDropPos =
switch (_rndSel) do
{
    //Locations here X,Y,Z and add a name of the location for the messages
    case 0: {[4675.2314, 10175.737, 0, "NWAF"]};
    case 1: {[7083.7, 7704.39, 0, "Novy Sobor"]};
    case 2: {[6722.62, 2594.05, 0, "Chernogorsk"]};
	case 3: {[10482.7, 2244.02, 0, "Elektrozavodsk"]};
	case 4: {[4916.03, 2421.22, 0, "Balota"]};
	case 5: {[2763.34, 5322.72, 0, "Zelenogorsk"]};
	case 6: {[7563.78, 5164.71, 0, "Mogilevka"]};
	case 7: {[6575.86,6053.93, 0, "Vyshnoye"]};
	case 8: {[9617.21,8813.33, 0, "Gorka"]};
	case 9: {[12027.3, 9099.75, 0, "Berezino"]};
	case 10: {[9172.4, 3819.13, 0, "Pusta"]};
	case 11: {[11130.5, 12303.5, 0, "Krasnostav"]};
	case 12: {[13405.3, 6246.84, 0, "Solnichniy"]};
	case 13: {[1906.88, 2243, 0, "Kamenka"]};
};
Link to comment
Share on other sites

Just let you guys know.. The scripting is working 100% with infstar.

 

I was with some problems and the script wasn't running.

The only thing i did was to purchase and install the infstar AH.

 

The nuke now is working =D

 

Btw, thanks to TayTay, even with lots of problems, he took the time to help me in pvt chat =D

 

Thanks man!

Link to comment
Share on other sites

The RPT logs I entered myself so I can check how the script is running through. As far as editing the script, it's being called as an epoch event instead of being called by the laptop. I prefer the event to take place at random rather than at my command.

 

I think perhaps lag is causing some problems as I heard the blast sound effect and experienced the earthquake 20 minutes after the nuke exploded. I'm using v0.4. I appreciate your attention in this, as I said. I'll keep poking around and I'll post a solution if/when I get one.

 

Thanks again...

I can give you my version with a random sleep timer if you want I just set it to 5 hours (my uptime) and then it randomly goes off any time in that 5 hours.

(logs to the rpt the timer delay so you know when it is going to go off)

Also I added a message for players when they log in basically a nuke status (will say it hasn't gone off or will say it has and tell you the location) so people don't get confused when loggin in and seeing ash falling with wind and vibrant colours 

Link to comment
Share on other sites

Just let you guys know.. The scripting is working 100% with infstar.

 

I was with some problems and the script wasn't running.

The only thing i did was to purchase and install the infstar AH.

 

The nuke now is working =D

 

Btw, thanks to TayTay, even with lots of problems, he took the time to help me in pvt chat =D

 

Thanks man!

No worrys man.. 

Link to comment
Share on other sites

I can give you my version with a random sleep timer if you want I just set it to 5 hours (my uptime) and then it randomly goes off any time in that 5 hours.

(logs to the rpt the timer delay so you know when it is going to go off)

Also I added a message for players when they log in basically a nuke status (will say it hasn't gone off or will say it has and tell you the location) so people don't get confused when loggin in and seeing ash falling with wind and vibrant colours 

 

This sounds good!! Because i tried to set up like,.. 20 random cases, and when i log out of the server to change my position (only had the coords, not the map location) and came back, the siren sound was gone...

Any way to fix this?

 

Also, can you provide the code to show the message to players after the nuke has been used?

Link to comment
Share on other sites

This sounds good!! Because i tried to set up like,.. 20 random cases, and when i log out of the server to change my position (only had the coords, not the map location) and came back, the siren sound was gone...

Any way to fix this?

 

Also, can you provide the code to show the message to players after the nuke has been used?

Unfortunately due to the way the script works if you login through the middle of the script running you wont hear the sires or see the nuke smoke, this is due to the script spawning the effects on the players who are online at the time the script executes and runs local on them. Also logging out and back in will stop it. Only the after effects are JIP (rad zone, marker,ash,colours and wind)

 

as for the simple messages replace effects .sqf with this for now 

waitUntil {((!isNil "dayz_animalCheck") || (!isNil "dayz_spawnCheck") || (!isNil "dayz_locationCheck") || (!isNil "dayz_slowCheck"))};
TTRadZoneEffects = false;
_radTimer = 0;
_TTName = TTDropPos select 3; //Leave this alone

TTmsg1 = "Nuclear Threat Status :: No reports of a nuclear detonation yet...";
TTmsg2 = "Nuclear Threat Status :: Reports of a nuclear detonation at "+str _TTName+". Radiation zone will be marked on your map."; 

_TTone = {cuttext [TTmsg1,"PLAIN DOWN"];};
_TTtwo = {cuttext [TTmsg2 ,"PLAIN DOWN"];};

if (isNil "TTnukeTrigger") then {   
    sleep 10;  
    player spawn _TTone; 
} else {
    if (!isNil "TTnukeTrigger") then {
        sleep 10;
        Player spawn _TTtwo;
    };
};
waitUntil {sleep 0.3; !isNil "TTNukeEffects"};

_rad1 = ppEffectCreate ["colorCorrections", 1501];
_rad1 ppEffectEnable true;
_rad1 ppEffectAdjust [1, 1, 0, [0,0,0,0], [1.1,0.7,1.1,1.1], [1.0,0.7,1.0,1.1]]; 
_rad1 ppEffectCommit 45;

Player Spawn _TTtwo;
if (TTShowMrk && isNil "TTDelNuke") then {
    _nil = createMarkerLocal ["TTNukeMrk", TTEffectsTrigger];
    "TTNukeMrk" setMarkerShapeLocal "ELLIPSE";
    "TTNukeMrk" setMarkerTypeLocal "Warning";
    "TTNukeMrk" setMarkerColorLocal "ColorRed";
    "TTNukeMrk" setMarkerBrushLocal "SOLID";
    "TTNukeMrk" setMarkerSizeLocal [TTRadZ, TTRadZ];
    _null = createMarkerLocal ["TTNukeMrkText", TTEffectsTrigger];
    "TTNukeMrkText" setMarkerColorLocal "ColorBlack";
    "TTNukeMrkText" setMarkerTypeLocal "Vehicle";
    "TTNukeMrkText" setMarkerTextLocal TTTxtMrk;
};
TTnukeTrigger setTriggerActivation ["ANY", "PRESENT", true];
TTnukeTrigger setTriggerStatements ["(player distance thisTrigger) < TTRadZ","TitleText[""Geiger on..."",""PLAIN DOWN""];execVM ""Nuke\Effects\on.sqf"";TTRadZoneEffects = true;","TitleText[""Geiger off..."",""PLAIN DOWN""];execVM ""Nuke\Effects\off.sqf"";TTRadZoneEffects = false;"];
waitUntil{sleep 0.3; !isNil "TTwindAsh"};
winds = {while {true} do{_ran = ceil random 2;_pos = position player;_velocity = [random 10,random 10,-1];_color = [1.0, 0.9, 0.8];_alpha = 0.02 + random 0.02;_ps = "#particlesource" createVehicleLocal _pos;  _ps setParticleParams [["\Ca\Data\ParticleEffects\Universal\universal.p3d", 16, 12, 8], "", "Billboard", 1, 3, [0, 0, -6], _velocity, 1, 1.275, 1, 0, [9], [_color + [0], _color + [_alpha], _color + [0]], [1000], 1, 0, "", "", _pos];_ps setParticleRandom [3, [30, 30, 0], [0, 0, 0], 1, 0, [0, 0, 0, 0.01], 0, 0];_ps setParticleCircle [0.1, [0, 0, 0]];_ps setDropInterval 0.01;sleep (random 1);_delay = 1 + random 5;sleep _delay;deletevehicle _ps;};};
ash = {_pos = position player;_parray = [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 12, 8, 1],"","Billboard",1,4,[0,0,0],[0,0,0],1,0.000001,0,1.4,[0.05,0.05],[[0.1,0.1,0.1,1]],[0,1],0.2,1.2,"","",vehicle player];_ash = "#particlesource" createVehicleLocal _pos;  _ash setParticleParams _parray;_ash setParticleRandom [0, [10, 10, 7], [0, 0, 0], 0, 0.01, [0, 0, 0, 0.1], 0, 0];_ash setParticleCircle [0.0, [0, 0, 0]];_ash setDropInterval 0.003;};
doobreath = {private ["_pos", "_ps"];sleep random 2;_pos = _this selectionposition "neck";while {_this distance player < 800 and _this distance TTnukeTrigger < TTRadZ and alive _this and vehicle _this == _this and _pos select 2 != 0} do {_pos = _this selectionposition "neck";_ps = "#particlesource" createvehiclelocal getpos _this;_ps setparticleparams [["\ca\data\particleeffects\universal\universal.p3d", 16, 12, 13, 0], "", "Billboard", 0.5, 0.5, [_pos select 0, (_pos select 1) + 0.15, _pos select 2], [0, 0.2, -0.2], 1, 1.275, 1, 0.2, [0, 0.2, 0], [[1, 1, 1, 0.01], [1, 1, 1, 0.01], [1, 1, 1, 0]], [1000], 1, 0.04, "", "", _this];_ps setparticlerandom [2, [0, 0, 0], [0.25, 0.25, 0.25], 0, 0.5, [0, 0, 0, 0.1], 0, 0, 10];_ps setdropinterval 0.001;_this setvariable ["runningbreath", floor time + 5];sleep 0.5;deletevehicle _ps;sleep 2 + random 2;};};
player spawn ash;
player spawn winds;
[] spawn {while {true} do{sleep 5;_near = nearestobjects [player, ["Man"], 500];{if (alive _x and vehicle _x == _x and _x getvariable ["runningbreath", -1] < time) then {_x setvariable ["runningbreath", floor time + 5];_x spawn doobreath;};} foreach _near;};};
while {true} do
{
    if (TTRadZoneEffects and typeof player in TTAntiR) then
    {
        [player,"radzone1",0,true] call dayz_zombieSpeak;
    };
	
    if (TTRadZoneEffects and !(typeof player in TTAntiR)) then
    {
        _radsound = "radzone1";
        _bloodloss = 1;
        if(_radTimer > 5 AND _radTimer < 10) then
        {
            _radsound = "radzone2";
            _bloodloss = 1;
        };
        if(_radTimer > 10) then
        {
            _radsound = "radzone3";
            _bloodloss = 1;
        };
        if(_radTimer > 15) then 
        {
            _radsound = "radzone4";
            _bloodloss = TTBlood;
        };
        _result = r_player_blood - _bloodloss;
        if (_result < 0) then
        {
            _id = [player,"rad"] spawn player_death;
        } else {
            r_player_blood = _result;
        };
        addCamShake [2, 1, 25];
        [player,_radsound,0,true] call dayz_zombieSpeak;
        _radTimer = _radTimer + 1;
    } else {
        _radTimer = 0;	
    };
	
    sleep 2;
};

Ill release a new version soon so people can edit the mesages in the settings.sqf

Link to comment
Share on other sites

Awesome work TayTayTheKiller. I can report that editing code myself (just when I thought I had it...damn) does break script and that, installing it vanilla; everything works fine. I was desperate to have the detonation beyond anyones control, running it as an epoch event, but it was always anticipated every hour. The random timer is the definitive version for me.

 

Thank you so much...beans!

Link to comment
Share on other sites

Been working on a update for this.

 

I decided to make a version that doesn't require a laptop to go of it will just go off at random one time per restart along with logging to the rpt to tell you the location and how long till the event goes off.

 

I moved server_nuke.sqf to the server.pbo along with moving most of the client effects to that file, I also moved the marker server side.

 

Added messages for players when logging in to show the status of the nuke going off so they don't get confused when coming in to the server with ash falling etc.

 

Should be done with it tomorrow :)

Link to comment
Share on other sites

Been working on a update for this.

 

I decided to make a version that doesn't require a laptop to go of it will just go off at random one time per restart along with logging to the rpt to tell you the location and how long till the event goes off.

 

I moved server_nuke.sqf to the server.pbo along with moving most of the client effects to that file, I also moved the marker server side.

 

Added messages for players when logging in to show the status of the nuke going off so they don't get confused when coming in to the server with ash falling etc.

 

Should be done with it tomorrow :)

 

Some players in my server had the idea to make it integrated with AI scripts.. For example, the Nuke will go on after X time after the reestart, and players need to raid a castle, or something to stop the Nuke.

Instead of using the LapTop to activate the Nuke, is it possible to use to Deactivate it?

 

Will be waiting for your update =D

Link to comment
Share on other sites

Some players in my server had the idea to make it integrated with AI scripts.. For example, the Nuke will go on after X time after the reestart, and players need to raid a castle, or something to stop the Nuke.

Instead of using the LapTop to activate the Nuke, is it possible to use to Deactivate it?

 

Will be waiting for your update =D

That would be pretty simple to do :)

Link to comment
Share on other sites

Ok so here is a version that doesn't depend on a laptop to go off. This version will go off one time per restart at random.

 

I also included a option to give it less probability of going off per restart. Check out settings.sqf

 

I made it log to the server rtp the amount of time until it goes off and what location.

 

I re added the option to enable building damage again because I kind of worked around the problem of it screwing the smoke and blast effects up. So far it causes hardly any client lag in testing when I was testing on Zelenogorsk with 400m damage radius but I have no clue how it will act on bigger towns as of now.

 

Moved most of the effects to server_nuke.sqf

 

Moved the marker server side to cause less issues with anti hacks in the future

 

Removed the option to delete the radiation zone after a set amount of time for now.

 

Added a message for players when they log in letting them notice the status of the nuke so they don't get confused with the falling ash and winds.

 

I Haven't tested with infiSTAR AH or filters only Dami's but I don't see why there would be any issues.

 

V0.6

 

Make sure to go through settings.sqf and install the same way as the old version for now.

 

Let me know of any problems and ill try to fix a.s.a.p. :)

Link to comment
Share on other sites

I have everything working except for the cfg part. I couldn't figure out how to add it. If added cfg before and never had this much trouble. I just skipped that part then it worked fine but im sure there will be no sound for it. I noticed in your directions it says ad #include "Nuke\sound\sounds.hpp" and if you look in folder there is no nuke sound sounds. its nuke\sound then all the sound folders are in there so do you still have to add the sounds in to the cfg section manually cus I cant figure it out. if someone could show me an example of a working one that would be awesome.  Thanks

Link to comment
Share on other sites

also im running server at 4 hour restart so what would I set the nuke time at to make it like 80 percent chance. I set it at 2.2 and I restarted like 4 times and every time rpt said nuke timer is past 5-7 hours and I also set the server time in seconds to 4 hours as well in the settings.

Link to comment
Share on other sites

Right now what this dose is.. 

 https://www.youtube.com/watch?v=JRlqwDvdHms

sets up  a laptop at the location of your choice that can trigger a nuke to go off at one of your predefined locations at random 1 time per restart. 

 

Send a warning to all players who are on the server at the time. 

 

Nuclear bomb goes off with air raid sirens going off at the location before it dose. 

 

Radiation zone will appear after the nuke has gone off surrounding the location of the nuke with some funky visual effects, blood loss and Geiger counter sounds  

 

Option to set skins that block the effects of blood loss in that zone. 

 

I have only marker and radiation, dont have sound siurens or explosions.

Link to comment
Share on other sites

  • 2 weeks later...

I have air raids on my sever therefore I already had the sounds in my description.ext:

//sounds
class CfgSounds
{
  sounds[]={nam,eve,puk,dbanjo,siren,hillbilly,ammprss,ebs,vend,z_wzombie1,z_wzombie2,horde_sound_turning_page,horde_sound_close_book};
class nam
{
    name = "Siren1";
    sound[] = {\sound\SirenLoopMono.ogg, db-6, 1.0};
    titles[] = {""};
	};
class eve
{
    name = "Siren2";
    sound[] = {\sound\Sirens.ogg, db-6, 1.0};
    titles[] = {""};
	};
class puk
{
    name = "Siren3";
    sound[] = {\sound\Sirens2.ogg, db-6, 1.0};
    titles[] = {""};
	};
class dbanjo
{
    name="dbanjo";
    sound[]={\sound\dbanjo.ogg, 1.0, 1.0};
    titles[] = {};
	};
class siren
{
	name = "siren";
	sound[] = {\sound\siren.ogg,0.5,1};
	titles[] = {};
    };
class hillbilly
{
    name="hillbilly";
    sound[]={\debug\hillbilly.ogg, 1.0, 1.0};
    titles[] = {};
	};
class ammprss
{
    name="ammprss";
    sound[]={\sound\engine_12s.ogg, 1.0, 1.0};
    titles[] = {};
	};
class ebs
{
    name="ebs";
    sound[]={\sound\EBSradio.ogg, 1.0, 1.0};
    titles[] = {};
	};
class vend
{
    name="vend";
    sound[]={\sound\vendingmachine.ogg, 1.0, 1.0};
    titles[] = {};
	};
class z_wzombie1 
{
	name = "";
	sound[] = {"fixes\walkamongstthedead\dayz_sfx\femalezombie_attack_04.ogg",0.3,1,40};
	titles[] = {0, ""};
	};
class z_wzombie2 : z_wzombie1 
{
	sound[] = {"fixes\walkamongstthedead\dayz_sfx\femalezombie_spotted_01.ogg",0.3,1,40};
	};
class Vas_yessir;
class horde_sound_turning_page: Vas_yessir
{
	name = "horde_sound_turning_page";
	sound[] = {\sound\page.wss, 0.5, 1.0};
	titles[] = {};
	};
class horde_sound_close_book: Vas_yessir
{
	name = "horde_sound_close_book";
	sound[] = {\sound\close.wss, 1.0, 1.0};
	titles[] = {};
	};
#include "AEG\Sounds\AEG_Sounds.hpp" //AEG
};

Study this to learn how to add the sounds to the code. The class must be listed at the top and correspond in position lower down in the code too. In this case the nuke sounds are called nam, eve, puk and siren.

Link to comment
Share on other sites

  • 3 weeks later...

How would I make this an event ??

really what im trying to do is add right click on Moscow_Bombing_File  No laptop needed

right click Moscow_Bombing_File loads nuke_on.sqf 

I get the coundown but nothing happens (at least Im not sure where it would happen)

I tried adding this to the

nuke_on.sqf 

 cutText ["Launching nuke attack....","PLAIN DOWN"];
    sleep 3;
execVM "Nuke\server_Nuke.sqf";
    player removeWeapon "Moscow_Bombing_File";
};

is this where the nuke should detonate ??

   
 //Locations here X,Y,Z and add a name of the location for the messages
    case 0: {[9835.9, 9920.85, 0, "Bruderholz"]};
Link to comment
Share on other sites

Using version 6, no rad sounds when in rad zone, not taking damage when in rad zone, nuclear status after explosion listed Vyshnoye as city that was hit when it was Pusta. Only error I am getting: (I modified delay and set radzone at 800 instead of 1000)

 

19:36:45 Error in expression <eports of a nuclear detonation at "+str TTName+". Radiation zone will be marked >
19:36:45   Error position: <TTName+". Radiation zone will be marked >
19:36:45   Error Undefined variable in expression: ttname
19:36:45 File mpmissions\__cur_mp.chernarus\Nuke\Settings.sqf, line 89

 

I corrected this issue on my main server (was using my test server) by adding in my own text and taking out the text that would reference the nuked city.

 

Also, I've seen nukes detonated by hackers on other servers and when they did the skies usually went overcast and dark, kinda like a nuclear winter, and the ash was heavy, is that suppose to happen with this nuke as well because if so I'm not seeing that, I see the ash for awhile but that's it. Is there any way to set it where the nuke kills roaming AI (not zeds) in the blast radius?

Link to comment
Share on other sites

  • 1 month later...
  • 10 months later...

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...