Hi! I've been trying to create a mana skript for my server and I wanted an item to give you more mana. I created a command that did this, and it worked, but when I tried it with an item, it didn't. Here's my code:
All I would like to know is the off-hand syntax for when I loop players. Thanks in advance!
[doublepost=1661553690,1661549981][/doublepost]Nevermind, it was that the variable was set incorrectly.
Code:
variables:
{max.%player%} = 20
{mana.%player%} = {max.%player%}
every 1 second:
loop all players:
if {mana.%loop-player%} != {max.%loop-player%}:
add 1 to {mana.%loop-player%}
every 2 ticks:
loop all players:
if loop-player is holding a stick in off-hand:
{max.%loop-player%} = 25
else:
{max.%loop-player%} = 20
if {mana.%loop-player%} > 20:
{mana.%loop-player%} = 20
send action bar with text "&bMana: %{mana.%loop-player%}%/%{max.%loop-player%}%" to loop-player
All I would like to know is the off-hand syntax for when I loop players. Thanks in advance!
[doublepost=1661553690,1661549981][/doublepost]Nevermind, it was that the variable was set incorrectly.