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

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

why doesn't this work ("on rightclick on enchanting table" is error)

Discussion in 'Skript' started by iFlyi, Jun 28, 2020.

Thread Status:
Not open for further replies.
  1. iFlyi

    iFlyi Member

    Joined:
    Jun 28, 2020
    Messages:
    1
    Likes Received:
    0
    on rightclick on enchanting table:
    cancel event
    set the player's level to {player.level}
    open chest with 5 rows named "&6&lEnchanting Table" to player
    format slot 0 of player with light blue stained glass named "" to be unstealable
    format slot 1 of player with light blue stained glass named "" to be unstealable
    format slot 2 of player with light blue stained glass named "" to be unstealable
    format slot 3 of player with diamond named "&b%player%: %{player.level}% exp" to be unstealable
    format slot 4 of player with light blue stained glass named "" to be unstealable
    format slot 5 of player with light blue stained glass named "" to be unstealable
    format slot 6 of player with light blue stained glass named "" to be unstealable
    format slot 7 of player with light blue stained glass named "" to be unstealable
    format slot 8 of player with light blue stained glass named "" to be unstealable
     
  2. xflyer_23

    xflyer_23 Member

    Joined:
    May 12, 2020
    Messages:
    15
    Likes Received:
    0
    Code (Text):
    1. #NOTE
    2. #when you end a line off with a colon you must indent the next line
    3. #example:
    4. #
    5. #on rightclick on stick:
    6. #    send "It Works!"        
    7.  
    8. on rightclick on enchanting table:
    9.     cancel event
    10.     set the player's level to {player.level}
    11.     open chest with 5 rows named "&6&lEnchanting Table" to player
    12.     format slot 0 of player with light blue stained glass named "" to be unstealable
    13.     format slot 1 of player with light blue stained glass named "" to be unstealable
    14.     format slot 2 of player with light blue stained glass named "" to be unstealable
    15.     format slot 3 of player with diamond named "&b%player%: %{player.level}% exp" to be unstealable
    16.     format slot 4 of player with light blue stained glass named "" to be unstealable
    17.     format slot 5 of player with light blue stained glass named "" to be unstealable
    18.     format slot 6 of player with light blue stained glass named "" to be unstealable
    19.     format slot 7 of player with light blue stained glass named "" to be unstealable
    20.     format slot 8 of player with light blue stained glass named "" to be unstealable
     
  3. SuperEpps22556

    Joined:
    Oct 3, 2017
    Messages:
    17
    Likes Received:
    2
    Just a few things removed and this works
    Code (Text):
    1. on rightclick on enchanting table:
    2.     cancel event
    3.     open chest with 5 rows named "&6&lEnchanting Table" to player
    4.     wait 5 ticks       #wait may not be needed but I include waits in chest guis
    5.     format slot 0 of player with light blue stained glass named "" to be unstealable
    6.     format slot 1 of player with light blue stained glass named "" to be unstealable
    7.     format slot 2 of player with light blue stained glass named "" to be unstealable
    8.     format slot 3 of player with diamond named "&b%player%: %player's level% exp" to be unstealable
    9.     format slot 4 of player with light blue stained glass named "" to be unstealable
    10.     format slot 5 of player with light blue stained glass named "" to be unstealable
    11.     format slot 6 of player with light blue stained glass named "" to be unstealable
    12.     format slot 7 of player with light blue stained glass named "" to be unstealable
    13.     format slot 8 of player with light blue stained glass named "" to be unstealable
     
Thread Status:
Not open for further replies.

Share This Page

Loading...