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.

Solved set slots for player crafting slots

Discussion in 'Skript' started by saad3modeyy, Jun 30, 2020.

  1. saad3modeyy

    saad3modeyy Member

    Joined:
    Mar 14, 2020
    Messages:
    24
    Likes Received:
    0
    I wanna to cancel crafting on player's inventory so I try to do this
    Code (Text):
    1. loop integers between 0 and 200:
    2.     set slot loop-number of player to black stained glass pane named "  "

    to know if I can set the that slots with
    Code (Text):
    1. set slot <slot> of player to 1 red stained glass pane named "  "
    but it does't work heres an image http://prntscr.com/t8ykrp

    i think that doesnt work that way so anyone know how ican do it pls reply
    :emoji_slight_smile:
     
  2. Baezor

    Baezor Member

    Joined:
    Jan 3, 2020
    Messages:
    14
    Likes Received:
    3
    You can cancel crafting by using the on craft event.
    Code (Text):
    1. on craft:
    2.     cancel event
     
  3. saad3modeyy

    saad3modeyy Member

    Joined:
    Mar 14, 2020
    Messages:
    24
    Likes Received:
    0
    no I wanna the player to use crafting table but when use the inventory crafting cancel it
     
  4. Baezor

    Baezor Member

    Joined:
    Jan 3, 2020
    Messages:
    14
    Likes Received:
    3
    You can check if the player is using a crafting table then. This is untested code, but it should work.
    Code (Text):
    1. on right click on crafting table:
    2.     set {craft::%player%} to true
    3. on craft:
    4.     {craft::%player%} is not true
    5.     cancel event
    6. on inventory close:
    7.     delete {craft::%player%}
     
  5. saad3modeyy

    saad3modeyy Member

    Joined:
    Mar 14, 2020
    Messages:
    24
    Likes Received:
    0
    yes that works thank u
     
Loading...