1. 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!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Addon TuSKe - Custom Enchantments, GUI Manager and more! 1.8.2

A Skript addon which brings custom things to help you to improve your scripts.

  1. Tuke_Nuke
    Supported Minecraft Versions:
    • 1.7, 1.8, 1.9, 1.10, 1.11
    TuSKe is an addon for Skript, that brings integrations with some popular and useful plugins to Skript, and also, brings some new features to help server's admins.

    Supported plugins:
    - Marriage
    - SimpleClans
    - LegendChat
    - ProtocolSupport / ViaVersion

    Documentation: SkUnity's Doc.

    To create a custom enchantment, is very simple and easy to do, let's start with a simple tutorial.
    After 1.5.3, you can create custom enchantments using effects in your skript. All you have to do is register a enchantment with a name, this name will be used at your code to enchant items.
    Code (Skript):
    1. on skript load:
    2.      register a new custom enchantment with id name "Magic"
    The id name is what you use in your code to enchants a item, in this example, we will use Magic as custom enchantment's name.

    This is the basic of creating a custom enchantment, but it's not all. It has somethings that you can hide and the plugin will use a default value and there are values that are optional. The expressions that you don't need to set if you don't want are:

    The max level that a enchantment can have, it goes from 1 to 10, the default is 3.

    The rarity of enchantment, it goes from 1 (rare) to 5 (common), the default is 3.

    The types of items that the enchantment accepts. This doesn't accept the ID or name of item, only especific values and they are:
    Helmets, Chestplates, Leggings, Boots, Pickaxes, Axes, Shovels, Bow and Fishing Rod
    And there are values that represents a group of groups above:
    Tools: Pickaxes, Axes and Shovels
    Armor: Helmets, Chestplates, Leggings and Boots
    All: All groups above
    If this option is not set, it will use the default value, All. You can use more than one value, it's just separate with "," or "and".

    If true, the enchantment can be gotten on enchantment table, else, only by skript. By default is false.

    The optional value doesn't have a default value, so you don't need it if you don't want it.

    It will set a group of enchantments that is incompatible with the enchantment, it means that they won't be together at same item. The value is the ID name of other custom enchantments.

    Here is a example of how it's should look like:
    Code (Skript):
    1. on skript load:
    2.      register a new custom enchantment with id name "Magic"
    3.      set {_enchantment} to "Magic" parsed as custom enchantment
    4.      set max level of {_enchantment} to 5
    5.      set rarity of {_enchantment} to 1
    6.      set accepted items for {_enchantment} to "Swords" and "Bow"
    7.      set lore name of {_enchantment} to "Magic Power"
    After the configuration, you just have to reload the file: or you restart your server or you execute the skript effect:
    If everything is right, you shouldn't see any errors on console. After that, you only have to create your custom effects for the enchantment by yourself. And to do that, you have some expressions to help you.

    Code (Skript):
    1. #You can specify the level or not.
    2. %itemtype% has custom enchantment %custom enchantment%
    3. level of custom enchantment %custom enchantment% of %itemstack%
    4. #You can add or remove enchantments from it.
    5. [all] custom enchantments of %itemstack%
    6. ...
    To create a GUI, isn't that complex, we have these effects:

    (format|create|make) [a] gui slot %numbers% of %players% with %itemstack% to [do] nothing

    (format|create|make) [a] gui slot
    %numbers% of %players% with %itemstack% to close [using %click action% [(button|click|action)]]

    (format|create|make) [a] gui slot
    %numbers% of %players% with %itemstack% to [close then] run %command sender% command %string% [as op] [using %click action% [(button|click|action)]] [with cursor [item] %itemstack%]

    (format|create|make) [a] gui slot
    %numbers% of %players% with %itemstack% to [close then] run function %function% [using %click action% [(button|click|action)]] [with cursor [item] %itemstack%]

    The first one will do exactly nothing more than just nothing. The item won't peform any action.

    The other 3 effects has [using %click action%], if you use that in the effect, it will run the command/function only if it is a specifc click action. and if you don't want, it will run with any click type. The supported click actions are:

    Code (Skript):
    1. left, right, shift left, shift right, double click, middle, number key, drop and control drop
    If you have v2.2-dev16b or above from Bensku' Skript fork, you will have to search for click action in its documentation, because the values are different.

    The second will close when you click on it.

    The last two has [with cursor %item stack%]. It will only run if a player click on item, with another specific item.

    The third will peform a command. You can execute with console or a player, and if it is a player, you can execute as op too.

    And the last one is to execute a function.
    Code (Skript):
    1. create a gui slot 0 of player with stone to do nothing
    2. create a gui slot 1 of player with potato to close with left click
    3. create a gui slot 2 of player with paper to run player command "CommandHere" as op
    4. create a gui slot 3 of player with diamond to run console command "CommandHere"
    5. create a gui slot 4 of player with gravel to run function giveItems(player) with cursor item stone
    You can also use multiple action:
    Code (Skript):
    1. create a gui slot 2 of player with stone to run function subtract(1) with left click
    2. create a gui slot 2 of player with stone to run function increase(1) with right click
    If you want to change the item, you don't need to format the slot again, you can just change the item in slot:
    Code (Skript):
    1. function toggle(p: Player):
    2.     if {var} is true:
    3.         set slot 0 of current inventory of {_p} to red wool
    4.     else:
    5.         set slot 0 of current inventory of {_p} to green wool
    7. #your code to open a inventory/virtual inventory
    8. create a gui slot 0 of player with green wool to run function toggle(player)
    And if you want to unformat the slot, it's just:
    Code (Skript):
    1. unformat the gui slot 1 of player
    2. #or if you want the whole inventory
    3. unformat all gui slots of player
    And some conditions:
    Code (Skript):
    1. %player% has [a] gui #Check if has any gui in his open inventory
    2. slot %number% of %player% is a gui #Check if a slot is a gui
    Bug fixes from the old method, an another addon that it isn't update anymore:
    - No wait a tick needed after open the inventory.
    - It will only format the current open inventory of player (doesn't include the crafting slots).
    - Doesn't conflicts with others slots of the same inventory.
    - No loop problem, you can make loops and the command/function will have different values for each one.

    Code (Skript):
    1. on anvil combine:
    2.       event-item-one is a diamond sword
    3.       event-item-two is a diamond sword
    4.       send "Oh, you combined two diamonds swords!"
    6. on anvil rename:
    7.       event-string is "Awesome axe"
    8.       event-item-result is any axe
    9.       send "You've renamed your %event-item% from %event-item's name% to %event-string%"
    11. command /players: #will send a list of players in alphabetic order
    12.       trigger:
    13.             set {_players::*} to alphabet order of all players
    14.             loop {_players::*}:
    15.                   send "%loop-value%"
    17. command /xp: #shows the amount of experiences orbs that player has
    18.       trigger:
    19.             send "You have %xp of player% experiences orbs."
    20. on damage of player:
    21.       if attacker's tool has custom enchantment Vampire:
    22.             set {_AddHealth} to 1 * level of custom enchantment Vampire of attacker's tool
    23.             add {_AddHealth} to health of attacker

    - Skript
    - (Optionally) the plugins listed above.

    How to install:
    - Place the Skript and TuSKe at plugins' folder. (If you already have Skript, place only the TuSKe).
    - Restart your server. (You can't load the plugins while your server is running.)
    - Done!
    Now it's just start to code in Skript and use the features of TuSKe in your scripts.

    If you have a problem to make some code, you can use the Skript's forum: SkUnity's Forum. If you have a especific problem with TuSKe, go to the post about TuSKe.

    Suggestions and bugs:
    Do you have any suggestions? Comment below.
    Did you found some bug? Send me a PM or comment in discussion page.
    bi0, Green_Lothar, Goetheus and 3 others like this.

Recent Reviews

  1. ChrisPlayez
    Version: 1.8.2
    Whats up with the custom enchants, does it no longer work? Here is my code

    [C]# Lucky

    on skript load:
    register a new custom enchantment with id name "Lucky"
    set {_luckenchant} to "Lucky" parsed as custom enchantment
    set max level of {_luckenchant} to 5000
    set rarity of {_luckenchant} to 5
    set accepted items for {_luckenchant} to "Pickaxe"
    set lore name of {_luckenchant} to "&a&l〙Lucky:"

    on script load:
    set {randomlucktokens} to a random integer between 10000 and 500000

    on mine:
    if player's tool has custom enchantment Lucky:
    chance of {luckychance}%:
    add {randomlucktokens} to {tokenbal}

    Copied from documentation btw
  2. Hexivoid
    Version: 1.8.2
    At least 50 characters... hmm... The addon works great, just like expected! Pikachu's patch makes it compatible with the latest versions of Skript- go check it out!
  3. jaylawl
    Version: 1.8.2
    Been using this to make GUIs for over a year, but the plugin is starting to break with latest Skript (starting with dev37 for me). I hope this is still alive!
  4. DHStyle
    Version: 1.8.2
    nice addons, but the custom enchant didnt work dude please fix for 1.12.2
  5. sklake
    Version: 1.8.2
    I love this addon , it is very amazing plugin :) Keep going and hope there will be more new features. Thanks:)
  6. Bartuzen
    Version: 1.8.2
    This addon has been my favourite GUI addon in 5 minutes.
  7. Wynnevir
    Version: 1.8.1
    This has become my favorite for setting up GUI's <3
    1. Tuke_Nuke
      Author's Response
      Thank you. I'm gladed that you liked it.
  8. Olyno
    Version: 1.8
    It is about an addon that I use now all the time in my skript with a creator in the listening loan to help you. Nothing to say except that this work is excellent !
    1. Tuke_Nuke
      Author's Response
      Thank you for your reply. I'm here mostly to help, with a bit delay between the answers
  9. Getreidemonster
    Version: 1.7.7
    Awesome addon, but the event:
    on player start walking
    Doesn't works - it says it can't understand that event :c
    1. Tuke_Nuke
      Author's Response
      Thank's for your review but that's not the proper place to report bugs. Please post it in resource's discussion.
  10. i7SoNx
    Version: 1.7.7
    i like this addon so much but i keep getting an error he is an picture.

    the error is:
    register a new custom enchantment with id name "Slowness"' is not a boolean (yes/no) (GUI2.sk, line 16: register a new custom enchantment with id name "Slowness"

    please if u can help me please do.
    1. Tuke_Nuke
      Author's Response
      Thank's for your review but that's not the proper place to report bugs. Please post it in resource's discussion.