Solved Give enchanted Item to player

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

HumbleMC

Member
Nov 8, 2018
18
1
0
26
Hi all, looking to give enchanted items to player but it's not working? I have no errors either.

Here is my current code:
code_language.skript:
    trigger:
        set {_player.player} to arg 1
        set {_playerText} to "%arg 1%"
        set {_amount} to arg 2
        give {_amount} of Diamond Sword of sharpness 4 to {_player.player}
 
Hi all, looking to give enchanted items to player but it's not working? I have no errors either.

Here is my current code:
code_language.skript:
    trigger:
        set {_player.player} to arg 1
        set {_playerText} to "%arg 1%"
        set {_amount} to arg 2
        give {_amount} of Diamond Sword of sharpness 4 to {_player.player}
Your code is cut off, its missing the command.
 
Your code is cut off, its missing the command.
Hey no I do have the command above i just copied the trigger.

code_language.skript:
command /BcMasterSlayer <player>, <number>:
    description: Give players MasterSlayers.
    aliases: BcMasterSlayer
    usage: /BcMasterSlayer <player>, <value 0 or 1>
    permission: donate.masterslayer
    trigger:
        set {_player.player} to arg 1
        set {_playerText} to "%arg 1%"
        set {_amount} to arg 2
        give {_amount} of Diamond Sword of sharpness 4 to {_player.player}
 
remove the comma from your command and try change number to integer
also you can do
code_language.skript:
give arg-2 of diamond sword of sharpness 4 to arg-1
 
remove the comma from your command and try change number to integer
also you can do
code_language.skript:
give arg-2 of diamond sword of sharpness 4 to arg-1
I just tried that now and it is giving me a diamond sword with no enchantment on it?
 
Spigot : 1.13.2
Skript: Not sure but I got it from here: https://github.com/SkriptLang/Skript/releases
#1 You really should know which version you are using. If you dont know you can do /ver Skript (I recommend knowing what you are putting on your server) Im guessing you're probably using 2.2 Beta1 or 2
anyways
try this:
code_language.skript:
set {_item} to diamond sword
enchant {_item} with sharpness 4
give arg-1 arg-2 of {_item}
 
#1 You really should know which version you are using. If you dont know you can do /ver Skript (I recommend knowing what you are putting on your server) Im guessing you're probably using 2.2 Beta1 or 2
anyways
try this:
code_language.skript:
set {_item} to diamond sword
enchant {_item} with sharpness 4
give arg-1 arg-2 of {_item}
I am using 2.3-beta2

Thanks for the help I will try that code now!
 
Status
Not open for further replies.