Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.
If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!
Now, what are you waiting for? Join the community now!
You can always check out skUnity Downloads for downloads and any other information about Skript!
open virtual chest inventory named "test" with 3 rows to player
format gui slot 10 of player with 5 of stone to do nothing
# or the other way around, for more complex stuff
create a gui with virtual chest inventory named "test" with 3 rows:
format next gui with 3 of stone named "test" to do nothing
open last gui to player
# Learn more about this system here: https://github.com/Tuke-Nuke/TuSKe/wiki/GUI-Manager
open chest inventory named "test" with 3 rows to player
set slot 3 of current inventory to 3 of stone named "test"
on inventory click:
if display name of event-inventory is "test":
cancel event
ah, if that's the case then just listen the inventory click event check if the event-slot is between 10 and 12.What if block slot 10-12? I meant the [E] key inventory.
This looks like a XY problem, please explain what you're trying to do instead.what if i wanna check it in on pickup event?
You'd need a more advanced solution for this where you handle pickup events yourself since there isn't any way to actually lock slots. The basic logic would be something like:
1. Listen for pickup events and loop through the slots in the user's inventory by number.
2. Store all of the "unlocked" slot numbers that are available (don't contain an item) in a list.
3. Cancel the pickup event. If the size of the unlocked available slot list is 0, do nothing (there are no valid slots so they shouldn't pick up the item). Otherwise, fill the first available slot number (first element in the list) with the items from the dropped item, and delete the dropped item.