Drop Chest

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

SafaYVS

Member
Jun 22, 2018
30
0
0
26
when the chest is full, item to drop at block location


Code:
every 10 second:
    loop {coinspawner::*}:
        set {_owner} to asb owner of island at loop-value
        if {_owner} is online:
            add 1 prismarine crystals named "&eCoin" to inventory of block at loop-value
 
Last edited:
i cant find the code block inventory is full
You can use the link I sent you. If the inventory can't hold the item you're trying to add, it's full
 
Mann, I can't find the code, I just want the code,
You can't find it, you have to type it. Not every possible code is on the docs in examples, but it's all in syntax
 
Code:
every 10 seconds:
    loop {coinspawner::*}:
        set {_owner} to asb owner of island at loop-value
        if {_owner} is online:
            set {_inv} to inventory of block at loop-value
            set {_loc} to location of block at loop-value
            
            if {_inv} has enough space for 1 prismarine crystal:
                add 1 prismarine crystals named "&eCoin" to {_inv}
            else:
                drop 1 prismarine crystals at {_loc}

not tested, but it should work(?)
 
It works, but the drop is immediately removed.
Code:
every 10 seconds:
    loop {coinspawner::*}:
        set {_owner} to asb owner of island at loop-value
        if {_owner} is online:
            set {_inv} to inventory of block at loop-value
            set {_loc} to location of block at loop-value
           
            if {_inv} has enough space for 1 prismarine crystal:
                add 1 prismarine crystals named "&eCoin" to {_inv}
            else:
                drop 1 prismarine crystals at {_loc}

not tested, but it should work(?)
[doublepost=1559899941,1559899159][/doublepost]okey no problem its works thank.
 
ok perfect! i think the problem is the location where it spawns and some buggy stuff...
but i'm sure the item is spawning..
 
Status
Not open for further replies.