Code:
every 5 seconds:
loop all players:
loop blocks in radius 5 around loop-player:
loop-block is a fire or lava:
add player to {temperatura.fuego::*}
add 0.25 to {temperatura.actual.%loop-player%} if {temperatura.actual.%loop-player%} < 37.4
send "&aFuego si -> Recibe calor: &e%{temperatura.fuego.%loop-player%}%" to loop-player
loop-block is torch:
add player to {temperatura.antorchasuelo::*}
add 0.25 to {temperatura.actual.%loop-player%} if {temperatura.actual.%loop-player%} < 37.4
send "&aFuego antorcha suelo si -> Recibe calor: &e%{temperatura.antorchasuelo.%loop-player%}%" to loop-player
loop-player is holding a torch:
add player to {temperatura.antorchamano::*}
add 0.1 to {temperatura.actual.%loop-player%} if {temperatura.actual.%loop-player%} < 37.4
send "&aAntorcha en mano si -> Recibe calor: &e%{temperatura.antorchamano.%loop-player%}%" to loop-player
Everything works fine until it reaches the last condition. It works but the last message repeats it in an infinite loop. The code continues, so I can not place a stop at the end (also, if I do the two conditions above do not work).
On the other hand, if I execute the same code of the last condition apart, everything works fine.
Code:
every 5 second:
loop all players:
loop-player is holding a torch:
add player to {temperatura.antorchamano::*}
add 0.1 to {temperatura.actual.%loop-player%} if {temperatura.actual.%loop-player%} < 37.4
send "&aAntorcha en mano si -> Recibe calor: &e%{temperatura.antorchamano.%loop-player%}%" to loop-player
The message is not repeated, it only shows it once (as expected).
Where is the problem?