Tricks Posted August 19, 2014 Report Share Posted August 19, 2014 Hey guys, I have been using but it has stopped working for some reason. Anyone have one that's tested and working? Would also love a query that will unlock unused vehicles after a week? Thanks! Link to comment Share on other sites More sharing options...
0 cen Posted August 19, 2014 Report Share Posted August 19, 2014 /* Unlock Purchased Untouched Vehicles */ UPDATE `object_data` SET `CharacterID` = 0 WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 7 DAY) AND `CharacterID` > 0 AND `Classname` NOT REGEXP 'barrier|storage|shed|bench|wall|floor|fence|pump|wood|hrescue|stick|pole|generator|panel|house|rack|bag|stand|barrel|canvas|wire|hedgehog|net|trap|ramp|fort|sand|scaffold|nest'; Link to comment Share on other sites More sharing options...
0 Tricks Posted August 19, 2014 Author Report Share Posted August 19, 2014 Thank you Cen! Anyone have a vehicle deletion script? Link to comment Share on other sites More sharing options...
0 cen Posted August 19, 2014 Report Share Posted August 19, 2014 Need to be more specific Link to comment Share on other sites More sharing options...
0 Tricks Posted August 19, 2014 Author Report Share Posted August 19, 2014 I need two actually: 1) Delete unused locked vehicles after 10 days. 2) Delete vehicles that have been completely salvaged. I am trying to clean-up the database and server, I pretty much need the most updated and working clean-up scripts/events. Link to comment Share on other sites More sharing options...
0 Kerbo Posted August 19, 2014 Report Share Posted August 19, 2014 For #1 this should work: SELECT * FROM `Object_DATA` WHERE `Object_DATA`.`CharacterID` <> 0 AND `Object_DATA`.`CharacterID` <= 12500 AND `Object_DATA`.`Classname` NOT LIKE 'Tent%' AND `Object_DATA`.`Classname` NOT LIKE '%Locked' AND `Object_DATA`.`Classname` NOT LIKE 'Land%' AND `Object_DATA`.`Classname` NOT LIKE 'Cinder%' AND `Object_DATA`.`Classname` NOT LIKE 'Wood%' AND `Object_DATA`.`Classname` NOT LIKE 'Metal%' AND `Object_DATA`.`Classname` NOT LIKE '%Storage%' AND `Object_DATA`.`Classname` NOT IN ('OutHouse_DZ', 'GunRack_DZ', 'WorkBench_DZ', 'Sandbag1_DZ', 'FireBarrel_DZ', 'DesertCamoNet_DZ', 'StickFence_DZ', 'LightPole_DZ', 'DeerStand_DZ', 'ForestLargeCamoNet_DZ', 'Plastic_Pole_EP1_DZ', 'Hedgehog_DZ', 'FuelPump_DZ', 'Fort_RazorWire', 'SandNest_DZ', 'ForestCamoNet_DZ', 'Fence_corrugated_DZ', 'CanvasHut_DZ', 'Generator_DZ') AND `Object_DATA`.`LastUpdated` < DATE_SUB(NOW(), INTERVAL 10 DAY); It's good practice to check DELETE's with a SELECT first so if the results look right replace "SELECT * FROM" above with "DELETE FROM" and rerun. I don't know of an easy way to do #2 since Hitpoints is an array that can vary depending on vehicle type. Link to comment Share on other sites More sharing options...
0 Tricks Posted August 19, 2014 Author Report Share Posted August 19, 2014 /* Unlock Purchased Untouched Vehicles */ UPDATE `object_data` SET `CharacterID` = 0 WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 7 DAY) AND `CharacterID` > 0 AND `Classname` NOT REGEXP 'barrier|storage|shed|bench|wall|floor|fence|pump|wood|hrescue|stick|pole|generator|panel|house|rack|bag|stand|barrel|canvas|wire|hedgehog|net|trap|ramp|fort|sand|scaffold|nest'; I am getting this error: SQL Error (1146): Table 'mysql.object_data' doesn't exist Link to comment Share on other sites More sharing options...
0 cen Posted August 19, 2014 Report Share Posted August 19, 2014 then fix it to match your table name :D Link to comment Share on other sites More sharing options...
0 Kerbo Posted August 19, 2014 Report Share Posted August 19, 2014 I am getting this error: SQL Error (1146): Table 'mysql.object_data' doesn't exist mysql is the database (or schema) name and object_data is the table name. In this case your mysql client is using the default database (mysql) which it will do unless you specify something different. You need to switch to your DayZ database before running the SQL or add "USE epoch;" to the top of your script (assuming your DayZ database is called epoch). Hope that make sense. Link to comment Share on other sites More sharing options...
0 Tricks Posted August 19, 2014 Author Report Share Posted August 19, 2014 Ahhhh thanks guys! Link to comment Share on other sites More sharing options...
0 Shadow Hawk Posted August 21, 2014 Report Share Posted August 21, 2014 it could also be that the file is call Object_DATA not object_data. I have had errors because of that before too. Link to comment Share on other sites More sharing options...
Question
Tricks
Hey guys,
I have been using but it has stopped working for some reason. Anyone have one that's tested and working? Would also love a query that will unlock unused vehicles after a week?
Thanks!
Link to comment
Share on other sites
10 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now