TheHunter Posted February 15, 2021 Share Posted February 15, 2021 (edited) I'm making a skript that should open a GUI where you can upgrade the efficiency level by right clicking a diamond pickaxe. The efficiency level should rise by one everytime you click the enchanted book in the GUI, but it only enchants it to level 1 and when I click it again it doesn't do anything. Here's the skript: variables: {_eff} = 1 on right click: player is holding a diamond pickaxe: open virtual chest with 1 row named "Enchanting" to player format gui slot 0 of player with enchanted book named "&eEfficiency" to run: enchant player's tool with "efficiency %{_eff}%" parsed as enchantment type set {_eff} to {_eff} + 1 I also tried this but it didn't work either: variables: {_eff} = 1 on right click: player is holding a diamond pickaxe: open virtual chest with 1 row named "Enchanting" to player format gui slot 0 of player with enchanted book named "&eEfficiency" to run: enchant player's tool with "efficiency %{_eff}%" parsed as enchantment type add 1 to {_eff} Edited February 15, 2021 by TheHunter Link to comment Share on other sites More sharing options...
_Tarna_ Posted February 15, 2021 Share Posted February 15, 2021 Thats not how local variables work. If you are trying to enchant with one level higher, just get the player's current efficiency level then increase it by one. 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...
quick007 Posted February 15, 2021 Share Posted February 15, 2021 replace {_eff} with {eff::%player%}, and change the first part to be: on join: if {eff::%player%} is not set: set {eff::%player%} to 1 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