Jump to content
  • 0
Sign in to follow this  
Tricks

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

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!

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...