Jump to content
Sign in to follow this  
MyPa553ng3r

Server Admin Storage

Recommended Posts

I am new to scripting, so be gentle.  I want to make chests that stay locked, unless the player has a specific item in their inventory.   Besides the key.

Edited by MyPa553ng3r_P1

Share this post


Link to post
Share on other sites

If the player requires a key and an item

Create a dummy chest (locked) and a real chest (it can be unlocked with key)

Then, create a trigger zone around chest.

Event - On zone enter

For each item: Get inventory of Character

If [item] = name (string)

Move real chest to fake chest and despawn fake chest.

Share this post


Link to post
Share on other sites

Or you can setup a Listener to wait for Unlock action on specific chest and and lock it immediately again if the player will not have the item.

image.png

image.png

 

Share this post


Link to post
Share on other sites
56 minutes ago, Rudy.cz said:

Or you can setup a Listener to wait for Unlock action on specific chest and and lock it immediately again if the player will not have the item.

image.png

image.png

 

Did you test it in the editor though? I feel it might be prone to bugs like that

Share this post


Link to post
Share on other sites
34 minutes ago, Igor Q. said:

Did you test it in the editor though? I feel it might be prone to bugs like that

It works, just "Activate on" has to be set to "End"

Share this post


Link to post
Share on other sites

Thank you so much for your help.  I was thinking something along the lines of Admin having an Ylandium sword, and only the ylandium sword would open the chests, activate time and weather levers..... stuff like that.  Sorry Oliver, I realize I was not too clear about it.  But I think I can make it work with the help you all gave me.  Thank you.

  • Upvote 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×