Jump to content

how do i enchant players armor and tools in a sktript


vaczz

Recommended Posts

this is what i have, but i want to enchant the items, i tryed much things but i cant find out how it works.

 

on right click:
    if player is holding paper named "&eKits":
        open chest with 1 rows named "&2Kits" to player
        format gui slot 0 of player with diamond sword named "§6Beast" with lore "&7- &eDiamond sword" and "&7- &eDiamond armor" to run:
            open chest with 1 rows named "&eTeleport" to player
            format gui slot 0 of player with oak stair named "§6Spiral Staircase" to run:
                teleport player to location at 13.500, 25, 72.500 in world "pvp"
                clear inventory of player
                wait 1 tick
                set slot 0 of player's inventory to diamond axe
                set slot 1 of player's inventory to wooden sword
                set slot 38 of player's inventory to diamond chestplate #chestplate
                set slot 37 of player's inventory to diamond leggings #leggings
                set slot 36 of player's inventory to diamond boots #boots
                wait 2 ticks
                enchant slot 0 of current inventory of player with sharpness 1
                enchant slot 1 of current inventory of player with knockback 1
                enchant slot 38 of current inventory of player with protection 1 #chestplate
                enchant slot 37 of current inventory of player with protection 1 #leggings
                enchant slot 36 of current inventory of player with protection 1 #boots

 

it doesn't give errors but it just doesn't work

Link to comment
Share on other sites

 set slot 38 of player's inventory to diamond chestplate of unbreaking 10 #chestplate

Hello!
IGN✦ centralwtf
Gender★ he/him
==========================================

Owner★ Boxable, NetherBox, FishHype

 ==========================================

Joined★ 22.07.2019

Member -> VIP ★ 29.04.2020

 ==========================================

obraz_2021-04-08_103028.png.8fa96840c599c6ff81febf732163163f.png

 

 

Link to comment
Share on other sites

Moved to Skript Discussion

Please post in the skript discussion category next time whenever requesting any help with something skript related.

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...