jjsyck Posted January 3, 2015 Report Share Posted January 3, 2015 I have been working with an idea for plot for life as an add on but I need help. The plan is to have the cost of the maintenance based on the below factors. Script runs a 10 day maintenance base on day one being the last time said item was updated in database Day 1= 10% damage, Day 2= 20%, Day 3= 30%, etc all the way to day 10, at this point it would be removed from the database as it has not been maintained in 10 days. Example of maintenance route Cost per unit = A Damage cost based of a list Example 1 - 10% = xxxx 11 - 20% = xxxx 21 - 30% etc and so on. = B Every 100 items has an extra cost of 10% added = C Final tax of 5% on sub total cost = D A + B + C + x + D + Total Maintenance cost If you think this is a job you would like to do let me know as I am running short on time as I need to get this finished ASAP. Kind Regards Link to comment Share on other sites More sharing options...
Gr8 Posted January 3, 2015 Report Share Posted January 3, 2015 Using the SQL Events, Add .1 Damage to the object Everyday, Then Calculate the Cost looking at the damages. Link to comment Share on other sites More sharing options...
jahangir13 Posted January 6, 2015 Report Share Posted January 6, 2015 "I am running short on time as I need to get this finished ASAP." Then I would say you should start immediately ;) Maintenance happens here: maintain_area.sqf (dayz_code) There is this loop: _objects = nearestObjects [_target, _objectClasses, _range]; //filter to only those that have 10% damage _objects_filtered = []; { if (damage _x >= DZE_DamageBeforeMaint) then { _objects_filtered set [count _objects_filtered, _x]; }; } count _objects; You would need to check each object for the damage and calculate a price for it as not all objects for this plotpole may have the same damage. There can be objects created yesterday and objects created today which in these cases have different damage values. How do you pay 1/3 gold or 2/3 gold or whatever % values you get for your damage or is this for Single Currency which would make more sense then? If not you need to think about what requirements you need to be fullfilled the player has in his inventory. Hm, would be a bit too much to think about for me...for something like that ;) I just use maintenance so that I know which objects are still needed and which can be deleted and so I do not take any costs for it. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now