Solved Expression

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

Status
Not open for further replies.

SpeedBlock

Member
Jan 26, 2017
22
1
0
21
I want to make a code that when you right click you enchant the object of the hand.
Code:
code_language.skript:
on rightclick on a sign:
    if line 1 is "&Encantamientos":
        if line 2 is "&0Irrompibilidad":
            if line 3 is "&050":
                if line 4 is "&010&e©":
                    remove 10 from {monedas.%player%}
                    enchant sword of unbreaking 50 to player <- ERROR
                    send "&7[&2Encantamientos&7] &fHas encantado tu &6Espada &fpor &e10 &6&lMonedas" to player
 
Try this.
code_language.skript:
on rightclick on a sign:
    if line 1 is "&Encantamientos":
        if line 2 is "&0Irrompibilidad":
            if line 3 is "&050":
                if line 4 is "&010&e©":
                    if player's tool is a diamond sword or iron sword or stone sword or wood sword:
                        remove 10 from {monedas.%player%}
                        enchant player's tool with unbreaking 50
                        send "&7[&2Encantamientos&7] &fHas encantado tu &6Espada &fpor &e10 &6&lMonedas" to player
 
It's working. Thanks bro.

code_language.skript:
on rightclick on a sign:
    if line 1 is "&Encantamientos":
        if line 2 is "Irrompibilidad":
            if line 3 is "50":
                if line 4 is "10":
                    if player's tool is a diamond sword or iron sword or stone sword or wood sword:
                        remove 10 from {monedas.%player%}
                        enchant player's tool with unbreaking 50
                        send "&7[&2Encantamientos&7] &fHas encantado tu &6Espada &fpor &e10 &6&lMonedas" to player
 
It's working. Thanks bro.

code_language.skript:
on rightclick on a sign:
    if line 1 is "&Encantamientos":
        if line 2 is "Irrompibilidad":
            if line 3 is "50":
                if line 4 is "10":
                    if player's tool is a diamond sword or iron sword or stone sword or wood sword:
                        remove 10 from {monedas.%player%}
                        enchant player's tool with unbreaking 50
                        send "&7[&2Encantamientos&7] &fHas encantado tu &6Espada &fpor &e10 &6&lMonedas" to player
Shorter:
code_language.skript:
on rightclick with a sword:
  if "%line 1 of clicked block%|%line 2 of clicked block%|%line 3 of clicked block%|%line 4 of clicked block%" is "&Encantamientos|Irrompibilidad|50|10":
    remove 10 from {monedas.%player%}
    enchant player's tool with unbreaking 50
    send "&7[&2Encantamientos&7] &fHas encantado tu &6Espada &fpor &e10 &6&lMonedas" to player
 
Status
Not open for further replies.