#"on player armor change" - taking damage updates Counts?

1 messages · Page 1 of 1 (latest)

low sierra
#

Am i missing something on this., I only want to update the count on armor change (ie, Change from Chest plate to Elytra, Not every time the player takes damage)

on player armor change
Get the old/new item in an armor change event. Defaults to new. When using set, it will set the slot that was changed, old/new will make no difference in this case. Requires Paper 1.12.2+

Skript Version: 2.6.4 - Problems with latest dev build
SkBee version: 2.16.1

%{Posidencount::%player%}% updates its value when the player takes damage?

on player armor change:
    If name of event-item is {@Dragonwing} or {@PoseidonHelmet}:
        broadcast "Damage!! %{Posidencount::%player%}%"
        if {Posidencount::%player%} <= -1:
            set {Posidencount::%player%} to 0
        if {Posidencount::%player%} >= 5:
            set {Posidencount::%player%} to 0
            add 1 to {Posidencount::%player%}```
fast crag
#

You need to ‘close’ the code block

#

Also last line indentation error

#

Why set it to 0 then add 1? Just set it to 1

#

And use uuid variables

low sierra
fast crag
#

Whats the issue

low sierra
#

When the player takes damage, It increases the Posidencount

fast crag
#

Theres no on damage event

#

So it shouldnt

#

Unless theres more code

low sierra
low sierra
fast crag
#

Youre broadcasting “damage!!”

#

Is that what you mean?

#

Based on the screenshot

low sierra