Help me plz fast

Discussion in 'Skript' started by DeTrollers, Apr 19, 2021.

  1. Code (Text):
    on death:
        if attacker is a player:
            if the victim is a zombie:
                drop 1 emerald
                if {contest.%player%} is true:
                    send "&a+1 Zombiekill" to attacker
                    add 1 to {zombiekills::%attacker%}
                    if {zombiekills::%attacker%} is 10:
                        spawn zombie
                        set name of the last spawned zombie to "&5&lBrood Mother"
                        apply health boost 15 to the last spawned zombie for 9999 minutes
                    if {zombiekills::%attacker%} is 1:
                        create bossbar titled "&bNog 9 kills" and id "contest" for attacker with progress 90 with colors blue
                    if {zombiekills::%attacker%} is 2:
                        create bossbar titled "&bNog 8 kills" and id "contest" for attacker with progress 80 with colors blue
                    if {zombiekills::%attacker%} is 3:
                        create bossbar titled "&bNog 7 kills" and id "contest" for attacker with progress 70 with colors blue
                    if {zombiekills::%attacker%} is 4:
                        create bossbar titled "&bNog 6 kills" and id "contest" for attacker with progress 60 with colors blue
                    if {zombiekills::%attacker%} is 5:
                        create bossbar titled "&bNog 5 kills" and id "contest" for attacker with progress 50 with colors blue
                    if {zombiekills::%attacker%} is 6:
                        create bossbar titled "&bNog 4 kills" and id "contest" for attacker with progress 40 with colors blue
                    if {zombiekills::%attacker%} is 7:
                        create bossbar titled "&bNog 3 kills" and id "contest" for attacker with progress 30 with colors blue
                    if {zombiekills::%attacker%} is 8:
                        create bossbar titled "&bNog 2 kills" and id "contest" for attacker with progress 20 with colors blue
                    if {zombiekills::%attacker%} is 9:
                        create bossbar titled "&bNog 1 kills" and id "contest" for attacker with progress 10 with colors blue
                    if {zombiekills::%attacker%} is 10:
                        create bossbar titled "&bBoss Spawing" and id "contest" for attacker with progress 0 with colors blue
                        wait 5 seconds
                        remove bossbar "contest"

    command /test123 [<text>]:
        permission: gemcraft.muziek
        trigger:
            if arg 1 is not set:
                if {contest.%player%} is false:
                    send "its false"
            if arg 1 is "on":
                set {contest.%player%} to true
            if arg 1 is "off":
                set {contest.%player%} to false
    Why {contest.%player%} do not work up
     
  2. because you're using %player%, you need to use %attacker%

    also you should use else if instead of if and delete variables instead of setting them to false (false is still saved in the database, whereas delete removes the variable entirely)