Help with Anvil Combining

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

Status
Not open for further replies.

Skzen

Member
Jun 15, 2017
15
1
0
Hello,

How can I stop my players from repairing enchanted items? For now I'm cancelling the opening of the anvil gui but I would like for players to still be able to combine enchantment books and the other uses of the anvil.

Thanks
 
It didn't work. I do have TusKe installed. Maybe I'm doing something wrong with my skript?
code_language.skript:
on anvil combine:
    %event-item-one% is enchanted
    cancel event
    play sound "BLOCK_ANVIL_PLACE" to player with volume 1 and pitch 2
    send "&7&l[&r&fPD3&7&l]&r &eYou have not unlocked the ability to repair enchanted items!"
 

Attachments

  • Skript1.jpg
    Skript1.jpg
    25.6 KB · Views: 345
It didn't work. I do have TusKe installed. Maybe I'm doing something wrong with my skript?
code_language.skript:
on anvil combine:
    %event-item-one% is enchanted
    cancel event
    play sound "BLOCK_ANVIL_PLACE" to player with volume 1 and pitch 2
    send "&7&l[&r&fPD3&7&l]&r &eYou have not unlocked the ability to repair enchanted items!"
Without percent signs around event-item-one, percent signs are only used on strings (texts).
 
It works.. kinda. The errors don't go through anymore but the anvil event doesn't cancel and it still goes through with combining
 
Status
Not open for further replies.