Jump to content

On chest inventory click: ???


Mrbizarre

Recommended Posts

that works for any inventory. including chests

  • Thanks 1

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

32 minutes ago, Mrbizarre said:

Uh it didn't understand the event?

 

what did you use

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

On 12/4/2021 at 8:19 PM, Mrbizarre said:

It doesnt work cause my code will only register when you pick the item up in the inventory and place it in the inventory how can i just make it work when you click it? @_Tarna_

if you're using skript-gui you can use this: (only with GUIs from the plugin)
 

format gui slot 5 with dirt:
	kill player


Otherwise if you're trying to do something on an item click without skript-gui, try this:

on inventory click:
	name of player's inventory is "&eMy Inventory"
	if event-slot = 5:
		cancel event
		kill player

 

Edited by AgentGamerPro

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

Owner of Lifestealed, Labs, Encore, UNOfficially and Observed
 

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 - 5/8/2024

[MOD] 5/8/2024 - Present

 

Link to comment
Share on other sites

on inventory click:
	if name of event-inventory is "Chest" #or whatever the chest is named"
		cancel event
		send "You clicked on slot %event-slot%!" to player

This is basic skript, no addons needed (skript has gui support)

Main MC account: Gam3rBoi (VIP in MH)

Alt MC account: *Gam3rBoi2147

Farcade server owner

Skripter with 6+ months experience + time learning coding concepts

Message me through the forums if you need anything!

Link to comment
Share on other sites

25 minutes ago, Gam3rBoi said:
on inventory click:
	if name of event-inventory is "Chest" #or whatever the chest is named"
		cancel event
		send "You clicked on slot %event-slot%!" to player

This is basic skript, no addons needed (skript has gui support)

ye ik, but for the other skript needed the plugin skript-gui

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

Owner of Lifestealed, Labs, Encore, UNOfficially and Observed
 

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 - 5/8/2024

[MOD] 5/8/2024 - Present

 

Link to comment
Share on other sites

5 minutes ago, AgentGamerPro said:

ye ik, but for the other skript needed the plugin skript-gui

I was just giving another example ❤️

Main MC account: Gam3rBoi (VIP in MH)

Alt MC account: *Gam3rBoi2147

Farcade server owner

Skripter with 6+ months experience + time learning coding concepts

Message me through the forums if you need anything!

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...