Jump to content
  • 0

[REQUEST] Safe and doors to "0000"/"000" combo after 30 days


Tricks

Question

I would like to add a script that would set safes and door combos to all "0" after 30 days for abandoned bases. Even better it's marked on a map as a mission. I know there is a script out there already similar but I know it doesn't work for 1.0.5.1/112555. Hoping for a new one!

Thanks!

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

I achieve this result by running sql database events. For instance to change safecodes to 1234 after 14 days of not being updated we run this event every hour to check the database for such safes

 

UPDATE `object_data` SET `CharacterID`='1234' WHERE `Classname` = 'VaultStorageLocked' AND `object_data`.`LastUpdated` <= DATE_SUB(CURRENT_DATE, INTERVAL 14 DAY)

 

Where INTERVAL X DAY is the amount of days not changed/updated.

For doors and Lockboxes just change the `Classname` to the object to change the code and the `CharacterID` would be the NEW code. Players would need to "re-place" the object to change the code back.

Players would be able to keep their code from changing by selecting Maintain Area via PlotPole. Though on my server i converted Maintain Area to Update Area. Kind of the same thing but it dont repair any damage done as I have indestructable bases enabled.

 

Before messing with ANYTHING in the database always remember to BACKUP.

 

As for the markers I personally have never tried to do that yet. To me its more fun to find them.

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...