#pickup item question

1 messages · Page 1 of 1 (latest)

dense oracle
#

hey, you have made some errors lemme reskript it

#
    attacker is a player
    victim is a player
    if attacker is holding nametag named "&cTag!":
        set {_TAGcooldown} to difference between {tag.%attacker%} and now  
        if {_TAGcooldown} is less than 60 seconds:
            send "&c&lYou can tag another player in %difference between {_TAGcooldown} and 60 seconds%!" to attacker
        else:
            remove nametag named "&cTag!" from attacker's inventory
            add nametag named "&cTag!" to victim's inventory
            set {tag.%victim%} to now
            broadcast "&6&k?????? &chas been tagged by &6%attacker%!"
            send title "&cYou have been tagged!" to victim for 1.5 seconds
            play sound "ENTITY_WITHER_DEATH" at volume 0.15 at pitch 2 to victim
            apply darkness 255 to victim for 15 seconds
            apply blindness 255 to victim for 15 seconds
            
on inventory click:
    if type of player's current inventory is chest inventory or furnace inventory or anvil inventory or ender chest inventory or blast furnace or shulker box inventory or player inventory:
        set {_item} to event-item
        if {_item} is nametag named "&cTag!":
            send "&cNice try! ;)"
            cancel event

on inventory click:
    set {_item} to event-item
    if {_item} is nametag named "&cTag!":``` u had made some minor errors
hidden ravine
subtle badge
#

^

#

this is why youdont just spoon feed

#

now they have no idea what was wrong

#

the only change in the two codes i can see is that they removed the without particles. im a bit busy so i can look into it more later

#

but i wouldnt set the local vars here, you have the expressions right there

hidden ravine
subtle badge
#

honestly, you could just set a var to the current tag holder, do on pickup, then check that and see if they have space in their inventory or something

#

use some named bedrock to make sure it's unstackable too

#

actually, maybe you can just set the event-slot to a nametag on inventory click