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 MiSK 1.0.0

A Miscellaneous Addon for Skript 1.14+

  1. Moderocky
    Contributors:
    Moderocky
    Misk - A Miscellaneous Addon

    For Skript 1.14.1+

    The purpose of this addon is to add a few bits and pieces of syntax that aren't present in vanilla Skript or in other add-ons.
    Over time, I will also update syntax from abandoned add-ons, such as SkStuff.

    Requirements (Things you must have!)
    1. Skript v2.4 Alpha: https://github.com/SkriptLang/Skript/releases/
    2. Spigot 1.14.1
    Soft Dependencies (Recommended!)
    1. ProtocolLib (latest dev build)
    2. PaperSpigot

    WARNING:
    This is a new release. There may be bugs. Please read the instructions at the bottom of this post, if you find one. :emoji_frowning:


    Current features (Currently in the plugin, available for use)
    • Villager syntax
    • Merchant syntax
    • Guardian Lasers
    • Entity syntax
    • Custom trades
    • Custom merchant objects
    • Wandering Trader syntax
    • Shoot Items
    • Open new 1.14 container GUIs
    • Basic entity pathfinding/navigation syntax
    • Horse Jump event
    • Vehicle steer event (ProtocolLib required)
    • Advancements menu toggle (ProtocolLib required)

    Pipeline features (Partially finished)
    • Client-side equipment
    • Pathfinders (updated from SkStuff)
    • Loot-table utilities

    Planned features (Not started)
    • Basic file utilities
    • Have a request? Contact me on discord!

    Images and Examples (from my server)
    [​IMG]
    A Wandering Trader with custom recipes. Wait! That's illegal.

    [​IMG]
    A Custom Merchant Object using 1.14's new model data. Check out my custom item registry resource for more info.

    https://cdn.moderocky.com/mov/misk_ravager.mp4
    An example of controllable Ravagers, using the on vehicle steer: event with ProtocolLib.


    Official Documentation and Syntax?
    Click Here

    Custom Merchant:
    Code (Text):
    1.  
    2. command /blob:
    3.   trigger:
    4.     set {_m} to a new merchant named "Trader"
    5.     add (a new trade of (2 of gold ingot) and (stone) for (iron ingot named "bob")) to {_r::*}
    6.     add (a new trade of (1 of gold ingot) and (air) for (gold ingot named "fred")) to {_r::*}
    7.     add trades {_r::*} to merchant {_m}
    8.     open merchant {_m} to player
    9.  
    Locking a chest:
    Code (Text):
    1.  
    2. on rightclick on chest:
    3.     player's tool is stick
    4.     cancel event
    5.     lock clicked block with key "key name"
    6.     broadcast "a chest was locked!"
    7. # you can now open this chest ONLY if your tool is named "key name"! :D
    8.  
    Villager Trade Editing:
    Code (Text):
    1.  
    2. set {_e} to target entity
    3. set {_r} to a new trade of stone and stick for slimeball
    4. add trade {_r} to villager {_e}
    5.  
    Vehicles:
    Code (Text):
    1. (ProtocolLib)
    2. on vehicle steer:
    3.   event-string is "SPACEBAR"
    4.   push player's vehicle up at speed 10
    5. # maybe don't try this, else you'll end up in space...
    6. # this can be used to make controllable vehicles
    7. # if you need help/examples, you can ask me :)
    8.  

    The plugin contains a MerchantUtils class.
    You can use this to easily mess with CMOs and villagers, as well as using syntax that isn't publically available yet!

    These are designed to simplify Bukkit methods. They will not change between versions (as Bukkit methods sometimes do).

    Add this to the top of your skript:
    Code (Text):
    1. import:
    2.     com.moderocky.misk.utils.LootTableUtils
    3.     com.moderocky.misk.utils.SkriptUtils
    4.     com.moderocky.misk.utils.MerchantUtils
    You can then use the following methods in your code:
    Code (Text):
    1.  
    2. set {variable} to LootTableUtils.newSeed()
    3. # returns a Java Random
    4.  
    Code (Text):
    1.  
    2. set {variable} to SkriptUtils.getItemStack({item-here})
    3. # returns a real Bukkit itemstack
    4.  
    Code (Text):
    1.  
    2. set {list} to MerchantUtils.tradeList()
    3. set {list} to MerchantUtils.tradeList({recipes})
    4. # returns a mutable Java List for MerchantRecipes
    5. # the second allows you to add a pre-existing collection
    6.  
    Code (Text):
    1.  
    2. set {recipe} to MerchantUtils.disableRecipe({recipe})
    3. set {recipe} to MerchantUtils.enableRecipe({recipe})
    4. MerchantUtils.disableRecipe(merchant, integer)
    5. MerchantUtils.enableRecipe(merchant, integer)
    6. # allows you to disable individual recipes from a merchant or from a villager/wandering trader
    7.  
    Code (Text):
    1.  
    2. set {recipe} to MerchantUtils.getRecipe(merchant, integer)
    3. # returns a recipe at an index. Indices go from 0+, like inventory slots
    4.  
    Code (Text):
    1.  
    2. MerchantUtils.merchant()
    3. MerchantUtils.merchant(name)
    4. MerchantUtils.merchant(tradelist)
    5. MerchantUtils.merchant(name, tradelist)
    6. MerchantUtils.merchant(recipes[ ])
    7. MerchantUtils.merchant(name, recipes[ ])
    8. # Simple CMO creators for every situation
    9. # The last two accept a collection. It's just to cover every possibility
    10.  
    11. MerchantUtils.openMerchant(player, merchant)
    12. # Simple CMO creators for every situation
    13.  
    And our two favourites...
    Code (Text):
    1.  
    2. MerchantUtils.setResult(merchant, integer, itemstack)
    3. MerchantUtils.recipeWithResult(merchantrecipe, itemstack)
    4. # Bukkit doesn't allow this by default, it took me a while to work around!
    5. # Remember that these take ITEMSTACKS. Use the getItemStack() method.
    6.  
    Code (Text):
    1.  
    2. MerchantUtils.tradeCreator(itemstack, itemstack, itemstack)
    3. # A LOT simpler than Bukkit's constructor. Also handles all the hard work for you.
    4. # Bukkit doesn't allow this by default, it took me a while to work around!
    5. # Remember that these take ITEMSTACKS. Use the getItemStack() method.
    6.  

    Found a Bug?!?
    1. Are you on a supported 1.14.1 Spigot (or PaperSpigot)?
    2. Are you on a supported 2.4.x Skript?
    3. Do you have the soft-dependencies required for this syntax?
    4. Are you sure it isn't a Spigot bug?
    5. Are you sure it isn't a Skript bug?
    6. Are you sure it's a MiSK bug?
    If the answer to these is yes, then you should contact me!
    Discord: Moderocky#0001

    If you find a bug, contact me here or on discord: Moderocky#0001 and you can get support.

    Got a suggestion/feature request?
    Contact me on Discord!

    Need Skript help?
    SkUnity Discord: https://discord.gg/RBhvPG8

Recent Reviews

  1. Pobab Da Costa
    Pobab Da Costa
    5/5,
    Version: 1.0.0
    So exactly what i need, i was search this feature after 1.14 release
    and i found this feature when Skript 1.14 release, this is so Perfect!
  2. Revelationage
    Revelationage
    5/5,
    Version: 0.2.0
    This is an awesome addon for Skript. Can't wait for goals! Keep up the good work!
    1. Moderocky
      Author's Response
      Thanks for your review! :)
      Updating Goals is my current project. If you have any other suggestions/requests, please let me know!
  3. LeStegii
    LeStegii
    5/5,
    Version: 0.2.0
    best skript addon for 1.14+!
    try it an convince yourself!
    1. Moderocky
      Author's Response
      Thanks for your review! If you have any suggestions or syntax requests, let me know.