#potion effect code

1 messages · Page 1 of 1 (latest)

tawny flame
#

```vb
code```

#

example

dapper plinth
#

And please please please combine those armour change events

#

Then you just need an else

spring anchor
# dapper plinth And please please please combine those armour change events

command /samuraichestplate:
permission:op
trigger:
give player unbreakable netherite chestplate named "&6&lSamurai &6&lChestplate" with lore "" and "&6&lAbilities:" and "&6&lLets you harness the power of fire resistance"

on armor change:
if event-item is netherite chestplate named "&6&lSamurai &6&lChestplate":
apply fire resistance to player for 10000000000000000000000000000000000000000000000000000000000 seconds
else if remove fire resistance from player Im trying to use else but it says Can't understand this effect "else"

dapper plinth
#

code blocks

spring anchor
dapper plinth
#

and why not make one command with an argument rather than a command for each item?

#

" Im trying to use else but it says Can't understand this effect "else""
you need a colon, its a seciton

dapper plinth
#

makes your code look nice

dapper plinth
#

elses need to go after an if, you cant use that for the first one

dapper plinth
#

noo

#

i mean

  #stuff
else if a = c:
  #other```the first if statement is just `if`, then others after (below) can be `else if`s
spring anchor
#

on armor change:
if event-item is netherite chestplate named "&6&lSamurai &6&lChestplate":
apply fire resistance to player for 10000000000000000000000000000000000000000000000000000000000 seconds
else if event-item is not netheite chestplate named "&6&lSamurai &6&lChestplate":
remove fire resistance from player
code

#

like that?

dapper plinth
#

no

#

you need to fix the indentation, and the ` goes before and after the code, dont just paste "```code```" after

#

like
```on death:
set the death message to "%victim% died"```
turns intoon death: set the death message to "%victim% died"

dapper plinth
#

send full code

spring anchor
#
        permission:op
        trigger:
                give player unbreakable netherite chestplate named "&6&lSamurai &6&lChestplate" with lore "" and "&6&lAbilities:" and "&6&lLets you harness the power of fire resistance"


on armor change:
  if event-item is netherite chestplate named "&6&lSamurai &6&lChestplate":
  apply fire resistance to player for 10000000000000000000000000000000000000000000000000000000000 seconds 
  else if:
  remove fire resistance from player```
dapper plinth
#

yeah its indentation

#

"10000000000000000000000000000000000000000000000000000000000 seconds" just do like 1 day

#

and that should just be an else:

#

although it would remove it regardless of if they are wearing other samurai armour

spring anchor
dapper plinth
#

if statements open up a section, so you have to indent

spring anchor
dapper plinth
spring anchor
dapper plinth
#

yeah

#

well

#

turn off reply pings

#

and send the code