Jump to content

Finding GUI Slot In Function


Recommended Posts

		format slot 14 of player with anvil named "&8&lSmithing Tool" with lore "&a", "&7Put a item in the empty slot", "&7and click the anvil.", "&a", "&7This will add a bonus to your", "&7selected item." , "&a" and "&c&lWARNING: IRREVERSIBLE" to run [SmithTest(player)]

function SmithTest(p: player):
	set {_u} to uuid of {_p}
	set {_Item} to slot 12 of {_p}
	if {_item} is not air:
		give {_p} {_item}
		send "&cWrong slot :/" to {_p}

Im having a problem finding the right slot during a function while a GUI is open. the first line is when a player right clicks an NPC named "Black  Smith". They are supposed to put in an item. To test i want to click slot 14 o fthe GUI to run the function, and find the slot (12) in the gui and give them the item. But I don't think it searches the GUI, instead it searches my inventory. pls help ive struggled for days.




Lifestealed | Minecraft Servers

OG [VIP] 12/26/20 - 10/27/2021
OG [PRO] 12/27/21 - 11/18/2022
OG [LEGEND] 11/18/2022 - 3/14/2023
[DEFAULT] 3/14/2023 - Present


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
  • Create New...