Jump to content
  • 0

Event structure for setDamageOnAge


Cyrus

Question

I have been finding that some people on my server has been losing base walls and floors even though DZE_godmodebase = true; , it has no effect on anything built inside the plot radius. So i have come to the conclusion that base items might receive damage on age and this ultimately being removed by server cleanup script. So my question is if I drop this event below will that stop me and others from losing base walls and floor? Or at the minimum update it without any cinder wall items?

Spoiler

DROP EVENT IF EXISTS `setDamageOnAge`;
DELIMITER ;;
CREATE EVENT `setDamageOnAge` ON SCHEDULE EVERY 1 DAY COMMENT 'This sets damage on a wall so that it can be maintained' 
DO UPDATE `Object_DATA` 
SET `Damage`=0.1 WHERE `ObjectUID` <> 0 AND `CharacterID` <> 0 
AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 3 DAY) AND ( (`Inventory` IS NULL) 
                                                              OR (`Inventory` = '[]') OR (`Classname` IN ('Land_DZE_GarageWoodDoorLocked','Land_DZE_LargeWoodDoorLocked','Land_DZE_WoodDoorLocked',
 'CinderWallDoorLocked_DZ','CinderWallDoorSmallLocked_DZ','Plastic_Pole_EP1_DZ')) )
;;
DELIMITER ;
                                                                
                                                               

 

like this  and set damage to 0.001:

Spoiler

DROP EVENT IF EXISTS `setDamageOnAge`;
DELIMITER ;;
CREATE EVENT `setDamageOnAge` ON SCHEDULE EVERY 1 DAY COMMENT 'This sets damage on a wall so that it can be maintained' 
DO UPDATE `Object_DATA` 
SET `Damage`=0.001 WHERE `ObjectUID` <> 0 AND `CharacterID` <> 0 
AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 3 DAY) AND ( (`Inventory` IS NULL) 
OR (`Inventory` = '[]') OR (`Classname` IN ('Plastic_Pole_EP1_DZ')) )
;;
DELIMITER ;

 

 

Edited by Cyrus
made correction
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Discord

×
×
  • Create New...