Jump to content

Area Maintenance Epoch


Recommended Posts

Hi all i add that script on my server Epoch 

 

But it's not really what i was hopping for.

My team are looking for a maintenance that will delete any object with in the area if not maintain every 30 day.

It will be like a rent pay by the player.

The goal is to clean the Database over full :D to have better gaming experience on the server.

 

:ph34r: Ninja 

 

GNL L0kiir Admin  

Link to comment
Share on other sites

Hello, I am the coder of GNL, what we want with the maintenance system is that when a person builds wall must pay for it OzGold construction remains for 15 days. If she does not pay the 15 days before building construction removes this, I look at this link it does not match my expectations !

 

Thank You !

Link to comment
Share on other sites

In mine it says: 

 

YOU MUST have a proper dayz_server.pbo that supports this feature, otherwise you will get script errors
;You can find that file under the SQF directory for your server version
;ResetOOBObjects = false
CleanupPlacedAfterDays = -1
 
[ObjectDB]
;Setting this to true separates the Object fetches from the Character fetches
;
 
What do I change, because it doesnt look like what your saying..
 
Is it just: CleanupPlacedAfterDays = -1  <<<<<change to CleanupPlacedAfterDays = 15                 ?
 
Also to edit this setting via FTP, does my server need to be off first?
 
Where do I edit the cost for this aswell?
Link to comment
Share on other sites

 

In mine it says: 

 

YOU MUST have a proper dayz_server.pbo that supports this feature, otherwise you will get script errors
;You can find that file under the SQF directory for your server version
;ResetOOBObjects = false
CleanupPlacedAfterDays = -1
 
[ObjectDB]
;Setting this to true separates the Object fetches from the Character fetches
;
 
What do I change, because it doesnt look like what your saying..
 
Is it just: CleanupPlacedAfterDays = -1  <<<<<change to CleanupPlacedAfterDays = 15                 ?
 
Also to edit this setting via FTP, does my server need to be off first?
 
Where do I edit the cost for this aswell?

 

 

'-1' means that objects will never get removed. If you want cleanup to happen after 15 days of no maintenance, then yes, change it to 15.

 

Maintenance costs can be found in maintain_area.sqf:

switch true do {
case (_count <= 50):   {_requirements = [["ItemGoldBar10oz",1]]};
case (_count <= 100):  {_requirements = [["ItemGoldBar10oz",2]]};
case (_count <= 150):  {_requirements = [["ItemGoldBar10oz",3]]};
case (_count <= 200):  {_requirements = [["ItemGoldBar10oz",4]]};
case (_count <= 250):  {_requirements = [["ItemGoldBar10oz",5]]};
case (_count <= 300):  {_requirements = [["ItemGoldBar10oz",6]]};
case (_count <= 350):  {_requirements = [["ItemGoldBar10oz",7]]};
case (_count <= 400):  {_requirements = [["ItemGoldBar10oz",8]]};
case (_count <= 450):  {_requirements = [["ItemGoldBar10oz",9]]};
case (_count >= 451):  {_requirements = [["ItemGoldBar100oz",1]]};
};
Link to comment
Share on other sites

Here is my server side maintain_area.sqf:
 
 
/* Maintain Area - written by Skaronator */
private ["_player","_ObjArray","_uniqueID","_objects","_key"];
_player = _this select 0;
_option = _this select 1;
/*
1: PVDZE_maintainArea = [player,1,_target];
2: PVDZE_maintainArea = [player,2,_object];
*/
_targetObj = _this select 2;
 
if (_option == 1) then {
_objects = nearestObjects [_targetObj, DZE_maintainClasses, DZE_maintainRange];
{
if (damage _x >= DZE_DamageBeforeMaint) then {
_objectID = _x getVariable ["ObjectID","0"];
if (_objectID == "0") then {
_objectUID = _x getVariable ["ObjectUID","0"];
if (_objectUID != "0") then {
_x setDamage 0;
_key = format["CHILD:397:%1:", _objectUID]; // use UID if not "0" and ID is "0"
_data = "HiveExt" callExtension _key;
};
} else {
_x setDamage 0;
_key = format["CHILD:396:%1:", _objectID]; //Use ID instead of UID because ID is shorter
_data = "HiveExt" callExtension _key;
};
};
} forEach _objects;
 
diag_log format ["MAINTAIN AREA BY %1 - %2 Objects at %3", name _player, count _objects, position _player];
};
if (_option == 2) then {
if (damage _targetObj >= DZE_DamageBeforeMaint) then {
_objectID = _targetObj getVariable ["ObjectID","0"];
if (_objectID == "0") then {
_objectUID = _targetObj getVariable ["ObjectUID","0"];
if (_objectUID != "0") then {
_targetObj setDamage 0;
_key = format["CHILD:397:%1:", _objectUID]; // use UID if not "0" and ID is "0"
_data = "HiveExt" callExtension _key;
};
} else {
_targetObj setDamage 0;
_key = format["CHILD:396:%1:", _objectID]; //Use ID instead of UID because ID is shorter
_data = "HiveExt" callExtension _key;
 
};
};
};
 
 
It has nothing about prices?
Link to comment
Share on other sites

Mine is located here: vilayercodecustom\dayz_epoch\compile\server_maintainArea.sqf

 

Here is mine:

 

/* Maintain Area - written by Skaronator */
private ["_player","_ObjArray","_uniqueID","_objects","_key"];
_player = _this select 0;
_option = _this select 1;
/*
1: PVDZE_maintainArea = [player,1,_target];
2: PVDZE_maintainArea = [player,2,_object];
*/
_targetObj = _this select 2;
 
if (_option == 1) then {
_objects = nearestObjects [_targetObj, DZE_maintainClasses, DZE_maintainRange];
{
if (damage _x >= DZE_DamageBeforeMaint) then {
_objectID = _x getVariable ["ObjectID","0"];
if (_objectID == "0") then {
_objectUID = _x getVariable ["ObjectUID","0"];
if (_objectUID != "0") then {
_x setDamage 0;
_key = format["CHILD:397:%1:", _objectUID]; // use UID if not "0" and ID is "0"
_data = "HiveExt" callExtension _key;
};
} else {
_x setDamage 0;
_key = format["CHILD:396:%1:", _objectID]; //Use ID instead of UID because ID is shorter
_data = "HiveExt" callExtension _key;
};
};
} forEach _objects;
 
diag_log format ["MAINTAIN AREA BY %1 - %2 Objects at %3", name _player, count _objects, position _player];
};
if (_option == 2) then {
if (damage _targetObj >= DZE_DamageBeforeMaint) then {
_objectID = _targetObj getVariable ["ObjectID","0"];
if (_objectID == "0") then {
_objectUID = _targetObj getVariable ["ObjectUID","0"];
if (_objectUID != "0") then {
_targetObj setDamage 0;
_key = format["CHILD:397:%1:", _objectUID]; // use UID if not "0" and ID is "0"
_data = "HiveExt" callExtension _key;
};
} else {
_targetObj setDamage 0;
_key = format["CHILD:396:%1:", _objectID]; //Use ID instead of UID because ID is shorter
_data = "HiveExt" callExtension _key;
 
};
};
};
Link to comment
Share on other sites

  • 7 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...