Solved Skript doesn't work

  • 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 comminuty!

    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!

bewf

Member
Apr 19, 2024
30
0
6
24
Someone helped me previously but their Skript doesn't seem to work either. It only send the "You do not have enough experience" message. It does not increase the hearts or say.



This was what they sent:

Code:
on region enter:
    if "%event-region%" contains "heart":
        if max health of player is greater than or equal to 40:
            send "&eYou're at &cmax health" to player
            stop
        else:
            if player's level is less than 100:
                send "&eYou do not have enough &bexperience." to player
                stop
                if max health of player is between 20 and 38:
                    set {_h} to max health of player
                    add 2 to {_h}
                    set max health of player to {_h}
                    set player's level to 0
                    if {_h} is not 40:
                        send "&aYou're now at %{_h} divided by 2% hearts!" to player
                    else:
                        send "&aYou're now at max hearts!" to player
I believe I might be missing an addon as there is an error on the line "send "&aYou're now at %{_h} divided by 2% hearts!" to player"

This is what I ended up with trying to fix it


Code:
on region enter:
    if "%event-region%" contains "heart":
        if max health of player is greater than 39:
            send "&eYou're at &cmax health" to player
            stop
        else:
            if player's level is less than 100:
                send "&eYou do not have enough &bexperience." to player
                stop
                if max health of player is between 20 and 38:
                    set {_h} to max health of player
                    add 2 to {_h}
                    set max health of player to {_h}
                    set player's level to 0
                    if {_h} is less than 39:
                        send "&aYou now have more hearts!" to player
                    else:
                        send "&aYou now have max hearts!" to player


If anyone knows what plugin im missing or what's going wrong with the skript I'd appreciate it as I am still new to skripting
 
AppleScript:
on region enter:
    if "%event-region%" contains "heart":
        set {_h} to max health of player
        if {_h} >= 40:
            send "&eYou're at &cmax health" to player
            stop
        else:
            if player's level is less than 100:
                send "&eYou do not have enough &bexperience." to player
                stop
            if {_h} < 40:
                add 2 to {_h}
                set max health of player to {_h}
                set player's level to -100+player's level
                if {_h} is < 40:
                    send "&aYou're now at %{_h} / 2% hearts!" to player
                else:
                    send "&aYou're now at max hearts!" to player