#Item in item frames grant

1 messages · Page 1 of 1 (latest)

tropic harness
#

It going out of the item frame is less work

#

Name the key something unique

#

Let's say "k1"

#

the player approaches the item frame

#

They tap it, it goes out of the item frame

#

And then

#

/scoreboard objectives add k dummy
(Chat command)

Repeating command blocks always active
/execute at @e[type=item,name=k1] run /scoreboard players add @e[type=player,r=6,c=1,scores={k=0}] k 1

/kill @e[type=item,name=k1]

/execute as @e[type=player,scores={k=1}] at @s if entity @e[type=item,name=k1,r=6] run /tellraw @s {"rawtext":[{"text":"You already have "},{"score":{"name":"*","objective":"k"}},{"text":"/4 keys!"}]}

#

Make it continuously clone the item frame

#

The /kill just makes it so people can't pick up the item

tropic harness
#

This is for the second key

tropic harness
# tropic harness This is for the second key

Repeating command blocks always active
/execute at @e[type=item,name=k3] run /scoreboard players add @e[type=player,r=6,c=1,scores={k=2}] k 1

/kill @e[type=item,name=k3]

/execute as @e[type=player,scores={k=3}] at @s if entity @e[type=item,name=k3,r=6] run /tellraw @s {"rawtext":[{"text":"You already have "},{"score":{"name":"*","objective":"k"}},{"text":"/4 keys!"}]}

#

Repeating command blocks always active
/execute at @e[type=item,name=k4] run /scoreboard players add @e[type=player,r=6,c=1,scores={k=3}] k 1

/kill @e[type=item,name=k4]

/execute as @e[type=player,scores={k=4}] at @s if entity @e[type=item,name=k4,r=6] run /tellraw @s {"rawtext":[{"text":"You already have "},{"score":{"name":"*","objective":"k"}},{"text":"/4 keys!"}]}

#

Actually let me check if you can use / in tellraw

#

Yeah should be fine

tropic harness
#

Nope

#

These work everywhere

#

Put them close enough