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 If using named item for craft , cancel event

Discussion in 'Skript' started by Flowy, May 29, 2020.

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

    Flowy New Member

    Joined:
    May 29, 2020
    Messages:
    6
    Likes Received:
    0
    if use item named "something" for craft , i want to cancel it
    can u guys help me please?
    like this:

    on craft wood:
    if using any log named "Something":
    cancel event
     
  2. IDuckz_

    IDuckz_ Active Member

    Joined:
    Jul 25, 2019
    Messages:
    106
    Likes Received:
    2
    You can use SkBee addon to register custom recipes.
     
    WeeHee likes this.
  3. rustedst

    rustedst Active Member

    Joined:
    Apr 24, 2020
    Messages:
    97
    Likes Received:
    4
    Code (Text):
    1. on craft of (item):
    2.     loop 9 times:
    3.         if slot loop-number of event-inventory is (item) named "Name":
    4.             cancel event
    --- Double Post Merged, May 31, 2020, Original Post Date: May 31, 2020 ---
    This is gonna work only on crafting tables.
    --- Double Post Merged, May 31, 2020 ---
    I think I found a way to make it work on both crafting tables and inventory craft:
    Code (Text):
    1. on craft of (item):
    2.     if type of player's current inventory is "WORKBENCH":
    3.         loop 9 times:
    4.             if slot loop-number of player's current inventory is (item) named "Name":
    5.                 cancel event
    6.     else if type of player's current inventory is "CRAFTING":
    7.         loop 4 times:
    8.             if slot loop-number of player's current inventory is (item) named "Name":
    9.                 cancel event
     
  4. Flowy

    Flowy New Member

    Joined:
    May 29, 2020
    Messages:
    6
    Likes Received:
    0
    Thank you very much this worked!


    Thank you but i prefer skript :emoji_slight_smile:
     
Thread Status:
Not open for further replies.

Share This Page

Loading...