Solved Adding items to a 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.

BrownMee

Active Member
Apr 16, 2018
126
6
18
23
code_language.skript:
on break of stone:
    wait 2 ticks
    set location of targeted block to {treasure}
    set {treasure} to chest
    wait 5 ticks
    add 5 torch to {treasure}'s inventory

Not sure why this doesn't work. HMMM?
 
code_language.skript:
on break of stone:
    wait 2 ticks
    set location of targeted block to {treasure}
    set {treasure} to chest
    wait 5 ticks
    add 5 torch to {treasure}'s inventory

Not sure why this doesn't work. HMMM?
This maybe:
code_language.skript:
on break of stone:
    wait 2 ticks
    set {treasure} to targeted block
    wait 5 ticks
    add 5 torch to {treasure}'s inventory
 
Worst. Now it doesn't even spawn the chest...
Well it's hard to help someone when they don't explain their problem:
code_language.skript:
on break of stone:
    wait 2 ticks
    set {treasure} to targeted block
    set block at {treasure} to chest
    wait 5 ticks
    add 5 torch to {treasure}'s inventory
 
Well it's hard to help someone when they don't explain their problem:
code_language.skript:
on break of stone:
    wait 2 ticks
    set {treasure} to targeted block
    set block at {treasure} to chest
    wait 5 ticks
    add 5 torch to {treasure}'s inventory
I want the 5 torch to add into the chest that spawned.
 
code_language.skript:
on break of stone:
    wait 2 ticks
    set location of targeted block to {treasure}
    set {treasure} to chest
    wait 5 ticks
    add 5 torch to {treasure}'s inventory

Not sure why this doesn't work. HMMM?
try this. didn't test it but try it
code_language.skript:
on break of stone:
    wait 2 ticks
    set {treasure} to event-block's location
    set block at {treasure} to chest
    wait 5 ticks
    set {treasureblock} to block at {treasure}
    add 5 torch to {treasure}'s inventory
 
try this. didn't test it but try it
code_language.skript:
on break of stone:
    wait 2 ticks
    set {treasure} to event-block's location
    set block at {treasure} to chest
    wait 5 ticks
    add 5 torch to {treasure}'s inventory
Tried. Empty chest :emoji_frowning:
 
Tried. Empty chest :emoji_frowning:
code_language.skript:
on break of stone:
    wait 2 ticks
    set {treasure} to event-block's location
    set block at {treasure} to chest
    wait 5 ticks
    set {treasureblock} to block at {treasure}
    add 5 torch to {treasureblock}'s inventory
I tested this, it works
 
Well it's hard to help someone when they don't explain their problem:
code_language.skript:
on break of stone:
    wait 2 ticks
    set {treasure} to targeted block
    set block at {treasure} to chest
    wait 5 ticks
    add 5 torch to {treasure}'s inventory
I tested this one and it works for me
 
T
code_language.skript:
on break of stone:
    wait 2 ticks
    set {treasure} to event-block's location
    set block at {treasure} to chest
    wait 5 ticks
    set {treasureblock} to block at {treasure}
    add 5 torch to {treasureblock}'s inventory
I tested this, it works
Thanks!!
 
  • Like
Reactions: Dabriel
Status
Not open for further replies.