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.

need some help pls

Discussion in 'Skript' started by Dxn, Nov 25, 2021.

  1. Dxn

    Dxn New Member

    Joined:
    Nov 8, 2021
    Messages:
    8
    Likes Received:
    0
    Code (Text):
    1. on right click on cobblestone stair:
    2.     set {_smelter} to a chest inventory with 3 row with name "&6Test"
    3.     set slots (integers from 0 to 26) of {_smelter} to {inventory::%event-block's location%::*}
    4.     open {_smelter} to player
    5.     set slot 18 of player's current inventory to white stained glass pane of power 14 named " "
    6. on inventory close:
    7.     if name of event-inventory is "&6Test":
    8.         loop 26 times:
    9.             set {inventory::%location of target block of player%::*} to slots (integers from 0 to 26) of player's current inventory
    10. on inventory click:
    11.     inventory name of current inventory of player is "&6Test":
    12.         if clicked raw slot is 18 or 19 or 20:
    13.             cancel event
    14.         if event-slot is white stained glass pane of power 14 named " ":
    15.             if slot 10 or 11 or 12 or 13 or 14 or 15 or 16 of event-inventory is oak wooden log:
    16.                 set slot 18 of player's current inventory to white stained glass pane of power 15 named " "
    Can someone help me making it so if slots 10 11 12 13 14 15 16 contain oak wooden log, u will be able to turn on the smelter, and if it doesn't contain any oak wooden log, it is automatically disabled, and also if the smelter is turned on and it contains wood, to return coal every 100 ticks inside any empty slot between 10-16 . At the moment my code is kinda f****d up
    --- Double Post Merged, Nov 26, 2021, Original Post Date: Nov 25, 2021 ---
    .
     
  2. KokoPlayzYT

    KokoPlayzYT Member

    Joined:
    Aug 6, 2021
    Messages:
    14
    Likes Received:
    0
    i suggest you if the actions like being enabled or being disabled you can do "set slot" on the inventory click, also if i didn't understand you correctly, please tell what section of the code doesn't work, and if the hole code you sent isn't working, your code is really f****d up. XD
     
  3. Dxn

    Dxn New Member

    Joined:
    Nov 8, 2021
    Messages:
    8
    Likes Received:
    0
    At the moment it works but since I have the set slot thing on right click
     
  4. KokoPlayzYT

    KokoPlayzYT Member

    Joined:
    Aug 6, 2021
    Messages:
    14
    Likes Received:
    0
    do it on the on inventory click event, its much better.
     
  5. Dxn

    Dxn New Member

    Joined:
    Nov 8, 2021
    Messages:
    8
    Likes Received:
    0
    Code (Text):
    1. on right click on cobblestone stair:
    2.     set {_smelter} to a chest inventory with 3 row with name "&6Test"
    3.     set slots (integers from 0 to 26) of {_smelter} to {inventory::%event-block's location%::*}
    4.     open {_smelter} to player
    5.     set slot 18 of player's current inventory to white stained glass pane of power 14 named " "
    6. on inventory click:
    7.     if clicked raw slot is 18:
    8.         cancel event
    9.     if slot 10 of event-inventory is oak wooden log:
    10.         send "Test" to player
    11.         if clicked raw slot is 19:
    12.             set slot 18 of event-inventory to white stained glass pane of power 15 named " "
    13. on inventory close:
    14.     if name of event-inventory is "&6Test":
    15.         loop 26 times:
    16.             set {inventory::%location of target block of player%::*} to slots (integers from 0 to 26) of player's current inventory
    This is my current code, I just can't figure it out... also every time u close it, the slot 18 is automatically set to "white stained glass pane of power 14 named " " even that slot 10 has wood inside and I don't know how to stop that event. And I also can't do it so when slot 10 contains wood it adds a coal to slot 11
     

Share This Page

Loading...