Solved event-block's name does not 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 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!

DrunkSheep73

Member
May 29, 2023
25
2
3
Hello all,

I"m making a script for skills and I have a problem using event-block's name, this is my test script:
Code:
on mine:
    send "%event-block's name%"
The problem is if I mine a block it sends <none>, if I remove the " and % then it sends nothing.
Is there another way to get the event-block's name?

Here is my full script but it's not really important because I have the same problem in my test script:
Code:
on load:
    set {fxp.zombie} to 100
    set {axp.zombie} to 100
    set {mxp.stone} to 10

on first join:
    set {fighting.%player's uuid%} to 0
    set {fightingxp.%player's uuid%} to 0
    set {archery.%player's uuid%} to 0
    set {archeryxp.%player's uuid%} to 0
    set {mining.%player's uuid%} to 0
    set {miningxp.%player's uuid%} to 0

on death:
    if attacker is a player:
        if "%damage cause%" is not "projectile":
            set {_xp} to "%victim%"
            add {fxp.%{_xp}%} to {fightingxp.%attacker's uuid%}
            if {fighting.%attacker's uuid%} < 100:
                if {fightingxp.%attacker's uuid%} >= (-500*(root(3, (abs(5*({fighting.%attacker's uuid%}-100)))))+4000):
                    if isNaN(-500*(root(3, (abs(5*({fighting.%attacker's uuid%}-100)))))+4000) is false:
                        remove (-500*(root(3, (abs(5*({fighting.%attacker's uuid%}-100)))))+4000) from {fightingxp.%attacker's uuid%}
                        add 1 to {fighting.%attacker's uuid%}
            if {fighting.%attacker's uuid%} >= 100:
                if {fighting.%attacker's uuid%} >= (500*(root(3, (5*({fighting.%attacker's uuid%}-100))))+4000):
                    if isNaN(500*(root(3, (5*({fighting.%attacker's uuid%}-100))))+4000) is false:
                        remove (500*(root(3, (5*({fighting.%attacker's uuid%}-100))))+4000) from {fightingxp.%attacker's uuid%}
                        add 1 to {fighting.%attacker's uuid%}
        if "%damage cause%" is "projectile":
            set {_xp} to "%victim%"
            add {axp.%{_xp}%} to {archeryxp.%attacker's uuid%}
            if {archery.%attacker's uuid%} < 100:
                if {archeryxp.%attacker's uuid%} >= (-500*(root(3, (abs(5*({archery.%attacker's uuid%}-100)))))+4000):
                    if isNaN(-500*(root(3, (abs(5*({archery.%attacker's uuid%}-100)))))+4000) is false:
                        remove (-500*(root(3, (abs(5*({archery.%attacker's uuid%}-100)))))+4000) from {archeryxp.%attacker's uuid%}
                        add 1 to {archery.%attacker's uuid%}
            if {archery.%attacker's uuid%} >= 100:
                if {archery.%attacker's uuid%} >= (500*(root(3, (5*({archery.%attacker's uuid%}-100))))+4000):
                    if isNaN(500*(root(3, (5*({archery.%attacker's uuid%}-100))))+4000) is false:
                        remove (500*(root(3, (5*({archery.%attacker's uuid%}-100))))+4000) from {archeryxp.%attacker's uuid%}
                        add 1 to {archery.%attacker's uuid%}

on mine:
    set {_xp} to event-block's name
    add "%{mxp.%{_xp}%}%" to {miningxp.%player's uuid%}
    send "%{_xp}%" to player
    if {mining.%player's uuid%} < 100:
        if {miningxp.%player's uuid%} >= (-500*(root(3, (abs(5*({mining.%player's uuid%}-100)))))+4000):
            if isNaN(-500*(root(3, (abs(5*({mining.%player's uuid%}-100)))))+4000) is false:
                remove (-500*(root(3, (abs(5*({mining.%player's uuid%}-100)))))+4000) from {miningxp.%player's uuid%}
                add 1 to {mining.%player's uuid%}
    if {mining.%player's uuid%} >= 100:
        if {mining.%player's uuid%} >= (500*(root(3, (5*({mining.%player's uuid%}-100))))+4000):
            if isNaN(500*(root(3, (5*({mining.%player's uuid%}-100))))+4000) is false:
                remove (500*(root(3, (5*({mining.%player's uuid%}-100))))+4000) from {miningxp.%player's uuid%}
                add 1 to {mining.%player's uuid%}
 
Blocks do not have names, if you are looking for the type of the block, use `type of event-block`