Named item help

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

DoctorHyper

Member
Jul 22, 2017
19
0
1
23
Code:
on rightclick with magenta dye:
    if name of item is "&dBOOP Trophy" with lore "&7This is a item you||&7can't win or get without||&7admin powers.||||&d&lSPECIAL":
        send "&cHello"
        execute command "/achievement %player% BOOP"

It doesn't want to work..
 
Code:
on rightclick with magenta dye:
    if name of item is "&dBOOP Trophy" with lore "&7This is a item you||&7can't win or get without||&7admin powers.||||&d&lSPECIAL":
        send "&cHello"
        execute command "/achievement %player% BOOP"

It doesn't want to work..
Try using ''name of tool'' instead of ''item'', and just getting the name of the item, lore has alot issues

Code:
on rightclick with magenta dye:
    if name of tool is "&dBOOP Trophy":
            #do something
 
Code:
on rightclick with magenta dye:
    if name of item is "&dBOOP Trophy" with lore "&7This is a item you" and "&7can't win or get without" and "&7admin powers." and "" and "&d&lSPECIAL":
        send "&cHello"
        execute command "/achievement %player% BOOP"
 
upload_2020-5-29_11-18-57.png
 
For that "tabs" thing, just replace every tab with 4 spaces. For line 63, I fixed the code but as far as I see you didn't change the code as I typed. Here's how you do it:
Code:
on rightclick with magenta dye:
    if tool is magenta dye named "&dBOOP Trophy" with lore "&7This is a item you" and "&7can't win or get without" and "&7admin powers." and "" and "&d&lSPECIAL":
        send "&cHello"
        execute command "/achievement %player% BOOP"
 
For that "tabs" thing, just replace every tab with 4 spaces. For line 63, I fixed the code but as far as I see you didn't change the code as I typed. Here's how you do it:
Code:
on rightclick with magenta dye:
    if tool is magenta dye named "&dBOOP Trophy" with lore "&7This is a item you" and "&7can't win or get without" and "&7admin powers." and "" and "&d&lSPECIAL":
        send "&cHello"
        execute command "/achievement %player% BOOP"
Okay ill try it.
 
Status
Not open for further replies.