Jump to content

4 types of Side Missions (Events)


Aidem

Recommended Posts

Can't get it to work, with or without call RE; - even if I have a radio I don't receive the message. :(

 

I don't know how to make it on announce pickup, I tried but failed. 

 

You can always check the radio script I made. It may be similar to what you want.

It gives people who have a radio a scroll wheel option to "use" it and when they use it everyone gets a message telling them a vehicle mission spawned.

(CALL Re is what makes everyone see the message afaik)

 

Link to comment
Share on other sites

I don't know how to make it on announce pickup, I tried but failed. 

 

You can always check the radio script I made. It may be similar to what you want.

It gives people who have a radio a scroll wheel option to "use" it and when they use it everyone gets a message telling them a vehicle mission spawned.

(CALL Re is what makes everyone see the message afaik)

 

 

Could this (from my RPT) be of any use?

 

15:08:45 Error in expression <];};
 
if (_localExec) then 
{
if (local _targetObject) then 
{
if (count _field >
15:08:45   Error position: <_targetObject) then 
{
if (count _field >
15:08:45   Error Undefined variable in expression: _targetobject
 
 
I was specifically looking at: "];};" - which is a part of the code here.
 
 
Your script is nice, but I don't want players to spawn missions with their radio, or that all players receive a message. I want them to hear the announcement in text IF and only if they have a radio.
Link to comment
Share on other sites

Perhaps the mistake is with:

 

[nil, nil,"loc",rSPAWN, "if('itemRadio' in (items player)) then {titleText ['Radio: We have marked your map with the information of a Construction drop. Be advised, all GPS are updated. Over and out.', 'PLAIN',10];};"] call RE;

 

loc makes it local?

Link to comment
Share on other sites

I have been troubleshooting this all day, and just can't get rspawn to work, at all...

 

Neither of these lines of code throw out any text to the player(s):

 

[nil, nil, rSPAWN, "Some text", { hintSilent _this; }] call RE; 

[nil, nil, rSPAWN, "if(true) then { hint 'asd';};", { call _this; }] call RE;

[nil, nil,rSPAWN, {if('ItemRadio' in (items player)) then {titleText ['Radio: Intel suggests the mayor of Chernogorsk has retreated to his mansion with a task force, guarding his supplies. Forwarding location.', 'PLAIN',10];};}] call RE;

[nil, nil,rSPAWN, "if(true) then {titleText ['Radio: Intel suggests the mayor of Chernogorsk has retreated to his mansion with a task force, guarding his supplies. Forwarding location.', 'PLAIN',10];};"] call RE;

 

It seems as if either rSPAWN doesn't work AT ALL with Epoch, or that I'm botching the syntax for it alltogether (no errors in any RPT tho)

Link to comment
Share on other sites

I also solved it, incase you're interested.

_mradio = (magazines player) + (weapons player); 
if ("ItemRadio" in _mradio) then {
        hasRadio = true;
    } 
   else 
   { 
      hasRadio = false;
   };
    if(hasRadio) then { // wont need && _canDo
       cutText [format["Radio discovered, check map for intel!"], "PLAIN DOWN"];
	 // [] execVM "radio\radio_mission.sqf"; if you want to, for example execute a mission file.
	  player removeWeapon "ItemRadio"; //removes the radio
};

Put this in your fn_selfactions.

Link to comment
Share on other sites

My Server gets stuck on Waiting for Server to Start Authentication? Any help? 

 

**EDIT FIXED** All working fine. 

 Just wondering how you fixed this?

 

My server gets stuck at the same point. I have followed the instructions to the letter so I'm not sure why this isn't working.  :(

 

edit: turns out to be a corrupt pbo. all working fine 

 

thanks for the missions  :)

Link to comment
Share on other sites

Hi there, I can't seem to get this to work, I was wondering if someone could spot where i am going wrong! So whats happening is when i spawn it nothing happens.

 

 

 

**Update**

Getting this in my RTP, even tho the files are there and they are in the dayz_server.pbo

 8:40:05 "RUNNING EVENT: Supplyitems on [2014,4,25,13,40]"
 8:40:05 Warning Message: Script z\addons\dayz_server\modules\Supplyitems.sqf not found

I edited the "EpochEvents" in my init.sqf

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

I then added Military.sqf, Treasure.sqf, Supplyitems.sqf, Construction.sqf to my dayz_server.pbo in the modules folder (@DayZ_Epoch_Server\addons\dayz_server\modules)
 the folder contains

Construction.sqf
crash_spawner.sqf
drop_bombs.sqf
hello_world.sqf
Military.sqf
supply_drop.sqf
Supplyitems.sqf
Treasure.sqf

and then in Military.sqf, Treasure.sqf, Supplyitems.sqf, Construction.sqf i deleted

// Send Top Right message to users , requires Remote message script
_hint = parseText format["<t align='center' color='#FFFF66' shadow='2' size='1.75'>Treasure Crate</t><br/><t align='center' color='#ffffff'>Bandits or Pirates? We found their treasure, Check your Map for the Location!</t>"];
customRemoteMessage = ['hint', _hint];
publicVariable "customRemoteMessage";

and replaced them all with

// in treasure.sqf on line 122
[nil,nil,rTitleText,"UN Agency drops life-saving supplies for Survivors, Check your Map for the Location!", "PLAIN",10] call RE;

// in Construction.sqf on line 118
[nil,nil,rTitleText,"Ikea Truck lost its Cargo, Check your Map for the Location!", "PLAIN",10] call RE;

// in Supplyitems.sqf on line 126
[nil,nil,rTitleText,"UN Agency drops life-saving supplies for Survivors, Check your Map for the Location!", "PLAIN",10] call RE;

// in Military.sqf on line 126
[nil,nil,rTitleText,"A special forces unit lost a precious cargo, Check your Map for the Location!", "PLAIN",10] call RE;

Then i made a custom folder in my mission folder (MPMissions\DayZ_Epoch_24.Napf\custom) and added the "remote_messages.sqf" and then went into my "init.sqf" and added

_nil = [] execVM "custom\remote_messages.sqf";

So it looks like this

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";	
	
	
	//anti Hack
	[] 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";
};

Then i opened my "server_playerDied.sqf" (@DayZ_Epoch_Server\addons\dayz_server\compile)  replacing this

	if(DZE_DeathMsgGlobal) then {
		[nil, nil, rspawn, [_killer, _message], { (_this select 0) globalChat (_this select 1) }] call RE;
	}

With this line of code

if(DZE_DeathMsgGlobal) then {
   customRemoteMessage = ['globalChat', _message, _killer];
   publicVariable "customRemoteMessage";
};

Treasure.sqf
http://pastebin.com/xy5wb7Yj

Construction.sqf
http://pastebin.com/gnzqtmf5

Military.sqf
http://pastebin.com/0vK0HGsS

Supplyitems.sqf
http://pastebin.com/EUbjBhsw

init.sqf
http://pastebin.com/Wr5R6tBw

server_playerDied.sqf
http://pastebin.com/EnCSZ1bz

remote_messages.sqf
http://pastebin.com/QqAPRgTB

Link to comment
Share on other sites

Do you know what Battleye filters I need to use to run these mission/Events on my server.. When I put them in my server Battleye will not let anyone in the server, kicking everyone for a CreateVehicle Restriction #2  or PublicVariable Restriction #0, so I had to remove them from my server.. Please help with this.. Thanks.. 

 
Link to comment
Share on other sites

Anyone?

 

I keep getting theses

Warning Message: Script z\addons\dayz_server\modules\Construction.sqf not found
Warning Message: Script z\addons\dayz_server\modules\Military.sqf not found
Warning Message: Script z\addons\dayz_server\modules\Supplyitems.sqf not found
Warning Message: Script z\addons\dayz_server\modules\Treasure.sqf not found

I have tried renaming, recreating and even went as far as using other sqf files renaming them and add the code, all with the same outcome :(

Link to comment
Share on other sites

Anyone?

 

I keep getting theses

Warning Message: Script z\addons\dayz_server\modules\Construction.sqf not found
Warning Message: Script z\addons\dayz_server\modules\Military.sqf not found
Warning Message: Script z\addons\dayz_server\modules\Supplyitems.sqf not found
Warning Message: Script z\addons\dayz_server\modules\Treasure.sqf not found

I have tried renaming, recreating and even went as far as using other sqf files renaming them and add the code, all with the same outcome :(

 

Most likely you packaged your pbo wrong.

Link to comment
Share on other sites

Kind of a dick thing to say.... i know sqf.. but I asked a simple question and you went all asshole mode.

 

If you know SQF, why do you ask?

These scripts are not coded to run several instances at once, you need to modify the code to do it.

And HOW is a matter of SQF-knowledge. 

 

"dick move", LOL, people are so oversensitive these days.

Link to comment
Share on other sites

Just to throw this in there :) Helped with a few tweaks when Adiem first released this, is a few months old now and I haven't tested on latest Epoch release, is basic stuff so should work just fine.

 

This is the construction mission, to copy script for other missions all that needs changing for other missions are:

 

  • DZE_Event_Construction - Change all instances of this in this file to something unique to the new mission, e.g. DZE_Event_Military
  • _loot_lists - Create relevant loot lists for the new mission
  •  rTITLETEXT - Change the text to describe the new mission
  • setMarkerColor - Change the marker colour for other missions

​Enjoy:

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", "_debug", "_start_time", "_loot", "_loot_box", "_spawnRoll", "_position", "_loot_pos", "_debug_marker","_loot_box", "_markerName","_debugMarkerName"];
private["_clutter","_loot_lists"];
_spawnChance =  75; // 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
_position = [getMarkerPos _spawnMarker,0,_spawnRadius,10,0,2000,0] call BIS_fnc_findSafePos;
 
//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)
 
_loot_pos = [_position,0,(_markerRadius - 100),10,0,2000,0] call BIS_fnc_findSafePos;
 
if (_debug) then {
_debugMarkerName = format ["loot_event_debug_marker_%1", _start_time];
createMarker [_debugMarkerName , _loot_pos];
_debugMarkerName setMarkerShape "ICON";
_debugMarkerName setMarkerType "mil_dot";
_debugMarkerName setMarkerColor "ColorBlack";//Allows text / dot to be seen.
_debugMarkerName setMarkerAlpha 1;
_debugMarkerName 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 building supply truck, destined for Cap Golova, lost its Cargo.\nCheck your Map for the Location !","PLAIN DOWN"] call RE;

diag_log "LOOT:Building 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 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 _markerName;
if (_debug) then {
deleteMarker _debugMarkerName;
};
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

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