Error on on Damage Event

  • 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.

koucha2525

Member
Mar 10, 2020
1
0
0
I created a status by creating an RPG server, but I got an error and couldn't use it. I want to set the damage to the enemy with On damage.

Code:
on damage:
    set {_addDamage} to {Power.%attacker%}
    add {_addDamage} to damage


on right click holding a sugar:
    open chest with 1 row named "<red>ステータス画面" to player
    wait 1 tick
    set slot 0 of player's current inventory to apple named "<bold>&dHealth&a %{Health.%player%}%"
    set slot 1 of player's current inventory to iron sword named "<bold><red>Power&a %{Power.%player%}%"
    set slot 2 of player's current inventory to blaze powder named "<bold>&bSpeed&a %{Speed.%player%}%"
    set slot 3 of player's current inventory to iron chestplate named "<bold>&7Difense&a %{Difense.%player%}%"
    set slot 4 of player's current inventory to nether star named "<bold>&7Luck&a %{Luck.%player%}%"


on inventory click:
    if inventory name of player's current inventory is "<red>ステータス画面":
        cancel event
        if clicked slot is 0:
            if {zyukurendo.%player%} is more than 1:
                add 1 to {Health.%player%}
                message "<green>Healthを強化しました"
                add 1 to the player's max health
                add -1 to {zyukurendo.%player%}
            else:
                message "<red>熟練度が足りません!"
        if clicked slot is 1:
            if {zyukurendo.%player%} is more than 1:
                add 1 to {Power.%player%}
                message "<green>Healthを強化しました"
                add -1 to {zyukurendo.%player%}
            else:
                message "<red>熟練度が足りません!"
 
Status
Not open for further replies.