Jump to content

4 types of Side Missions (Events)


Aidem

Recommended Posts

Thank you very much. Missions now spawn but the crates are missing or with no loot, just have to figure out what happened and tweak things a little bit.

 

Thanks :D

 

 

-- Edit --

 

 

One last thing, is it possible to make the Hint box appear in the top middle of the screen?

Link to comment
Share on other sites

Hello i've seen this working on other server great job, I followed every step and installed remote messages but my mission file seems to freeze at the loading screen.

If you could you help me please.

 

No syntax errors and the only other thing installed on my server is infistar antihack.

Link to comment
Share on other sites

Hmm not sure what I've broken but seems that even if the event doesnt start, it won't start a new event as it thinks the event has started. What could be the cause here?

 

This is what I get:

 

21:06:09 "RUNNING EVENT: A on [2013,11,26,10,6]"
21:07:09 "RUNNING EVENT: B on [2013,11,26,10,7]"
21:07:09 "Event already running"
21:08:00 "DEBUG FPS  : 50.3145"
21:08:09 "RUNNING EVENT: C on [2013,11,26,10,8]"
21:08:09 "Event already running"
21:09:09 "RUNNING EVENT: D on [2013,11,26,10,9]"
21:09:09 "Event already running"
 
Event names are different but made it easier to see with letters and made them a minute apart to show the issue.
Link to comment
Share on other sites

 

Hmm not sure what I've broken but seems that even if the event doesnt start, it won't start a new event as it thinks the event has started. What could be the cause here?

 

This is what I get:

 

21:06:09 "RUNNING EVENT: A on [2013,11,26,10,6]"
21:07:09 "RUNNING EVENT: B on [2013,11,26,10,7]"
21:07:09 "Event already running"
21:08:00 "DEBUG FPS  : 50.3145"
21:08:09 "RUNNING EVENT: C on [2013,11,26,10,8]"
21:08:09 "Event already running"
21:09:09 "RUNNING EVENT: D on [2013,11,26,10,9]"
21:09:09 "Event already running"
 
Event names are different but made it easier to see with letters and made them a minute apart to show the issue.

 

 

EPOCH_EVENT_RUNNING = false;

as last line of ur script.

 

this line is also missing from the examples on this forum i think

 

i have this stuff in my event file:

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

// Check for another event running
if (EPOCH_EVENT_RUNNING) exitWith {
    diag_log("Event already running");
};
EPOCH_EVENT_RUNNING = true;

// Random chance of event happening
_spawnRoll = random 1;
if (_spawnRoll > _spawnChance and !_debug) exitWith { 
    diag_log("Event stopped by random chance");
    EPOCH_EVENT_RUNNING = false;
};
Link to comment
Share on other sites

I'm using macas version but his "EPOCH_EVENT_RUNNING = true;" was in the wrong place, so with some help of a private conversation (dont want to mention who, they can feel free to chime in if they want to be bombarded with requests ;)) they very quickly worked this out.

_loot = _loot_lists call BIS_fnc_selectRandom;

_loot_amountw = 3;
_loot_amount = 10;
_wait_time = 1800;

// Dont mess with theses unless u know what yours doing
_start_time = time;
_spawnRadius = 5500;
_spawnMarker = 'center';

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

// Check for another event running
if (EPOCH_EVENT_RUNNING) exitWith {
	diag_log("Event already running");
};

// Random chance of event happening
_spawnRoll = random 1;
if (_spawnRoll > _spawnChance and !_debug) exitWith {diag_log("Event chance failed. Waiting for next event..")};

EPOCH_EVENT_RUNNING = true;

// Random location
_position = [getMarkerPos _spawnMarker,0,_spawnRadius,10,0,2000,0] call BIS_fnc_findSafePos;

diag_log(format["Spawning loot event at %1", _position]);

It needs to below "// Random chance of event happening" as you see above and it works.

 

I also added in "Event chance failed. Waiting for next event" in the case of a failure on an event.. for searching in the RPT.

 

This means that it will try spawn an event using your % chance at the top of the file, if it fails it will wait till the next time an event is called and call that. This prevents 4 missions being up at once.

 

Alternatively, you can edit "EPOCH_EVENT_RUNNING"  to "EPOCH_EVENT_RUNNING2" in two mission files and they will run on the same premise.. meaning you can split certain missions apart, for example you could have a crappy mission running and a high value one. "EPOCH_EVENT_RUNNING" doesnt have to be named that, you can change the name to anything but you must replace it throughout the file. Easy with the replace function of Notepad++

 

Note: I am using maca's version.

 

Link to comment
Share on other sites

HI,

 

It seems this code block handles the messaging to users. This code sends hints how to modify it to send to global, side or in the center of the screen like when you eat or drink?

 

Thank you in advance.

// Send message to users 
_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";

diag_log(format["Loot event setup, waiting for %1 seconds", _wait_time]);

Link to comment
Share on other sites

Here is what you can replace to get it to show in the middle of the screen:

[nil,nil,rTitleText,"Bandits or Pirates? We found their treasure, Check your Map for the Location!", "PLAIN",10] call RE;

Simply replace the following code with the above code:

_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";
Link to comment
Share on other sites

 

Here is what you can replace to get it to show in the middle of the screen:

[nil,nil,rTitleText,"Bandits or Pirates? We found their treasure, Check your Map for the Location!", "PLAIN",10] call RE;

Simply replace the following code with the above code:

_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";

 

 

Thank you Sir I will try that now

 

 

EDIT: This works perfectly, thank you.

Link to comment
Share on other sites

Hi Aidem,

 

first of all thanks for sharing your events!

 

I'm having trouble on getting those running: it seems that the server don't find the files (created manually).

 

I double checked everything and I'm not sure why I got always the error that the file is not found. Example with military one:

 

"RUNNING EVENT: military on [2013,11,20,19,10]"

Warning Message: Script z\addons\dayz_server\modules\military.sqf not found

 

Believe me when I say that the file really exists in that folder (along with crash_spawner, hello_world etc) and I checked 10 times that the name doesn't contain any space/symbol or anything else. The strange thing is that the other events are working properly (like crash_spawner).

 

Triple checked the PBO file and contains the files...

 

I'm really frustrated... Any idea?

 

Thanks!

Did you remember to repack your server pbo?

Link to comment
Share on other sites

So instead of having this happen randomly, I wanted to have this happen on command of an admin. I added this to the admin tool action menu, and it seems to work. All I did was add it to the toolbar and within the spawn chance I changed it to a 1.00. I am having issues finding the box however (I am using the treasure.sqf). I got kicked at first for trying to add the box however I fixed that so I know that the script is at least trying to add the box. If these scripts are not run by the server do they still send messages to the server.rpt? I am not seeing any of the spawning messages from this script in there.

Link to comment
Share on other sites

So instead of having this happen randomly, I wanted to have this happen on command of an admin. I added this to the admin tool action menu, and it seems to work. All I did was add it to the toolbar and within the spawn chance I changed it to a 1.00. I am having issues finding the box however (I am using the treasure.sqf). I got kicked at first for trying to add the box however I fixed that so I know that the script is at least trying to add the box. If these scripts are not run by the server do they still send messages to the server.rpt? I am not seeing any of the spawning messages from this script in there.

Well you could try this, I don't know if it will work. Install Blue Phoenix Admin Tools to your server (GitHub: https://github.com/BluePhoenix175/DayZ-Admin-Tools-) Modify AdminToolsMain.sqf, and add the scripts into your "admintools" folder.

Link to comment
Share on other sites

Please,MAKE A TUTORIAL HOW TO INSTALLED

Well it's not hard at all. Just drag the files to your server pbo into the modules folder. And add this into your init.sqf under Epoch Events:

 ["any","any","any","any",10,"Military"],["any","any","any","any",25,"Treasure"],["any","any","any","any",40,"Supplyitems"],["any","any","any","any",55,"Construction"]

 So that it looks 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",10,"Military"],["any","any","any","any",25,"Treasure"],["any","any","any","any",40,"Supplyitems"],["any","any","any","any",55,"Construction"]];
Link to comment
Share on other sites

i dont get random loot in the events. my treasure even only gives 2 .45 clips a gold .45 gun and a copper bar, construction only gives 14 floor and 13 metal floor and 2 m9sd, and one of the other 2 gives a redbull and an m9sd. and this is everytime the events happen same loot and same amounts of loot. my players love them but we all wonder why its the same thing everytime. any help would be great

Link to comment
Share on other sites

i actually looked closer at the events both in game and at the sqf files in my pbo. i started noticing small variations of the loot as i have not changed the script copied from the first post and found that there are several selections with almost exactly the same thing in them.  they are all cycling i just didnt get a chance to look close enought to see it.  but we love the events now for me to make them sweeter for my players lol. thanks much

Link to comment
Share on other sites

Yes these small simular loot crates are the shitty ones, sometimes you get good loot sometimes bad, if you want more good loot just remove some of the lines with bad loot

As for tutorial what varmonger said is correct its just as simple as copy these files and edit the lines

4 Events working in dayzEpoch panthera ??

About map compatibity as far as i know and tested they work on most maps as it doesnt have preset locations the script itself looks for a safe open area on the map
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...