Jump to content

4 types of Side Missions (Events)


Aidem

Recommended Posts

Yes i have created a folder called custom inside my init.sqf folder and placed the remote_messages.sqf file inside

 

and then added this to my init.sqf

if (!isDedicated) then {
    //Conduct map operations
    0 fadeSound 0;
    waitUntil {!isNil "dayz_loadScreenMsg"};
    dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
    _nil = [] execVM "custom\remote_messages.sqf";
    
    //Run the player monitor
    _id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
    _playerMonitor =     [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";    
    
    // Epoch Admin Tools
    [] execVM "admintools\AdminList.sqf";
    if ( !((getPlayerUID player) in AdminList) && !((getPlayerUID player) in ModList) && !((getPlayerUID player) in tempList)) then
    {
            [] execVM "\z\addons\dayz_code\system\antihack.sqf";
    };

    //Lights
    //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
};
Link to comment
Share on other sites

Hi Guys,

 

Having a small problem getting this working on my server,

 

I can see in the logs the following

23:15:02 "RUNNING EVENT: supply_drop on [2014,4,27,23,15]"23:15:02 "RUNNING EVENT: supply_drop on [2014,4,27,23,15]"

However The loot circles on the map do not appear to be appearing,

 

I can see no other errors in my logs etc, was hoping someone could point me in the right direction as this is my first time setting up these events?

 

Thanks in advance

 

The markers, when created by the server, will only appear for players currently on the server, any new players joining won't see them.

Link to comment
Share on other sites

i have put in the files and code from page 1 of this forum post.

 

the mission spawns, but there is no AI, no vehicles or crates. plus there is no centre maker for the mission.

 

the coloured radius circle and text appear but nothing else.

 

what havent i done right?

EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"],["any","any","any","any",10,"Military"], ["any","any","any","any",25,"Treasure"], ["any","any","any","any",40,"Supplyitems"], ["any","any","any","any",55,"Construction"]];

i have put this where it is supposed to go

 

i have also edited the mission files (ie construction, tresure etc) with the // that were needed.

 

do i need to have another AI installed or will this pack do it all?

Link to comment
Share on other sites

Hey if someone could help me i have this installed and it seems like its working.

 

18:40:01 "RUNNING EVENT: Supplyitems on [2014,5,13,2,40]"
18:40:01 "Spawning loot event at [6382.59,8103.13]"
18:40:01 "Creating ammo box at [6289.8,8282.54]"
18:40:01 "Loot event setup, waiting for 900 seconds"

 

but when i go to the map marker i cannot find any loot.

Link to comment
Share on other sites

Hey are there AI as in like AI players at these missions?

Not with this particular addon no, if you want something like that look into WAI. On my server I run these side by side so there is a variety of missions.

 

Hey if someone could help me i have this installed and it seems like its working.

 

18:40:01 "RUNNING EVENT: Supplyitems on [2014,5,13,2,40]"

18:40:01 "Spawning loot event at [6382.59,8103.13]"

18:40:01 "Creating ammo box at [6289.8,8282.54]"

18:40:01 "Loot event setup, waiting for 900 seconds"

 

but when i go to the map marker i cannot find any loot.

The loot can be anywhere in the highlighted radius.

If you open up the file. for example Construction.sqf on line 5 it shows this.

_debug = false; // Puts a marker exactly were the loot spawns

Change the false to true and then go to where the dot is on the map. (Requires a server restart upon altering code)

Link to comment
Share on other sites

Hello!

I need some help.

I get the marker on the map and the massage to players but not the crate with the loot "Construction Supplies".

 

 

This is my "Construction_supplies.sqf"

if (isNil "DZE_Event_Construction") then {DZE_Event_Construction = false;};

if (DZE_Event_Construction) exitWith {};//Only exit if this particular mission is already running - Allows other Epoch Events to run even if this event is still running.
DZE_Event_Construction = true;//This must be changed for other mission types to allow different missions to run alongside each other.
private ["_spawnChance", "_spawnMarker", "_spawnRadius", "_markerRadius", "_markercolor", "_markershape", "_refreshmarker", "_missiontype", "_debug", "_start_time", "_loot", "_loot_box", "_spawnRoll", "_position", "_loot_pos", "_debug_marker","_loot_box", "_event_name","_debug_event_name"];
private["_clutter","_loot_lists"];
_spawnChance =  100; // Percentage chance of event happening
_markerRadius = 350; // Radius the loot can spawn and used for the marker
_debug = false; // If true puts a marker exactly were the loot spawns and always spawns loot (no random chance)
 
if(!_debug)then{//Ignore chance when debugging (Always runs)
// Random chance of event happening
_spawnRoll = random 100;//Probably not necessary to use 100 - Is what I am used to  :)
if (_spawnRoll < _spawnChance) exitWith {};
};
 
_loot_lists = [
[
["M9SD"],
["15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","ItemWoodStairs","ItemWoodStairs","ItemWoodStairs","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks"]
],
[
["M9SD"],
["15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","ItemWoodStairs","ItemWoodStairs","ItemWoodStairs","ItemWoodStairs","PartPlankPack","PartPlywoodPack","PartPlankPack","PartPlywoodPack","PartPlankPack","PartPlywoodPack","PartPlankPack","PartPlywoodPack","PartPlankPack","PartPlywoodPack","PartPlankPack","PartPlywoodPack","PartPlankPack","PartPlywoodPack","PartPlankPack","PartPlywoodPack","PartPlankPack","PartPlywoodPack","PartPlankPack","PartPlywoodPack","PartPlankPack","PartPlywoodPack","PartPlankPack","PartPlywoodPack","PartPlankPack","PartPlywoodPack","PartPlankPack","PartPlywoodPack","PartPlankPack","PartPlywoodPack","PartPlankPack","PartPlywoodPack","PartPlankPack","PartPlywoodPack","PartPlankPack","PartPlywoodPack","PartPlankPack","PartPlywoodPack","PartPlankPack","PartPlywoodPack","PartPlankPack","PartPlywoodPack"]
],
[
["M9SD"],
["15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor"]
],
[
["M9SD"],
["15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor"]
],
[
["M9SD"],
["15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","outhouse_kit","outhouse_kit","cinder_wall_kit","cinder_wall_kit","cinder_wall_kit","cinder_wall_kit","cinder_wall_kit","cinder_wall_kit","cinder_wall_kit","cinder_wall_kit","cinder_wall_kit","cinder_wall_kit","cinder_wall_kit","cinder_wall_kit","cinder_wall_kit","cinder_wall_kit","cinder_wall_kit","cinder_wall_kit","cinder_wall_kit","cinder_wall_kit","cinder_wall_kit","cinder_wall_kit","cinder_wall_kit","cinder_wall_kit"]
],
[
["M9SD"],
["15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","outhouse_kit","outhouse_kit","ItemWoodStairs","ItemWoodStairs","ItemWoodStairs","ItemWoodStairs","workbench_kit","ItemComboLock","ItemComboLock","ItemWoodWallLg","ItemWoodWallGarageDoor","ItemWoodWallWindowLg","ItemWoodWallLg","ItemWoodWallLg","ItemWoodWallLg"]
],
[
["M9SD"],
["15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","ItemWoodStairs","ItemWoodStairs","ItemWoodStairs","ItemWoodStairs","workbench_kit","ItemComboLock","ItemComboLock","ItemWoodWallLg","ItemWoodWallGarageDoor","ItemWoodWallWindowLg","ItemWoodWallLg","ItemWoodWallLg","ItemWoodWallLg"]
],
[
["M9SD"],
["15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","PartGeneric","metal_floor_kit","PartGeneric","metal_floor_kit","PartGeneric","metal_floor_kit","PartGeneric","metal_floor_kit","PartGeneric","metal_floor_kit","PartGeneric","metal_floor_kit","PartGeneric","metal_floor_kit","PartGeneric","metal_floor_kit","PartGeneric","metal_floor_kit","PartGeneric","metal_floor_kit","PartGeneric","metal_floor_kit","Itemvault"]
],
[
["M9SD"],
["15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","ItemWoodWallGarageDoor","ItemWoodWallWindowLg","ItemWoodWallLg","ItemWoodWallLg","ItemWoodWallLg","ItemWoodWallGarageDoor","ItemWoodWallWindowLg","ItemWoodWallLg","ItemWoodWallLg","ItemWoodWallLg","ItemWoodWallGarageDoor","ItemWoodWallWindowLg","ItemWoodWallLg","ItemWoodWallLg","ItemWoodWallLg","ItemWoodWallGarageDoor","ItemWoodWallWindowLg"]
],
[
["M9SD"],
["15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","workbench_kit","Itemvault","cinder_wall_kit","ItemComboLock","ItemComboLock","cinder_garage_kit","cinder_garage_kit","cinder_door_kit","cinder_door_kit","cinder_wall_kit","cinder_wall_kit","cinder_wall_kit","cinder_wall_kit","cinder_wall_kit","cinder_wall_kit"]
],
[
["M9SD"],
["15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","workbench_kit","ItemWoodStairs","ItemWoodStairs","ItemWoodStairs","wood_shack_kit","wood_shack_kit","wood_shack_kit","deer_stand_kit","deer_stand_kit","ItemWoodLadder","ItemWoodLadder","desert_net_kit","desert_net_kit","ItemWoodLadder","ItemWoodLadder","desert_net_kit","forest_net_kit","forest_net_kit","forest_net_kit","desert_net_kit","desert_net_kit","ItemSandbagLarge","ItemSandbagLarge","Itemvault","Itemvault"]
]
];
_loot = _loot_lists call BIS_fnc_selectRandom;
 
// Dont mess with theses unless u know what yours doing
_start_time = time;
_spawnRadius = 5000;
_spawnMarker = 'center';//Good idea !
 
// Random location
_positionarray = [[17380.426,5279.2412,0],[8467.2363,7764.6978,0],[15444.671,8667.6758,0],[8463.8125,5510.5239,0],[16104.994,15535.804,0],[7729.2627,7001.7979,0],[15078.381,15698.128,0],[5759.5493,9423.253,0],[13809.14,19294.951,0],[6098.1333,8610.5947,0],[10285.479,19396.813,0],[4265.5854,7978.0996,0],[8594.7168,19659.965,0],[2260.0608,6925.2681,0],[12143.011,14925.385,0],[12676.353,12593.693,0],[14468.995,10629.646,0],[8412.1973,3045.4038,0],[10173.31,5819.1787,0],[9473.5557,2013.2627,0],[9421.4414,5169.317,0],[9845.7949,3310.0532,0],[10864.61,620.55743,0]];
_position = _positionarray call BIS_fnc_selectRandom;
 
//diag_log(format["Spawning loot event at %1", _position]);
 
 /*
 _markerName =  format ["loot_event_marker_%1", _start_time];//To delete this later you must use the name, not the object..
createMarker [_markerName, _position];
_markerName setMarkerShape "ELLIPSE";
_markerName setMarkerColor "ColorGreen";
_markerName setMarkerAlpha 0.5;
_markerName setMarkerSize [(_markerRadius + 50), (_markerRadius + 50)];
_markerName setMarkerText "Building Supplies";//Text too small to be seen. Useful as setMarkerText forces marker to be global if mission is ever run from a client (HC)
 */
 
_markerRadius = 100;
_markershape = "ELLIPSE";
_markercolor = "ColorGreen";
_missiontype = 0; //0=EPOCH_EVENT_RUNNING 1=SPECIAL_EVENT_RUNNING
_refreshmarker = [_position,_markerRadius,_markershape,_markercolor,_missiontype] execVM "\z\addons\dayz_server\modules\refreshmarker_construction.sqf";
 
_loot_pos = [_position,0,(_markerRadius - 100),10,0,2000,0] call BIS_fnc_findSafePos;
 
if (_debug) then {
_debug_event_name = format ["loot_event_debug_marker_%1", _start_time];
createMarker [_debug_event_name , _loot_pos];
_debug_event_name setMarkerShape "ICON";
_debug_event_name setMarkerType "mil_dot";
_debug_event_name setMarkerColor "ColorBlack";//Allows text / dot to be seen.
_debug_event_name setMarkerAlpha 1;
_debug_event_name setMarkerText "Building Supplies";
};
 
//diag_log(format["Creating ammo box at %1", _loot_pos]);
 
// Create ammo box
_loot_box = createVehicle ["USVehicleBox",_loot_pos,[], 0, "NONE"];
_loot_box setVariable ["permaLoot",true];//Required to remove from Epoch loot cleaning process.
clearMagazineCargoGlobal _loot_box;
clearWeaponCargoGlobal _loot_box;
 
// Cut the grass around the loot position
_clutter = createVehicle ["ClutterCutter_small_2_EP1", _loot_pos, [], 0, "CAN_COLLIDE"];
_clutter setPos _loot_pos;
// cut the grass    end
 
// Add loot
{
_loot_box addWeaponCargoGlobal [_x,1];
} forEach (_loot select 0);
{
_loot_box addMagazineCargoGlobal [_x,1];
} forEach (_loot select 1);
 
// Send center message to users 
 
[nil,nil,"per",rTITLETEXT,"A construction supply truck lost its Cargo. \nCheck your Map for the Location !","PLAIN DOWN"] call RE;
 
diag_log "LOOT:Construction Supply Event Setup, waiting for completion.";
 
private["_eventOn","_nrObjs"];//Additional - Message players when mission complete.
_eventOn = true;
_nrObjs = [];
while {_eventOn}do{
_nrObjs = nearestObjects [_loot_box, ["All"], 7];
if(count _nrObjs >0)then{
{
if(isPlayer _x)then{
[nil,nil,"per",rTITLETEXT,format["The construction supply truck cargo has been found by %1.",name _x],"PLAIN DOWN"] call RE;
_eventOn = false;
//diag_log format["LOOT:Event complete. Found by %1", name _x];
};
}forEach _nrObjs;
};
sleep 12;
};
 
// Clean up
DZE_Event_Construction = false;
deleteMarker _event_marker;
sleep 300;
deleteVehicle _loot_box;
deleteVehicle _clutter;
if (_debug) then {
deleteMarker _debug_event_name;
};

 

 

this is what i get in the log file

 

15:14:36 "RUNNING EVENT: construction_supplies on [2014,5,25,12,10]"

15:14:36 "LOOT:Construction Supply Event Setup, waiting for completion."
Link to comment
Share on other sites

I'm running Takistan map. I would like for these side missions to only spawn in towns. Is there a way to set static spawn points with a 400m radius spawn area?

 

P.S. Really nice work on the side missions.

Link to comment
Share on other sites

I got 3 more examples of pretty much the same, easier to edit and probably 1/3rd the size of that file:

 

building_supplies.sqf:

http://pastebin.com/ptMCaTPx

 

medical_supplies.sqf:

http://pastebin.com/hawP3V6y

 

military_supplies.sqf:

http://pastebin.com/3j1WnTvt

 

May it help figuring out how to randomize loot.

Please Note: these supplies might have loot in it (especially the military one) that you might want to remove.

 

How to install? It's simple,

 

1. You pick one of the scripts in this topic.

2. You save the file as _FILENAMEHERE_.sqf

3. Place this _FILENAMEHERE_.sqf inside the modules folder in the dayz_server.dbo file

4. Open your MPMission / init.sqf and edit the following line:

EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]];

5. Add a new block with your scriptname like this:

EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"],["any","any","any","any",45,"_FILENAMEHERE_"]];

Make sure you dont add .sqf to that filename there. This will spawn the event every 15 mins before a full hour (real time, not ingame time).

 

Hopefully that solves all the questions posed in this topic :)

 

Well, i use your building supplies event, and it`s great. But two things i have to ask for. It`s really easy to find the box. is the grass around the box cutted? can i change that, how? and, how can i define the random spawnlocation? i mean, it`s everytime west /southwest. how can i fix that? would like to see them spawning all over the map, but not in water ;-)

 

thx, ed

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
×
×
  • Create New...