need some help pls

  • 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.

Dxn

New Member
Nov 8, 2021
8
0
1
18
Code:
on right click on cobblestone stair:
    set {_smelter} to a chest inventory with 3 row with name "&6Test"
    set slots (integers from 0 to 26) of {_smelter} to {inventory::%event-block's location%::*}
    open {_smelter} to player
    set slot 18 of player's current inventory to white stained glass pane of power 14 named " "
on inventory close:
    if name of event-inventory is "&6Test":
        loop 26 times:
            set {inventory::%location of target block of player%::*} to slots (integers from 0 to 26) of player's current inventory
on inventory click:
    inventory name of current inventory of player is "&6Test":
        if clicked raw slot is 18 or 19 or 20:
            cancel event
        if event-slot is white stained glass pane of power 14 named " ":
            if slot 10 or 11 or 12 or 13 or 14 or 15 or 16 of event-inventory is oak wooden log:
                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
[doublepost=1637923574,1637849152][/doublepost].
 
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
 
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
At the moment it works but since I have the set slot thing on right click
 
Code:
on right click on cobblestone stair:
    set {_smelter} to a chest inventory with 3 row with name "&6Test"
    set slots (integers from 0 to 26) of {_smelter} to {inventory::%event-block's location%::*}
    open {_smelter} to player
    set slot 18 of player's current inventory to white stained glass pane of power 14 named " "
on inventory click:
    if clicked raw slot is 18:
        cancel event
    if slot 10 of event-inventory is oak wooden log:
        send "Test" to player
        if clicked raw slot is 19:
            set slot 18 of event-inventory to white stained glass pane of power 15 named " "
on inventory close:
    if name of event-inventory is "&6Test":
        loop 26 times:
            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
 
Status
Not open for further replies.