Jump to content
  • 0

Need some guidance on base maintenance


AlexLawson

Question

So I have never needed to use base maintenance but with the amount of players on my server I need to do something to decay bases. So I think I know how it works but before I add this to my server I would like someone to double check it in case I mess something up and my test server is down for a few days.

So if I set this event in the DB

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` = '[]') )
;;
DELIMITER ;

This will enable players to maintain and then I set this setting in HiveExt.ini to remove non maintained buildings after 7 days.

;CleanupPlacedAfterDays = 7

Is this correct ?

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Wanna be sure no bases get removed instantly? If some are over that 7days old they will get removed right when the server comes up. Run this as query in database to update all bases then after the 7 days they will start to vanish.

UPDATE `Object_DATA` SET `Datestamp`=CURRENT_TIMESTAMP WHERE `ObjectUID` <> 0 AND `CharacterID` <> 0 AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') )
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...