Jump to content

Recommended Posts

What this does:

 

It spawns a carepackage above the player that floats down around the player. It can be filled with whatever you want. By default the carepackage costs two brief cases to buy.

 

 

Using http://epochservers.com/viewtopic.php?f=14&t=13 add this to your extra_rc.hpp 

	class ItemBriefcase100oz {
		class carepackage {
			text = "Call carepackage";
			script = "execVM 'scripts\carepackage.sqf'";
		};
	};

change the filepath as necessary. 

 

Now find the hacker check in your server_functions.sqf and replace 

if(vehicle _x != _x && !(vehicle _x in PVDZE_serverObjectMonitor) && (isPlayer _x)  && !((typeOf vehicle _x) in DZE_safeVehicle)) then {

with

if(vehicle _x != _x && (vehicle _x getVariable ["Mission",0] != 1) && !(vehicle _x in PVDZE_serverObjectMonitor) && (isPlayer _x)  && !((typeOf vehicle _x) in DZE_safeVehicle)) then {

save and repack. 

 

Download link - contains all three versions. for any of the map click versions you will need to make the extra_rc point to the clickpackage.sqf

You can change the _cost (how many briefs it requires), you can change the _distance until the box is deleted, you can change the _smoke color, you can change the items and weapon types also. You can change the way the box is arranged on the chute, but I wouldn't touch it as it can mess with the chute or make the box float above the ground. You can also change the height that the carepackage spawns at, on line 23 

_position = [_getPos select 0, _getPos select 1, 25];

change the 25 at the end. 

 

EDIT: You may have to whitelist a few things in the createvehicle.txt like 

!="USVehicleBox_EP1"
!="ParachuteMediumEast"
!="SmokeShellBlue"

I don't use BE personally so I can't really help any more than that.

 

and

 

If you are running infistar antihack remove:
onMapSingleClick '';
from AH.sqf

 

 

Enjoy.

 

To view a video of this system click HERE

 

If you like the script, please consider donating below.

 

 

Credits : Infistar, he helped majorly with weapon mag selection. 

Share this post


Link to post
Share on other sites

i already did something like this a while back ...

 

my version is called from a laptop, that is be placed in all airfield control towers on startup works for any map (required it has the default airfield control towers), also icluding planes/helis delivering the package, hint info about the plane/heli, random vehicle drops, whoever has a radio can get delayed plane/heli info, click on map for delivery and many more features.

 

i currently working on a version that will create everything serverside, so the player is not spawning in all this stuff, meaning it will be a lot easier to whitelist for antihacks

 

i might release the serverside version soon, but until then you could try this:

 

Share this post


Link to post
Share on other sites

I'll be attempting a way to make this less... spammable. 

 

hey matt or anyone for that matter is it possible or do you know  a way to make it where this package only gives the option to spawn on new players (players that join the server for the first time) if so could someone help me out with this

remove anything related to briefcases as the cost so make it look like 

// Carepackage script by Matt L
//Special thanks to Infinistar for helping with mag selection for the weapons

private ["_cost","_hasBriefs","_display","_distance","_boxtype","_unit","_getPos","_position","_box","_chute","_smoke","_var","_textt","_tools","_items","_walls","_supplies","_weapon","_weapon2","_weapon3","_weapon4","_weapon5","_weapon6","_giveWep","_possibleMags","_mag","_whichBuild","_crateItems","_text"];

/**
_cost = 2;
_hasBriefs = {"ItemBriefCase100oz" == _x} count (magazines player);

if (_hasBriefs >= _cost) then {

for "_i" from 0 to _cost - 1 do {
player removeMagazine "ItemBriefcase100oz";
};

**/
disableSerialization;
_display = findDisplay 24;
(_display) closeDisplay 0;

_distance = 500;
_boxtype = "USVehicleBox_EP1";
_unit = player;
_getPos = getPos _unit;
_position = [_getPos select 0, _getPos select 1, 25];
_box = _boxtype createVehicle _position;
_box setVariable ["Mission",1,true];
_box setVariable ["permaLoot",1,true];
_box setVariable ["ObjectID",""];
_chute = createVehicle ["ParachuteMediumEast", getPos _box, [], 0, "FLY"];
_box attachTo [_chute, [0,0,3]];
_smoke = "SmokeShellBlue" createVehicle (getPos _box);
_smoke attachTo [_box, [0,0,0]];
_var = floor((random 2) + 1);

//display text to alert user
_textt = format ["\nCarepackage is above you!",10];
titleText [_textt,"PLAIN DOWN"];

//define items

_tools = ["ItemEtool","ItemKnife","ItemGPS","ItemFishingPole","ItemHatchet_DZE","ItemMatchbox_DZE","ItemCrowbar"];
_items = ["ItemSodaPepsi","FoodCanCorn","FoodNutmix","ItemSodaClays","FoodCanSardines","ItemKiloHemp"];
_walls = ["ItemWoodWallGarageDoor","ItemWoodWallWithDoorLg","ItemWoodWallLg","ItemWoodWallGarageDoor","ItemWoodFloor","metal_floor_kit Z","CinderWallDoorSmall_DZ"];
_supplies = ["CinderBlocks","MortarBucket","ItemTankTrap","PartWoodPlywood","PartWoodLumber","ItemPole","PartGlass"];

//weapon lists
_weapon = "DMR";
_weapon2 = "AK_47_M";
_weapon3 = "BAF_L85A2_RIS_Holo";
_weapon4 = "RPK_74";
_weapon5 = "M14_EP1";
_weapon6 = "M249_DZ";
_giveWep = [_weapon,_weapon2,_weapon3,_weapon4,_weapon5,_weapon6] call BIS_fnc_selectRandom;
_possibleMags = getArray (configfile >> "cfgWeapons" >> _giveWep >> "magazines");
_mag = _possibleMags select 0;

//select arrays to use
_crateItems = [_walls,_supplies,_items] call BIS_fnc_selectRandom;
uisleep 1;

clearweaponcargoglobal _box;
clearmagazinecargoglobal _box;

uisleep 1;

{_box addMagazineCargoGlobal [_x, _var];} forEach _crateItems;
{_box addWeaponCargoGlobal [_x, 1];} forEach _tools;
_box addMagazineCargoGlobal [_mag, _var];
_box addWeaponCargoGlobal [_giveWep, 1];

uisleep 1;

waitUntil {(player distance _box) > _distance};
deleteVehicle _box;
deleteVehicle _chute;

/**
} else {
_text = format ["\nYou need two full briefs to call a carepackage!",10];
titleText [_text,"PLAIN DOWN"];
};
**/

Then in your init.sqf call it like 

pack = compile preprocessFileLineNumbers "scripts\carepackage.sqf";
waitUntil {!isNil ("PVDZE_plr_LoginRecord")};
if (dayzPlayerLogin2 select 2) then
{
    player spawn pack;
};

at the bottom

Share this post


Link to post
Share on other sites

Here is a version with a use timer. I havn't tested it yet but as soon as I am able, I will. If you try it, and it works, let me know. Thanks.  FILE

tested and working fine. Updating OP download link

 

 

EDIT: link updated

Share this post


Link to post
Share on other sites

Hey MattL, so that I don't have to mess around with the server_functions file, I just replace:

 

_box setVariable ["Mission",1,true];

 

with:

 

_box setVariable ["permaLoot",true];

 

Not sure if you want to use this to save your script users a little time. 

 

I use this on all my custom missions and have never had a box or vehicle get cleaned up by the server :)

Share this post


Link to post
Share on other sites

Hey MattL, so that I don't have to mess around with the server_functions file, I just replace:

 

_box setVariable ["Mission",1,true];

 

with:

 

_box setVariable ["permaLoot",true];

 

Not sure if you want to use this to save your script users a little time. 

 

I use this on all my custom missions and have never had a box or vehicle get cleaned up by the server :)

both variable are included just to avoid any...unlucky happenings. I've had issues with permaLoot before so I don't fully trust it :)

Share this post


Link to post
Share on other sites

both variable are included just to avoid any...unlucky happenings. I've had issues with permaLoot before so I don't fully trust it :)

 

That's wise. 

 

Just out of curiosity, why do you put the ,1, in the variable? Just in case i'm missing a trick ;)

Share this post


Link to post
Share on other sites

That's wise. 

 

Just out of curiosity, why do you put the ,1, in the variable? Just in case i'm missing a trick ;)

You know, I honestly don't know. I've never seen variables without it so I always include it

Share this post


Link to post
Share on other sites

That's wise. 

 

Just out of curiosity, why do you put the ,1, in the variable? Just in case i'm missing a trick ;)

figured this out. in server_functions.sqf look at  

(vehicle _x getVariable ["Mission",0] != 1)

so the 1 is there so it won't get deleted 

Share this post


Link to post
Share on other sites

tested it right now, but its a bit bugged for me

 

 

it show the items in there but I cant get anything out there or place something in it

also cargo check sayys that there is nothing in it

Share this post


Link to post
Share on other sites

tested it right now, but its a bit bugged for me

 

 

it show the items in there but I cant get anything out there or place something in it

also cargo check sayys that there is nothing in it

I also have this issue

Share this post


Link to post
Share on other sites

Maybe because I'm a giant douche and enjoy watching people suffer. Would it be possible add to this script so that you have the option to call for a care package for 2 briefs for yourself or call for a booby trapped care package for 3 briefs for someone else lol? I have a HEAVY PVP based server that keeps me thinking of new creative ways to kill people.

 

Thoughts? 

Share this post


Link to post
Share on other sites

Great script bro. My question is, in the define items, do those items spawn in with random quantity when you call the carepackage?

you can add random quantities easy, though _crateItems and _mag already have a random quantity. 

tested it right now, but its a bit bugged for me

 

 

it show the items in there but I cant get anything out there or place something in it

also cargo check sayys that there is nothing in it

I had this issue only on 112555 and could only replicate it on that beta patch. 

 

I also have this issue

see above

 

Maybe because I'm a giant douche and enjoy watching people suffer. Would it be possible add to this script so that you have the option to call for a care package for 2 briefs for yourself or call for a booby trapped care package for 3 briefs for someone else lol? I have a HEAVY PVP based server that keeps me thinking of new creative ways to kill people.

 

Thoughts? 

That'd be extremely hard as you would have to populate a list of players and have it show on some sort of menu...The carepackage part, or at least the booby trap part of it, would not be hard at all but the menu would be where I wouldn't be able to help. I could probably add a random chance to spawn a grenade or other large explosive shell when the player who called it comes near it

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Similar Content

    • By Tricks
      Hello community,
      I am working on a custom mission that takes place over the waters of Chernarus. Its actually an Aircraft Carrier mission I had on my server in 2014. However I can't seem to get loot to spawn on the ship.
      Has anyone had any success in spawning custom loot boxes over water or on the carrier?
      Thanks!
    • By webbie
      Hi all, Pretty big noob too Epoch.
      Ive done Lots of Arma and Exile but for something new and seeing some good development going on with Epoch, I thought we would give it a try. 
      I want to use lingor, its working fine however i'm really not seeing any loot maybe 1 very sparingly so is their a trick to making this work?
      I do alot of my own research but being in totally foreign turf I thought Id ask some experts,
       
      Thax in Advance
    • By Efixea
      I have a server i started not too long ago hosted by GTX. I had InfiSTAR installed by the support and server was working decent. After  EPOCH updated to 1.1 my server does not have loot in any building. Very few containers spawn with anything usefull in them....Furniture in houses and loot piles will have generic loot like moist towlettes and paint or minimal building supplies.
      I do not see blue tarps on the map anymore and cargo with loot spawns maybe 3 or 4 in an entire day of the server being up and running.
      No AI spawns in any area of map at any time of the day.  Have been playing over a week now and nothing spawns anywhere.
      and it NEVER stops raining.
       
      I am VERY noob when it comes to adding scripts or mods to servers myself. I played an Arma 2 server about 2 years ago and learned a bit about this stuff. since then i have been re-learing everything.
      the only thing i have installed is Zombies and Demons. Nothing else has been changed or edited by me.
       
      Is there anything i can edit myself to change any of this?  should i have the server reinstalled?
    • By Tricks
      Hello all,
      Quick question, how do I adjust loot spawn percentages in 1.0.6? Do I have to create my own custom loot?
       
      Thanks
    • By randall421
      The loot spawning on my server will respawn or cycle right infrnt of you if you move more than 5m away or if someone else near you moves 5ft away. I check player_spawncheck.sqf and it looks fine. 
      player_spawncheck.sqf 
      //player_spawncheck.sqf private ["_isWreck","_maxControlledZombies","_looted","_zombied","_doNothing","_spawnZedRadius","_serverTime","_age","_nearbyBuildings","_position","_speed","_radius","_maxlocalspawned","_maxWeaponHolders","_currentWeaponHolders","_maxtoCreate","_inVehicle","_isAir","_isLand","_isSea","_Controlledzeddivided","_totalcrew","_nearby","_type","_config","_canSpawn","_dis","_checkLoot","_islocal","_bPos","_zombiesNum"]; _age = -1; //_nearbyBuildings = []; _position = [player] call fnc_getPos; _speed = speed (vehicle player); _radius = 200; //150*0.707; Pointless Processing (106.5) _spawnZedRadius = 20; /* //Tick Time PVDZ_getTickTime = player; publicVariableServer "PVDZ_getTickTime"; */ //Total Counts _maxlocalspawned = round(dayz_spawnZombies); _maxControlledZombies = round(dayz_maxLocalZombies); _maxWeaponHolders = round(dayz_maxMaxWeaponHolders); _currentWeaponHolders = round(dayz_currentWeaponHolders); //Limits (Land,Sea,Air) _inVehicle = (vehicle player != player); /* _isAir = vehicle player iskindof "Air"; _isLand = vehicle player iskindof "Land"; _isSea = vehicle player iskindof "Sea"; if (_isLand) then { } else { }; if (_isAir) then { } else { }; if (_isSea) then { } else { }; */ _doNothing = false; if (_inVehicle) then { _Controlledzeddivided = 0; //exit if too fast if (_speed > 25) exitwith {_doNothing = true;}; //Crew can spawn zeds. _totalcrew = count (crew (vehicle player)); if (_totalcrew > 1) then { _Controlledzeddivided = 2; //Dont allow driver to spawn if we have other crew members. if (player == driver (vehicle player)) exitwith {_doNothing = true;}; } else { _Controlledzeddivided = 4; }; if (_Controlledzeddivided > 0) then { _maxControlledZombies = round(_maxControlledZombies / _Controlledzeddivided); r_player_divideinvehicle = _Controlledzeddivided; }; }; if (_doNothing) exitwith {}; /*if ("ItemMap_Debug" in items player) then { deleteMarkerLocal "MaxZeds"; deleteMarkerLocal "Counter"; deleteMarkerLocal "Loot30"; deleteMarkerLocal "Loot120"; deleteMarkerLocal "Agro80"; _markerstr = createMarkerLocal ["MaxZeds", _position]; _markerstr setMarkerColorLocal "ColorYellow"; _markerstr setMarkerShapeLocal "ELLIPSE"; _markerstr setMarkerBrushLocal "Border"; _markerstr setMarkerSizeLocal [_radius, _radius]; _markerstr1 = createMarkerLocal ["Counter", _position]; _markerstr1 setMarkerColorLocal "ColorRed"; _markerstr1 setMarkerShapeLocal "ELLIPSE"; _markerstr1 setMarkerBrushLocal "Border"; _markerstr1 setMarkerSizeLocal [_radius+100, _radius+100]; _markerstr2 = createMarkerLocal ["Agro80", _position]; _markerstr2 setMarkerColorLocal "ColorRed"; _markerstr2 setMarkerShapeLocal "ELLIPSE"; _markerstr2 setMarkerBrushLocal "Border"; _markerstr2 setMarkerSizeLocal [80, 80]; _markerstr2 = createMarkerLocal ["Loot30", _position]; _markerstr2 setMarkerColorLocal "ColorRed"; _markerstr2 setMarkerShapeLocal "ELLIPSE"; _markerstr2 setMarkerBrushLocal "Border"; _markerstr2 setMarkerSizeLocal [30, 30]; _markerstr3 = createMarkerLocal ["Loot120", _position]; _markerstr3 setMarkerColorLocal "ColorBlue"; _markerstr3 setMarkerShapeLocal "ELLIPSE"; _markerstr3 setMarkerBrushLocal "Border"; _markerstr3 setMarkerSizeLocal [120, 120]; diag_log ("LocalZombies: " +str(dayz_spawnZombies) + "/" +str(dayz_maxLocalZombies)); //Logging diag_log (format["%1 Local.Agents: %2/%3, NearBy.Agents: %8/%9, Global.Agents: %6/%7, W.holders: %10/%11, (radius:%4m %5fps).","SpawnCheck", _maxlocalspawned, _maxControlledZombies, _radius, round diag_fpsmin,dayz_currentGlobalZombies, dayz_maxGlobalZeds, dayz_CurrentNearByZombies, dayz_maxNearByZombies, _currentWeaponHolders,_maxWeaponHolders]); };*/ // nearObjects is faster than nearestObjects when sorting by distance isn't needed // "Building" includes House and all of its child classes (Crashsite, IC_Fireplace1, IC_Tent, etc.) _nearby = _position nearObjects ["Building",_radius]; _maxlocalspawned = _maxlocalspawned max floor(_maxControlledZombies*.8); if (_maxlocalspawned > 0) then { _spawnZedRadius = _spawnZedRadius * 3; }; //Spawn Zeds & loot in buildings { _type = typeOf _x; _config = missionConfigFile >> "CfgLoot" >> "Buildings" >> _type; _canSpawn = isClass (_config); if (_canSpawn) then { _dis = _x distance player; _checkLoot = (count (getArray (_config >> "lootPos"))) > 0; _islocal = _x getVariable ["", false]; // object created locally via TownGenerator. //Make sure wrecks always spawn Zeds _isWreck = _x isKindOf "CrashSite"; //Loot if (getNumber(_config >> "lootChance") > 0) then { if (_currentWeaponHolders < _maxWeaponHolders) then { //Basic loot check if ((_dis < 125) and (_dis > 30) and !_inVehicle and _checkLoot) then { _serverTime = serverTime; _looted = (_x getVariable ["looted",_serverTime]); _age = _serverTime - _looted; //Building refresh rate if (_age == 0 or (_age > getNumber(_config >> "lootRefreshTimer"))) then { _x setVariable ["looted",_serverTime,!_islocal]; _x call building_spawnLoot; if (!(_x in dayz_buildingBubbleMonitor)) then { dayz_buildingBubbleMonitor set [count dayz_buildingBubbleMonitor, _x]; }; //diag_log [ diag_tickTime, "new loot at",_x,"age:", _age, "serverTime:", _serverTime]; }/* else { diag_log [ diag_tickTime, "won't spawn loot at",_x,"age:", _age, "serverTime:", _serverTime]; }*/; }; }; }; //Zeds if (getNumber(_config >> "zombieChance") > 0) then { if (_dis > _spawnZedRadius) then { _serverTime = serverTime; _zombied = (_x getVariable ["zombieSpawn",_serverTime]); _age = _serverTime - _zombied; if ((_age == 0) or (_age > 300)) then { if (!_isWreck) then { if ((dayz_spawnZombies < _maxControlledZombies) and (dayz_CurrentNearByZombies < dayz_maxNearByZombies) and (dayz_currentGlobalZombies < dayz_maxGlobalZeds)) then { _bPos = getPosATL _x; _zombiesNum = count (_bPos nearEntities ["zZombie_Base",(((sizeOf _type) * 2) + 10)]); if (_zombiesNum == 0) then { _x setVariable ["zombieSpawn",_serverTime,!_islocal]; if (!(_x in dayz_buildingBubbleMonitor)) then { //add active zed to var dayz_buildingBubbleMonitor set [count dayz_buildingBubbleMonitor, _x]; }; //start spawn [_x] call building_spawnZombies; }; //diag_log (format["%1 building. %2", __FILE__, _x]); }; } else { _bPos = getPosATL _x; _zombiesNum = count (_bPos nearEntities ["zZombie_Base",(((sizeOf _type) * 2) + 30)]); //Should be a wreck if (_zombiesNum == 0) then { [_x,_isWreck] call building_spawnZombies; }; }; }; }; }; }; } forEach _nearby; At first I thought it was a respawn timer issue or something like that but if you don't move the loot will stay, you have to back away from it or someone else has to get within range and its not like you have to run away for this to happen, you can just back up a few steps and watch the loot change right infront of you. I have been playing around with it just trying to see if i can figure it out but if anyone knows what i should do or can at least point me in the right direction it would be a huge help.
       
      Thanks
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...