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.

Script MirrorUtils 1.1.2

Tons of useful expressions and conditions you might need.

  1. EWS
    Supported Minecraft Versions:
    • 1.8, 1.9, 1.10, 1.11, 1.12, 1.13
    MirrorUtils

    This resource has a bunch of useful expressions that you might need, mostly related to texts and numbers.


    Addons required:
    - skript-mirror, skript-mirror and skript-mirror (1.0.0)

    Examples:
    Code (Skript):
    1.  
    2. on chat:
    3.    message regex matches "((http|ftp|https):\/\/)?[-a-zA-Z0-9@:%%._\+~##=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%%_\+.~##?&//=]*)"
    4.    cancel event
    5.    send "You cannot send URLs in chat!"
    6.  
    Code (Skript):
    1.  
    2. on command:
    3.    argument at 2 of full command = "forbidden"
    4.    send "You cannot use such argument in position 2!"
    5.  
    Code (Skript):
    1.  
    2. on load:
    3.    set {test} to yaml value "message.setmoney" from "config"
    4.  
    5. command /money [<text>] [<text>]:
    6.    trigger:
    7.        set (arg 1 parsed as offlineplayer)'s balance to (arg 2 parsed as number)
    8.        send replacer "<player>" and "<value>" with "%arg 1 parsed as offlineplayer%" and "%arg 2 parsed as number%" in {test}
    9.  
    Expressions:
    String
    Code (Skript):
    1.  
    2. # NEW LINE
    3. # Used to add a new line to tab headers/footers and messages.
    4. (newline|nl|cr)
    5.  
    6. # REGEX REPLACE
    7. # Replaces a regular expression in a string with another string.
    8. regex replace %text% with %text% in %texts%
    9.  
    10. # REGEX SPLIT
    11. # Splits a string using a regular expression.
    12. regex split %texts% at %text%
    13.  
    14. # MATCHER OF STRING
    15. # Gets the regular expression matcher in a string.
    16. match[er] %text% (to|in|of|with) %text%
    17.  
    18. # REGEX GROUPS OF MATCHER
    19. # Gets the regular expression groups from a matcher.
    20. # A matcher is obtained from the expression above.
    21. [regex] group[s] %integer% of [matcher] %object%
    22.  
    23. # SUBTEXT
    24. # Gets the subtext of a string. Exactly like Skript's, but for a single argument
    25. sub(text|string) of %text% (from|char[racter][s]) %integer%
    26.  
    27. # EXACTLY EQUALS
    28. # Checks if a string is equal to another.
    29. # Case sentitive (only reason for it to be here).
    30. %text% exactly equals [to] %text%
    31.  
    32. # ARGUMENT AT
    33. # Gets the nth element of texts separated by spaces.
    34. # Useful for on command events.
    35. argument [at] %integer% of %text%
    36.  
    37. # REPLACER
    38. # Allows you to replace multiple values at once in a string.
    39. # Most useful expression around.
    40. (multi[ple] replace|replacer) [(elements|values)] %texts% with %texts% in %text%
    41.  
    42. # RANDOM STRING
    43. # Generates a random string with the length specified.
    44. random (1¦alphanumeric|2¦alphabetic|3¦numeric|4¦ascii|5¦graph) [(text|string)] [with] (size|length) %integer%
    45.  
    Numbers
    Code (Skript):
    1.  
    2. # SPACED NUMBER
    3. # Returns a string with formatted number.
    4. spaced %numbers%
    5.  
    6. # ORDINAL NUMBER
    7. # Gives you the number with proper formatting (1st, 2nd, 3rd... 22nd, 24th)
    8. ordinal [of] %integer%
    9.  
    10. # SUM PREVIOUS
    11. # Sums all the integers smaller than a number N.
    12. # Useful for shops that increase the price and allow multiple items bought at once.
    13. sum prev[ious] [numbers] of %integer%
    14.  
    15. # ROUND TO
    16. # Rounds a number to N decimal places.
    17. round %number% to %number% [decimal] [places]
    18.  
    19. # TOP/LAST ELEMENTS
    20. # Sorts a variable directly and returns a list of texts with the format used.
    21. # Considerably more efficient than any other methods of sorting available in Skript.
    22. (1¦(top|first)|2¦(last)) %integer% (values|elements) of %objects% [formatted] as %text%
    23.  
    24. # NUMBER TO ROMAN NUMERAL
    25. # Converts a number to a roman numeral.
    26. %number% (to|in) roman [numeral]
    27.  
    28. # NUMBER TO WORDS
    29. # Converts a number into words.
    30. number %number% (to|in) words
    31.  
    32. # FORMATTED NUMBER
    33. # Formats a number using symbols to indicate base 10 exponents (k, M, B).
    34. formatted %number% [round[ed] to %-integer%]
    35.  
    36. # PI
    37. # pi
    38. pi
    39.  
    Time
    Code (Skript):
    1.  
    2. # TIME SINCE
    3. # Returns the time (seconds) since a unix timestamp.
    4. time since %number%
    5.  
    6. # TEXT TO SECONDS
    7. # Parses timespans like 1d10h10s.
    8. # Incredibly useful for temporary bans/mutes...
    9. %text% (to|in) seconds
    10.  
    11. # FORMAT SECONDS
    12. # Uses an util to change seconds into any format you want.
    13. # Check https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/time/DurationFormatUtils.html.
    14. format %number% (into|as) %text%
    15.  
    16. # CURRENT MILLISECONDS
    17. # Returns the current time, in milliseconds.
    18. [current] m[illi]s[econds]
    19.  
    Location
    Code (Skript):
    1.  
    2. # DIRECTION NAME
    3. # Returns the first letter of the direction of a location. (N, S, E, W)
    4. # Use "with cardinals" to include SW, NW, NE and SE.
    5. direction name of %location% [(1¦with cardinals)]
    6.  
    7. # BLOCKS FROM A TO B
    8. # Gets the blocks between two locations.
    9. blocks from %location% (to|and) %location%
    10.  
    Item
    Code (Skript):
    1.  
    2. # ITEM WITH LORE
    3. # Returns an item with the lore specified.
    4. %item% with lore %text%
    5.  
    6. # HIDE FLAGS
    7. # Hides flags of an item.
    8. %item% with [(item|hidden|hide)][ ]flags %texts%
    9.  
    10. # ITEM OF ENCHANTMENTS
    11. # Exactly like Skript's expression, but works for variables.
    12. %item% of %enchantmenttypes%
    13.  
    14. # GLOWING ITEM
    15. # Returns a glowing item (glows like it's enchanted, but doesn't show any).
    16. glowing %items%
    17.  
    18. # ITEM'S META
    19. # Returns the meta of an item.
    20. meta of %item%
    21. %item%'s meta
    22.  
    Player
    Code (Skript):
    1.  
    2. # DURATION OF POTION
    3. # Returns the duration (in seconds) of that potion in an entity.
    4. duration of [potion] [effect] %potiontype% (on|of) %livingentity%
    5.  
    6. # TIER OF POTION
    7. # Returns the level of the potion applied to an entity.
    8. tier of [potion] [effect] %potiontype% (on|of) %livingentity%
    9.  

    Conditions
    Text
    Code (Skript):
    1.  
    2. # REGEX MATCHES
    3. # Checks if a string matches a regular expression.
    4. %texts% [regex] matches %text%
    5.  
    Number
    Code (Skript):
    1.  
    2. # IMPROVED BETWEEN
    3. # Checks if a number is between two others.
    4. # Allows < and <=.
    5. %number% (1¦\<|2¦\<=) %number% (3¦\<|4¦\<=) %number%
    6.  
    Player
    Code (Skript):
    1.  
    2. # ENTITY HAS POTIONS
    3. # Continues if the entity has those enchants in their respective levels.
    4. %livingentity% has [potion] [effect[s]] %potiontypes% [level[s]] [%-integers%]
    5.  

    Effects:
    Variables
    Code (Skript):
    1.  
    2. # i++
    3. # Basically a shortcut for lazy people who don't like to use "set {_n} to {_n} + 1"
    4. # Can also add/remove values that are not 1.
    5. %object%(1¦++|2¦--)[%-number%]
    6.  

    There are full descriptions in the file, if you need them.

    EWS (TrademarkTM)​
    C_Corp2002, Ayham Alali and Uzumaki like this.

Recent Reviews

  1. David
    David
    5/5,
    Version: 1.1.2
    [18:56:30] [Server thread/INFO]: TheHallowed [812bf960-0c17-3770-b82b-0b50b7b2b9d5]: /cash adicionar TheHallowed 20000
    [18:56:30] [Server thread/ERROR]: #!#!
    [18:56:30] [Server thread/ERROR]: #!#! [Skript] Severe Error:
    [18:56:30] [Server thread/ERROR]: #!#!
    [18:56:30] [Server thread/ERROR]: #!#! If you're developing an add-on for Skript this likely means that you have done something wrong.
    [18:56:30] [Server thread/ERROR]: #!#! If you're a server admin however please go to http://dev.bukkit.org/server-mods/skript/tickets/
    [18:56:30] [Server thread/ERROR]: #!#! and check whether this error has already been reported.
    [18:56:30] [Server thread/ERROR]: #!#! If not please create a new ticket with a meaningful title, copy & paste this whole error into it,
    [18:56:30] [Server thread/ERROR]: #!#! and describe what you did before it happened and/or what you think caused the error.
    [18:56:30] [Server thread/ERROR]: #!#! If you think that it's a trigger that's causing the error please post the trigger as well.
    [18:56:30] [Server thread/ERROR]: #!#! By following this guide fixing the error should be easy and done fast.
    [18:56:30] [Server thread/ERROR]: #!#!
    [18:56:30] [Server thread/ERROR]: #!#! Stack trace:
    [18:56:30] [Server thread/ERROR]: #!#! java.lang.UnsupportedOperationException: '%objects% while %boolean%' should only be used in loops!!
    [18:56:30] [Server thread/ERROR]: #!#! at com.pie.tlatoani.Miscellaneous.ExprLoopWhile.get(ExprLoopWhile.java:27)
    [18:56:30] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.util.SimpleExpression.check(SimpleExpression.java:162)
    [18:56:30] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.util.SimpleExpression.check(SimpleExpression.java:157)
    [18:56:30] [Server thread/ERROR]: #!#! at ch.njol.skript.conditions.CondCompare.check(CondCompare.java:239)
    [18:56:30] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.Condition.run(Condition.java:58)
    [18:56:30] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:63)
    [18:56:30] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:91)
    [18:56:30] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.Trigger.execute(Trigger.java:53)
    [18:56:30] [Server thread/ERROR]: #!#! at com.btk5h.skriptmirror.skript.custom.condition.CustomCondition.checkByStandard(CustomCondition.java:46)
    [18:56:30] [Server thread/ERROR]: #!#! at com.btk5h.skriptmirror.skript.custom.condition.CustomCondition.check(CustomCondition.java:40)
    [18:56:30] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.Condition.run(Condition.java:58)
    [18:56:30] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.Conditional.walk(Conditional.java:53)
    [18:56:30] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:91)
    [18:56:30] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.Trigger.execute(Trigger.java:53)
    [18:56:30] [Server thread/ERROR]: #!#! at ch.njol.skript.command.ScriptCommand.execute2(ScriptCommand.java:222)
    [18:56:30] [Server thread/ERROR]: #!#! at ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:184)
    [18:56:30] [Server thread/ERROR]: #!#! at ch.njol.skript.command.Commands.handleCommand(Commands.java:269)
    [18:56:30] [Server thread/ERROR]: #!#! at ch.njol.skript.command.Commands$1.onPlayerCommand(Commands.java:164)
    [18:56:30] [Server thread/ERROR]: #!#! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [18:56:30] [Server thread/ERROR]: #!#! at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    [18:56:30] [Server thread/ERROR]: #!#! at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    [18:56:30] [Server thread/ERROR]: #!#! at java.lang.reflect.Method.invoke(Unknown Source)
    [18:56:30] [Server thread/ERROR]: #!#! at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306)
    [18:56:30] [Server thread/ERROR]: #!#! at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
    [18:56:30] [Server thread/ERROR]: #!#! at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502)
    [18:56:30] [Server thread/ERROR]: #!#! at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487)
    [18:56:30] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_8_R3.PlayerConnection.handleCommand(PlayerConnection.java:1154)
    [18:56:30] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:997)
    [18:56:30] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:45)
    [18:56:30] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:1)
    [18:56:30] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13)
    [18:56:30] [Server thread/ERROR]: #!#! at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    [18:56:30] [Server thread/ERROR]: #!#! at java.util.concurrent.FutureTask.run(Unknown Source)
    [18:56:30] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44)
    [18:56:30] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:715)
    [18:56:30] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374)
    [18:56:30] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654)
    [18:56:30] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557)
    [18:56:30] [Server thread/ERROR]: #!#! at java.lang.Thread.run(Unknown Source)
    [18:56:30] [Server thread/ERROR]: #!#!
    [18:56:30] [Server thread/ERROR]: #!#! Version Information:
    [18:56:30] [Server thread/ERROR]: #!#! Skript: 2.2-SNAPSHOT
    [18:56:30] [Server thread/ERROR]: #!#! Bukkit: 1.8.8-R0.1-SNAPSHOT
    [18:56:30] [Server thread/ERROR]: #!#! Minecraft: 1.8.8
    [18:56:30] [Server thread/ERROR]: #!#! Java: 1.8.0_251 (Java HotSpot(TM) 64-Bit Server VM 25.251-b08)
    [18:56:30] [Server thread/ERROR]: #!#! OS: Windows 7 amd64 6.1
    [18:56:30] [Server thread/ERROR]: #!#!
    [18:56:30] [Server thread/ERROR]: #!#! Running CraftBukkit: false
    [18:56:30] [Server thread/ERROR]: #!#!
    [18:56:30] [Server thread/ERROR]: #!#! Current node: null
    [18:56:30] [Server thread/ERROR]: #!#! Current item: 'continue' while com.btk5h.skriptmirror.skript.reflect.ExprJ[email protected] is equal to [[boolean:true]] (comparator: null)
    [18:56:30] [Server thread/ERROR]: #!#!
    [18:56:30] [Server thread/ERROR]: #!#! Thread: Server thread
    [18:56:30] [Server thread/ERROR]: #!#!
    [18:56:30] [Server thread/ERROR]: #!#! End of Error.
    [18:56:30] [Server thread/ERROR]: #!#!

    using "if arg 3 regex matches "[0-9a-zA-Z]+":"
  2. CormanYT
    CormanYT
    5/5,
    Version: 1.1.2
    This has a lot of cool features, like regex which are useful. I only see one issue with it though, EWS.

    It's in the [Script] section even though it should be even the [API] section since it's more like an API over a script. That's it, thanks! Have a good day.
  3. Pie3
    Pie3
    5/5,
    Version: 1.0.3
    amazing work, author is very professional and supportive ~dad
  4. Efnilite
    Efnilite
    5/5,
    Version: 1.0.1
    This is a very nice mirror resource, I'd probably use it a lot lol
  5. Padlick
    Padlick
    5/5,
    Version: 1.0.1
    I think that's a must-have for every skript Server! Works just fine as it should, really fast support... It's just nice. Keep up your work c:
  6. Ayham Alali
    Ayham Alali
    5/5,
    Version: 1.0.0
    This is EPIC! Great work mate, this is truly helpful. Keep it up <3
    1. EWS
      Author's Response
      Thanks for you support.
      If you have new ideas for syntaxes, please send me a PM!