How to Change original status for another player?

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

no_min

Member
Jun 8, 2022
2
0
1
Original status is For example, maximum Mana value, etc...

The default Health is
Code:
command /sethealth <player> [<number>]:
    trigger:
        {@use-permission} is true:
            player do not have permission "{@permission}":
                send "{@prefix}: &4{@permission-message}"
                stop
            if arg-1 is set:
                if arg-2 is set:
                    set the max health of the arg-1 to arg-2
                    set the health of the arg-1 to arg-2
This is valid for this, but the original status, mana value
Code:
command /setmana <player> [<int>]:
    trigger:
        {@use-permission} is true:
            player do not have permission "{@permission}":
                send "{@prefix}: &4{@permission-message}"
                stop
            if arg-1 is set:
                if arg-2 is set:
                    set the {mana.%player%} of the arg-1 to arg-2
                    set the {maxmana.%player%} of the arg-1 to arg-2
This would cause an error.

The errors are
'argment(s)' cannnot be used if the command has multiple argment Use 'argmennt 1', 'argment 2', etc instead
Line: set the {mana.%player%} of the arg-1 to arg-2
Line: set the {maxmana.%player%} of the arg-1 to arg-2

in passing
Code:
command /setmanaregen <player> [<int>]:
    trigger:
        {@use-permission} is true:
            player do not have permission "{@permission}":
                send "{@prefix}: &4{@permission-message}"
                stop
            if arg-2 is set:
                set {manaregen.%player%} to arg-2
If I put another player in <player>, my status is changed.
I don't know why.
[doublepost=1654938126,1654937337][/doublepost]Sorry, the following code
Code:
 set the {mana.%player%} of the arg-1 to arg-2
set the {maxmana.%player%} of the arg-1 to arg-2
I was able to do it after changing the name to
Code:
set {mana.%arg-1%} to arg-2
set {maxmana.%arg-1%} to arg-2
 
Status
Not open for further replies.