Bilco 41 Report post Posted March 26, 2015 I have some Events that I have found on various websites that I use and would like to share with the community. Some of these may come standard with Epoch but I have adjusted some to suit my needs for my server. Event Settings (you can modify an existing event or create a new one and disable the old within phpMyAdmin -> Events page) Event name: updateStockDaily Status: Enabled Event type: Recurring Execute every: 1 day Start: "The date will auto populate when creating, no need to input anything" End: "Leave this blank if you are running a recurring event, no need to input anything" Definition: UPDATE `traders_data` SET qty=9999 WHERE qty<9999 AND afile<>'trade_any_vehicle' AND afile<>'trade_any_boat' On completion preserve: You'll see a check box, can be left unchecked. Definer: "The definer will auto populate when creating, no need to input anything" Comment: Updates out of stock vendors "This can also be left blank" The rest of my events, without all the lingo. You can run them every couple hours or every day: UnlockNonKeyVehicles UPDATE `Object_DATA` SET `Object_DATA`.`CharacterID` = 0 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 FindVehicleKeysCount(Object_DATA.CharacterID) = 0 setDamageOnAge 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` = '[]') ) This sets damage on a wall so that it can be maintainedresetVaults UPDATE `object_data` SET `CharacterID` = 0 WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `CharacterID` > 0 AND `Classname` = ('VaultStorageLocked') AND `Inventory` <> '[]' AND `Inventory` IS NOT NULL removeObjectEmpty DELETE FROM `object_data` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 24 DAY) AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') OR (`Inventory` = '[[[],[]],[[],[]],[[],[]]]') ) Removes abandoned storage objects and vehiclesremoveDamagedVehicles2 hour DELETE FROM `object_data` WHERE Damage > '0.6' Removes damaged vehiclesCleanupVaults2 hour DELETE FROM `Object_DATA` WHERE Classname='VaultStorageLocked' AND inventory='[]' AND Datestamp < NOW() - INTERVAL 10 DAY cleans old empty vaultsCleanupOldLogins DELETE FROM Player_LOGIN WHERE Datestamp < NOW() - INTERVAL 10 DAY cleans old loginsCleanupOldCharacters2 hour DELETE FROM Character_DATA WHERE LastLogin < NOW() - INTERVAL 10 DAY cleans old charactersCleanupDeadCharacters2 hour DELETE FROM Character_DATA WHERE Alive=0 AND LastLogin < NOW() - INTERVAL 1 DAY cleans dead If you still don't understand how to implement an event and need help, post here and I will try and help out. JellyMan, merlin777 and Ryan Pennington 3 Quote Share this post Link to post Share on other sites More sharing options...
creativv 0 Report post Posted March 27, 2015 Thank you Bilco for this information . Quote Share this post Link to post Share on other sites More sharing options...
Bilco 41 Report post Posted March 27, 2015 I forgot to mention that the update stock daily event is only used for the non mission traders. This means that if your traders are configured in your mission pbo because you're using the coin system, that specific event is useless as it only updates the traders in the mysql. Quote Share this post Link to post Share on other sites More sharing options...
Ryan Pennington 359 Report post Posted March 30, 2015 Thanks for this awesome tutorial, Bilco. Pinned & formatted. Quote Share this post Link to post Share on other sites More sharing options...
Bilco 41 Report post Posted March 30, 2015 Thanks for this awesome tutorial, Bilco. Pinned & formatted. No problem. Thanks for the pin and cleaning up my mess. Quote Share this post Link to post Share on other sites More sharing options...
merlin777 4 Report post Posted October 1, 2016 I forgot to mention that the update stock daily event is only used for the non mission traders. This means that if your traders are configured in your mission pbo because you're using the coin system, that specific event is useless as it only updates the traders in the mysql. I thought all Trader inventory is (updated) unlimited replenishment for all Epoch and Non EPOCH versions? ) i.e. overpoch,origins. I also, know that just simply adding the CFG into the mission pbo for EPOCH ONLY, and changing the server_traders call from the init.sqf overrides the use of the database for inventory. I like your setup it's very organized though. good stuff. Thanks for the information Quote Share this post Link to post Share on other sites More sharing options...
Emma Johnson 0 Report post Posted March 25, 2023 This article is very good, it is very helpful to me, let me learn more knowledge, thank the author for sharing. Quote Share this post Link to post Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.