Jump to content
  • 0

Vehicle Cleanup Scripts


BennyD101

Question

Hi so i'm running these in my sql and it comes up green saying it was successful, how do i view or edit them as it does not show as an event, trigger or routine ?,

https://epochmod.com/forum/topic/43764-epoch-1061-clean-up-scripts/

i dont want to run them all i want to set only my selected amount for example:

-- ----------------------------
-- Set safe combinations to 0000 after 10 days of inactivity.
-- ----------------------------
UPDATE `object_data`
SET `CharacterID` = 0
WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 10 DAY)
AND `CharacterID` > 0
AND `Classname` = "VaultStorageLocked"
AND `Inventory` <> '[]'
AND `Inventory` IS NOT NULL;

this runs but doesn't create any event

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0
1 hour ago, BennyD101 said:

Hi so i'm running these in my sql and it comes up green saying it was successful, how do i view or edit them as it does not show as an event, trigger or routine ?,

https://epochmod.com/forum/topic/43764-epoch-1061-clean-up-scripts/

i dont want to run them all i want to set only my selected amount for example:


-- ----------------------------
-- Set safe combinations to 0000 after 10 days of inactivity.
-- ----------------------------
UPDATE `object_data`
SET `CharacterID` = 0
WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 10 DAY)
AND `CharacterID` > 0
AND `Classname` = "VaultStorageLocked"
AND `Inventory` <> '[]'
AND `Inventory` IS NOT NULL;

this runs but doesn't create any event

What you have there is just the code it will run, i.e if you were running it manually, what you want is the actual event:

CREATE DEFINER=`epoch106`@`%` EVENT `UnlockLockBox` ON SCHEDULE EVERY 1 DAY STARTS '2017-01-31 20:59:00' ON COMPLETION NOT PRESERVE ENABLE COMMENT 'Resetting Lockbox code to RED 00 after 21 days' DO UPDATE `Object_DATA` SET `CharacterID` = '10000' WHERE `Classname` = 'LockboxStorageLocked' AND `Object_DATA`.`LastUpdated` <= DATE_SUB(CURRENT_DATE, INTERVAL 21 DAY)

CREATE DEFINER=`epoch106`@`%` EVENT `UnlockLockedSafe` ON SCHEDULE EVERY 1 DAY STARTS '2017-01-31 20:59:00' ON COMPLETION NOT PRESERVE ENABLE COMMENT 'Resets abandoned safes to 0000 after 21 days' DO UPDATE `Object_DATA` SET `CharacterID`='0' WHERE `Classname` = 'VaultStorageLocked' AND `Object_DATA`.`LastUpdated` <= DATE_SUB(CURRENT_DATE, INTERVAL 21 DAY)

That's an export from my database, called epoch106, substitute that with your database name.

Though, I could not get that to import for some reason despite being an export.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...