DayZ Chenarus Auto Refuel! All stations!

How about adding in the zombie alert I mentioned a few posts back, have been playing with it and it does work, this is what happens when you 'alert' all of the zombies for 750 metres in Cherno. I am the zombie master :mad:

zombie_master.jpg
 
Haha looks good, however with the current script, and DayZ version, zombies spawn at the station already, and trust me, they come :p
Send me that though, I would like to test it :)
 
Mattz you say to paste
// by Mattz for DayZ (C)
private ["_config","_count","_i","_magazines","_object","_type","_type_name"];
_object = _this select 0;
_type = typeof _object;
if (_object isKindOf "ParachuteBase") exitWith {};
if (!alive _object) exitWith {};
_object engineOn false;
sleep 3;
if (!alive _object) exitWith {};
_object vehicleChat "Refueling... If you are in a heli, you have 9 seconds to shut off the engine";
_object engineOn false;
sleep 10;
if (!alive _object) exitWith {};
_OnOff = isEngineOn _object; //Determine if engine is on or off and set it to _OnOff
if (_OnOff) then
{exit;}
else {
_object vehicleChat format ["Filling %1... Please wait...", _type];
};
_OnOff = isEngineOn _object; //Determine if engine is on or off
if (_OnOff) then
{
exit;
}
else {
_OnOff = isEngineOn _object; //Determine if engine is on or off;
while {fuel _object < 0.99} do {
_OnOff = isEngineOn _object; //Determine if engine is on or off
if (_OnOff) then
{exitwith {};}
else {
_object setFuel fuel _object + 0.1;
sleep 6;
};
};
if (!alive _object) exitWith {};
_type_name = typeOf _object;
_object vehicleChat format ["%1 is ready...", _type_name];
};
if (true) exitWith {};
into that exact location. What location would that be? I have no "MPMissions/*missionname*/HERE" on my server!! I have inside my root folder: @Bliss/addons, Battleye, Tmp3289 and Users/cfgdayzDefault. So could you or someone else explain to me, in plain English, where to put the MZ_reload.sqf?

I realise you are not getting paid and any help you offer I am greatful for, but for the lack of explaining yourself clearly, I have spent the entire day trying to get working.
 
iM READING SO MANY DIFFERENT THINGS HERE MY HEADS ABOUT TO EXPLODE, oops srry had caps on lol, im a noob here and with everyone saying Paste here(but not saying where here is) is bloody confusing,

Im running a dayz.st chernarus server can somebody plz walk this noob here(me) the exact steps i should take to get this working plz
 
Did believe i had it installed correct, but when arriving at a fuel station, the chat ask to turn of the engine if in a heli, and from there it says it will begin, and here it halts nothing happens after that point. no fuel at all, anyone else experiences this? and might have a solution to that?

Install directory on the system and both tried with a packed PBO and just running it from folders.
MPMissions\dayz_1.chernarus\scriptsMZ\MZ_reload.sqf
 
How about adding in the zombie alert I mentioned a few posts back, have been playing with it and it does work, this is what happens when you 'alert' all of the zombies for 750 metres in Cherno. I am the zombie master :mad:

zombie_master.jpg
Ooooo! What's this zombie alert trigger you've added? I need to get that into my NPC script somehow (gunshots aren't alerting zeds).

Edit: Nevermind, I found your post!
 
How about adding in the zombie alert I mentioned a few posts back, have been playing with it and it does work, this is what happens when you 'alert' all of the zombies for 750 metres in Cherno. I am the zombie master :mad:


Ok - I've been working on this for a few hours, so I guess it's time to ask for help.

I added this code to my add_unit_server.sqf -

Code:
_aiunit addEventHandler ["Fired", {[_this Select 0,1000,true,(getPosATL (_this Select 0))] spawn player_alertZombies;}];
 
_aiunit addEventHandler ["Fired", {diag_log format ["Army Alert: Unit is shooting shit - %1,_this];}];

and I know it's triggering, because my rpt is full of lines like this:

"Army Alert: Unit is shooting shit - [R 1-1-A:10,"FN_FAL","FN_FAL","Burst","B_762x51_Ball","20Rnd_762x51_FNFAL",1055832:
tracer_red.p3d] "

But zeds don't seem to give a shit. If I shoot, they'll come running, but the AI guns them down while they loiter.

No errors or anything, just no reaction.

Do I need to copy the code from 'player_alertZombies' and make it an execvm script?

Edit:

Doesn't seem to matter - I made an NPC_AlertZombies.sqf, which is just a copy of the standard player alert zombies.

Added this line after variables are assigned:

diag_log format ["NPC_AlertZombies: %1, %2, %3, %4",_unit,_distance,_dorun,_pos];

and my rpt is full of
13:07:33 "NPC_AlertZombies: any, 1000, true, [4772.81,2544.11,0.00143909]"

but the zombies still don't seem to care. I don't know why the unit being passed from the handler is 'any' though; tried a few different permutations, but it doesn't make a difference.

EDIT AGAIN:

GOT IT TO WORK!

My copy of player_alertzombies must have been out of date. I grabbed the latest from my dayz_code.pbo and pasted it in.

I'm calling it like this:

Code:
_aiunit addEventHandler ["Fired", {[(_this Select 0),1000,true,(getPosATL (_this Select 0))] execvm "units\NPC_AlertZombies.sqf";}];

and the only thing I added to the code was the diag_log line

Code:
//NPC_AlertZombies.sqf
 
private["_unit","_distance","_i","_listTalk","_zombie","_targets","_pos"];
//Alert Zed's to noise of shot
_unit =_this select 0;
_distance = _this select 1;
_doRun =_this select 2;
_pos =_this select 3;
_listTalk = _pos nearEntities ["zZombie_Base",_distance * 2];
 
 
// post to the RPT file if an npc alerts a zed
diag_log format ["NPC_AlertZombies: %1, %2, %3, %4",_unit,_distance,_dorun,_pos];
 
 
//hint str(_listTalk);
 
{
_zombie = _x;
if (_doRun) then {
_targets = _zombie getVariable ["targets",[]];
if (!(_unit in _targets)) then {
_targets set [count _targets,_unit];
_zombie setVariable ["targets",_targets,true];
};
} else {
_zombie setVariable ["myDest",_pos,true];
};
} forEach _listTalk;
 
The OP Refuel makes my server sit on waiting for host so I think both of the scripts mentioned in this need to be updated / split so people stop getting confused as to which one other people are talking about!
 
This post is just to long i lost the overview. I just try it but it wont work on my server. Can someone say EXACTLY where the files/directions have to go?
BTW Good Work Dude
 
The file that u create when you extract your mission pbo is where u make a new folder called Scripts. Put the files kh_actions.sqf and kh_vehicle_refuel.sqf in that folder(Scripts). And if u dont have it already, get notepad ++ before doing anything.
 
The file that u create when you extract your mission pbo is where u make a new folder called Scripts. Put the files kh_actions.sqf andkh_vehicle_refuel.sqf in that folder(Scripts). And if u dont have it already, get notepad ++ before doing anything.
Thx dude but i am pretty new with dayz so which mission.pbo file you mean?. /@bliss_1.chernarus/addons/dayz_server.pbo |or| /mpmissions/dayz_private_1.chernarus.pbo
 
Thx dude but i am pretty new with dayz so which mission.pbo file you mean?. /@bliss_1.chernarus/addons/dayz_server.pbo |or| /mpmissions/dayz_private_1.chernarus.pbo

I don't even bother to dump stuff in the PBO - my init file is
\arma 2 operation arrowhead\MPMissions\dayz_1.chernarus\init.sqf

and i call the scripts from

arma 2 operation arrowhead\MPMissions\dayz_1.chernarus\Scripts\

so my init.sqf says:
Code:
if (!isDedicated) then {
 
< bunch of default code >
 
[] execVM "Scripts\kh_actions.sqf"; // This line is to enable the mouse wheel refuel
};
 
mine is named differently, but I believe its the mpmissions one. When you extract it it will have a mission.sqm, a init.sqf, and a descripton.ext file. This is where u put the scripts folder and any other folders that you call scripts from. Some people like putting it all in one folder so the action always starts the same ([] execVM "Scripts\FILEYOURCALLING.sqf"; ) and some like having different folders so you can easily tell what is what. I currently have 5 extra folders in mine. One for every type of addon I have.
 
Back
Top