1.21.5 Enchanted book skript 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 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!

CarosWolf

Member
Jun 3, 2025
1
0
1
command /cop:
trigger:
set {_r} to random integer between 1 and 3

if {_r} = 1:
execute console command "minecraft:give %player% minecraft:enchanted_book[minecraft:stored_enchantments={"minecraft:efficiency":1}]"
if {_r} = 2:
execute console command "minecraft:give %player% minecraft:enchanted_book[minecraft:stored_enchantments={"minecraft:silk_touch":1}]"
if {_r} = 3:
execute console command "minecraft:give %player% minecraft:enchanted_book[minecraft:stored_enchantments={"minecraft:lure":1}]"


Its my skript and they doesnt work like the image i attached.
It works if i change the item from enchanted book to diamond sword or other things
I need help :emoji_cry::emoji_cry::emoji_cry:
 

Attachments

  • 화면 캡처 2025-06-03 133355.jpg
    화면 캡처 2025-06-03 133355.jpg
    135.2 KB · Views: 125
command /cop:
trigger:
set {_r} to random integer between 1 and 3

if {_r} = 1:
execute console command "minecraft:give %player% minecraft:enchanted_book[minecraft:stored_enchantments={"minecraft:efficiency":1}]"
if {_r} = 2:
execute console command "minecraft:give %player% minecraft:enchanted_book[minecraft:stored_enchantments={"minecraft:silk_touch":1}]"
if {_r} = 3:
execute console command "minecraft:give %player% minecraft:enchanted_book[minecraft:stored_enchantments={"minecraft:lure":1}]"


Its my skript and they doesnt work like the image i attached.
It works if i change the item from enchanted book to diamond sword or other things
I need help :emoji_cry::emoji_cry::emoji_cry:
It's probably better to use the built in Skript expression to give items: https://docs.skunity.com/syntax/search/id:4978.

Solution: give player enchanted book with efficiency 2