DonGiovanni Posted September 3, 2020 Share Posted September 3, 2020 Hello, I have recently been having problems with enchanting items in skript. Any help would be appreciated! technical details: (I have included versions of skript and the addons I’m using here) Plugins in use: bStats multiverse Core player server plugin metrics skellet (skript addon) V1.95a-minehut skript v2.5-beta2-MH skquery (skript addon) v3.6.4MH Now for the issue! The scope of my script is to add a sword with a random enchantment in a chest. I used this as a stand-alone script to test features for a Skywars loot generator. Both scripts are correctly parsed, although 1 is not enchanting the sword. 1st Skript (without randomised enchantment) command /go: set {item} to stone sword enchant {item} with sharpness 5 add {item} to inventory of block at location at (0, 0, 0) 2nd Skript (the one that I want to do with randomised enchantments which isn’t working for me) command /go: trigger: clear {listofenchantments::*} add looting and sharpness and smite to {listofenchantments::*} set {enchantment} to random element of {listofenchantments::*} set {enchantmentlevel} to random integer between 1 and 2 set {item} to stone sword set {enchantmentandlevel} to "%{enchantment}% %{level}%" enchant {item} with {enchantmentandlevel} add {item} to inventory of block at location at (0, 0, 0) when I send the {enchantmentandlevel} variable to the executer of the command it tells me the variable is “Looting 1” or “Sharpness 3” etc, but it simply places the item in the chest without enchanting. Thank you for any responces! Link to comment Share on other sites More sharing options...
_Tarna_ Posted September 3, 2020 Share Posted September 3, 2020 (edited) Try doing set {enchantmentandlevel} to ("%{enchantment}% %{level}%" parsed as enchantment type) Edited September 3, 2020 by _Tarna_ 1 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 - 12/20/22 Moderator - 12/20/22 - now --------------------------------------------------------- Link to comment Share on other sites More sharing options...
DonGiovanni Posted September 3, 2020 Author Share Posted September 3, 2020 Ah pefect! Thank you a lot, I was wondering how to make skript parse it as an enchantment type, this will solve a whole lot of my other problems. Also quick reply! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now