Jump to content

[Help] How to make an item(s) give the player a buff when inside a custom backpack?


Recommended Posts

Hello everyone!

I'm pretty new to coding and having some trouble adding a perk for my modded character. She has a custom backpack that allows doll-like items to give the player a buff when they are inside the custom backpack.

I had someone help code it, but it didn't work, and I tried coding it myself, which didn't work either.

So if anyone would help me with this, it would be much appreciated.

 

dollpack.lua

Link to comment
Share on other sites

Are doll-like items stackable? If they are not, let them listen this five events: 

"onputininventory", "ondropped", "onownerputininventory", "onownerdropped", "onremove".

Or make your backpack listen "itemget" and "itemlose".

Edited by LeafyFly
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
 Share

×
  • Create New...