Cryten Posted November 28, 2013 Report Share Posted November 28, 2013 open or delete the safe/locked door after 14 days if no one uses this? anyone know how to do that with a sql event? best regards :) Link to comment Share on other sites More sharing options...
0 MGT Posted November 29, 2013 Report Share Posted November 29, 2013 I have a function for that, it can be called at restart from a batch file etc UPDATE `object_data` SET `CharacterID` = 0 WHERE `lastactive` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `CharacterID` > 0 AND `Classname` NOT IN ('VaultStorage') AND `Inventory` <> '[]' AND `Inventory` IS NOT NULL Link to comment Share on other sites More sharing options...
0 Codemanx Posted November 29, 2013 Report Share Posted November 29, 2013 Wish I could run these functions. My server is updating all objects each restart. The count down will not work. Is there a way to stop a Dayz.st server from updating these objects? There must be a script in their installation that is doing this. Thanks Link to comment Share on other sites More sharing options...
0 thade Posted December 4, 2013 Report Share Posted December 4, 2013 MGT how did you set your vaults to reset the vaults code to "0000" after 14 days and if still not accessed delete after 30? Cheers Thade :) I have a function for that, it can be called at restart from a batch file etc UPDATE `object_data` SET `CharacterID` = 0 WHERE `lastactive` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `CharacterID` > 0 AND `Classname` NOT IN ('VaultStorage') AND `Inventory` <> '[]' AND `Inventory` IS NOT NULL Link to comment Share on other sites More sharing options...
0 MGT Posted December 4, 2013 Report Share Posted December 4, 2013 We set code to 0000 on safes un-opened in 26 days using these MySQL procedures (you will need last active column) UPDATE `object_data` SET `CharacterID` = 0 WHERE `lastactive` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 26 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 26 DAY) AND `CharacterID` > 0 AND `Classname` NOT IN ('VaultStorage') AND `Inventory` <> '[]' AND `Inventory` IS NOT NULL Then delete them after a further 7 days if they're still not opened using BEGIN DELETE FROM dayz_epoch.object_data WHERE Classname LIKE '%Storage",1%' OR Classname LIKE '%House",1%' OR Classname LIKE '%Shed",1%' OR Classname LIKE '%Shack",1%' AND object_data.lastactive < NOW() - INTERVAL 33 DAY; END Draftkid 1 Link to comment Share on other sites More sharing options...
0 thade Posted December 10, 2013 Report Share Posted December 10, 2013 is last active and last updated the same thing? Link to comment Share on other sites More sharing options...
0 Jonah1045 Posted March 14, 2014 Report Share Posted March 14, 2014 MGT Can you please provide a tutorial this looks awesome Link to comment Share on other sites More sharing options...
0 MGT Posted March 15, 2014 Report Share Posted March 15, 2014 Copy those codes into text docs, then save them as whatever.sql Open your database/dayz_epoch, then point and execute that sql, that's all you do! Draftkid 1 Link to comment Share on other sites More sharing options...
Question
Cryten
open or delete the safe/locked door after 14 days if no one uses this?
anyone know how to do that with a sql event?
best regards :)
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now