#potion apply

1 messages · Page 1 of 1 (latest)

burnt maple
#

on death:
if player has permission "voucher":
set {_potion1} to infinite potion effect of strength of tier 2
set {_potion2} to infinite potion effect of speed of tier 2
set {_potion3} to infinite potion effect of fire resistance of tier 1
apply {_potion1} to player
apply {_potion2} to player
apply {_potion3} to player

#

hi, how can i fix this

hazy bridge
burnt maple
#
    if victim has permission "voucher":
        set {_potion1} to infinite potion effect of strength of tier 2
        set {_potion2} to infinite potion effect of speed of tier 2
        set {_potion3} to infinite potion effect of fire resistance of tier 1
        apply {_potion1} to player
        apply {_potion2} to player
        apply {_potion3} to player```
#

i switched to this

#

but it doesnt work either

hazy bridge
#

okay,

#

notice how you still have player in some parts?

#

you can also use a list to apply all the potions at once

burnt maple
#

worked ty

burnt maple
#

when i die i get the effects but only for like 1 second even though they show for infinite duration

hazy bridge
#

probably because you die, and minecraft (by default) removes potion effects when that happens. You can use on respawn: instead

burnt maple
#

oh alr

#

tysm!

burnt maple
#
    if player is holding a paper named "&etest":
        if player doesn't have permission "voucher":
            execute console command "lp user %player% permission set voucher"
            remove 1 paper named "&etest" from player's inventory
        else:
            cancel event```
#

no errors but doenst work

#

i dont get permission paper doesnt go

#

(even tho i dotn have the perm)

hazy bridge
#
  1. You can use on right-click with paper: to filter the event to only:
  • right-clicks (as opposed to left-clicks and inventory-clicks as well)
  • trigger when the player's tool = paper
  1. (A little more advanced), consider using a custom NBT tag to check for the voucher, that way players cant rename normal paper and cheese the system
  2. You can try debugging, such as broadcast "You have the permission" in the if statement, and broadcast "You dont have the permission" in the else
burnt maple
#

okey tysm