Solved How to identify blocks

  • Welcome to skUnity!

    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 comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

memes

Member
Jun 24, 2018
23
2
3
24
Hi, I am working on a Skript for my server. It is a quest script and I want the players to click on a specific chest to then open a GUI but my issue right now is that any chest you click on opens the GUI, how do I specify one?
 
Do you want it to be a chest at a specific location, or with specific items in it or something else?
 
Do you want it to be a chest at a specific location, or with specific items in it or something else?
I think they mean in a specific location. There are two ways you can do this:

#1 - Using World Guard regions. To me this is the fastest solution:
code_language.skript:
on rightclick on a chest:
    "%region at clicked block%" contains "insertregionhere"
    # do stuff
#2 - Checking if the clicked block is at given coordinates:
code_language.skript:
on rightclick on a chest:
    block at location at 0, 0, 0 in world "insertworldhere" is clicked block
    #do stuff
 
  • Like
Reactions: memes
Status
Not open for further replies.