#Fortune help

1 messages · Page 1 of 1 (latest)

queen iris
#
    player's gamemode is not creative
    if event-block is not a beacon:
        set {_fortune} to level of fortune of the player's tool
        clear drops
        set {_random} to a random integer from 1 to 50
    if {_random} is between 1 and 25:
        give {_fortune} of event-block's drops to player
    else if {_random} is between 26 and 50:
        give 1 of event-block's drops to player
    if {_fortune} >= 60:
        give (level of fortune on player's tool - 20) of event-block's drops to player
    else if event-block is a beacon:
        clear drops
        give player 1 beacon
    else if event-block is a shulker:
        clear drops
        give player shulker```
#

that's the complete thing but whenever i break a shulker it gives me the shulker with fortune

#

how can i fix that?

quiet pond
#

well

#

thats what your code is doing

#

being a beacon is binary. A block either is, or isnt

queen iris
#

so do i remove the first if event-block is a beacon?

#

or what would you recomend i do

quiet pond
#

well

#

your else is after the {_fortune} conditions, not the blocks

#

meaning fortune must be less than 60 for the beacon thing to run

queen iris
#

so i should put else if event-block is a beacon: clear drops give player 1 beacon else if event-block is a shulker: clear drops give player shulker this before the skript?

quiet pond
#

well no

#

because it will still trigger for a shulker box

#

"if event-block is not a beacon:"

#

re order them better

#
else if = shulker
else:```
queen iris
#

oohh

#

i did that

#

but it still gives more then 1 shulker

#

but the beacon works

#
    player's gamemode is not creative:
        if event-block = beacon:
            clear drops
            give player 1 beacon
        else if event-block = shulker:
            clear drops
            give player shulker 
        else:``` i did it like that
#

did i do it wrong?

#

there is more after the else but i didnt send it cuz that part works

quiet pond
#

shulker is an entity..