skript-mirror

Addon skript-mirror 0.19.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!

Is it possible to import functions from bungecoord plugin?

I mean I wanted to use api of this bungee plugin:
code_language.skript:
https://www.spigotmc.org/resources/party-and-friends-for-bungeecord.9531/
http://simonsator.de/JavaDoc/Party-and-Friends-MySQL-API/overview-summary.html


Can i somehow import "de.simonsator.partyandfriends.api.party" to spigot server?

Thank you in advance!
No, Bungeecord servers are separate from Bukkit servers.
 
Could you add the possibility to create custom events?
[doublepost=1531943418,1531927231][/doublepost]Hey @btk5h,
I find myself confronted with a small bug here is an example


code_language.skript:
effect create new quest named %string% [on npc %number%] [test %number%]:
    trigger:
        set {_npc} to CitizensAPI.getNPCRegistry().getById(Integer.parseInt("%expression-2%"))
        
        send "%expression-1% %expression-2% %expression-3%" to "Spartan9802" parsed as player
        
        
        
command /tquest:
    trigger:
        create new quest named "test" test 6
Expression-2 returns 1 and not null or <none>
 
Could you add the possibility to create custom events?
[doublepost=1531943418,1531927231][/doublepost]Hey @btk5h,
I find myself confronted with a small bug here is an example


code_language.skript:
effect create new quest named %string% [on npc %number%] [test %number%]:
    trigger:
        set {_npc} to CitizensAPI.getNPCRegistry().getById(Integer.parseInt("%expression-2%"))
       
        send "%expression-1% %expression-2% %expression-3%" to "Spartan9802" parsed as player
       
       
       
command /tquest:
    trigger:
        create new quest named "test" test 6
Expression-2 returns 1 and not null or <none>
Working as intended. Optional expressions use their default value when omitted. You must prefix the type with - to mark it as nullable.
 
Okay, can you show me I don't understand how to use the type
Edit: Thanks :emoji_grinning:
 
Last edited:
code_language.skript:
on left click:
    broadcast "clicked"
    event.getPlayer().spigot().sendMessage(ChatMessageType.ACTION_BAR!, TextComponent.fromLegacyText("test"))

20.07 21:36:22 [Server] WARN method #sendMessage called with (ACTION_BAR (ChatMessageType), test (BaseComponent[])) threw a ClassCastException: Cannot cast [Lnet.md_5.bungee.api.chat.BaseComponent; to net.md_5.bungee.api.chat.BaseComponent
I have some issues with action bars, according to donut this was a skript mirror bug, can you look into this
 
Small bug:
code_language.skript:
condition test with %text%:
    check:
        continue if expression-1 = "asd"

command /test:
    trigger:
        test with "asd"
        send "yes"

%text% or %texts% will cause the command /test to not load at all, but not giving out any parser errors. however it will work with %string% or %strings%.

it took me about an hour to find this issue, recommend to accept %texts% or document this better

not meaning this in a negative way, loving this addon
 
Small bug:
code_language.skript:
condition test with %text%:
    check:
        continue if expression-1 = "asd"

command /test:
    trigger:
        test with "asd"
        send "yes"

%text% or %texts% will cause the command /test to not load at all, but not giving out any parser errors. however it will work with %string% or %strings%.

it took me about an hour to find this issue, recommend to accept %texts% or document this better

not meaning this in a negative way, loving this addon
Got it! This should be fixed in the next update.
 
Hey, thanks for that recent update. I'm quite glad this add-on keeps receiving improvements. Also very glad to see you're making here-and-there updates to the gitbook.

Below is one of my codes using skript-mirror. As you can see, there are many sections that require the use of getScoreboardTags and thus i have duplicated code.

I tried to remove the duplication, by simply putting it in the parse section - but skript-mirror won't allow me to do that. It will state that there are no entities in a custom event (paraphrasing here).

I'm not sure whether this a bug or intentional.

Cheers for reading

code_language.skript:
plural expression:
    patterns:
        %entity%'s [scoreboard(-| )]tags
        [all] [scoreboard(-| )]tags (of|from) %entity%
    return type: texts
    get:
        set {_tags} to "%(expression-1).getScoreboardTags()%"
        {_tags} != "[]":
            replace " " in {_tags} with ""
            set {_tags} to subtext of {_tags} from character 2 to (length of {_tags} - 1)
            set {_tags::*} to {_tags} split at ","
        return {_tags::*}
    set:
        set {_tags} to "%(expression-1).getScoreboardTags()%"
        {_tags} != "[]"
        replace " " in {_tags} with ""
        set {_tags} to subtext of {_tags} from character 2 to (length of {_tags} - 1)
        set {_tags::*} to {_tags} split at ","
        loop {_tags::*}:
            (expression-1).removeScoreboardTag(loop-value)
        loop change values:
            (expression-1).addScoreboardTag(loop-value)
    add:
        loop change values:
            (expression-1).addScoreboardTag(loop-value)
    remove:
        loop change values:
            (expression-1).removeScoreboardTag(loop-value)
    delete:
        set {_tags} to "%(expression-1).getScoreboardTags()%"
        {_tags} != "[]"
        replace " " in {_tags} with ""
        set {_tags} to subtext of {_tags} from character 2 to (length of {_tags} - 1)
        set {_tags::*} to {_tags} split at ","
        loop {_tags::*}:
            (expression-1).removeScoreboardTag(loop-value)
    reset:
        set {_tags} to "%(expression-1).getScoreboardTags()%"
        {_tags} != "[]"
        replace " " in {_tags} with ""
        set {_tags} to subtext of {_tags} from character 2 to (length of {_tags} - 1)
        set {_tags::*} to {_tags} split at ","
        loop {_tags::*}:
            (expression-1).removeScoreboardTag(loop-value)
 
Hi there, sorry for write here but I dont know how to open a post in this forum, but... Someone knows if is there a version of skript compatible with 1.13? or a dev build?
 
btk5h updated skript-mirror with a new update entry:

skript-mirror 0.18.0

⚠️ Breaking Changes
  • Make reflection-based events use imported classes instead of strings
  • Fix compatibility with other addons that add custom sections
  • Use both codenames and user input patterns when looking up classinfos
  • Allow specifying change types in expression changers (#53)
  • Allow multiple input types in property syntaxes...

Read the rest of this update entry...
 
Hi there friend, this plugin replaces original skript?
Or what is it?

Excuse my wrong english
 
Hi there friend, this plugin replaces original skript?
Or what is it?

Excuse my wrong english
Hello! skript-mirror is an addon, meaning you run it alongside Skript. Just place it in your plugins folder like any other plugin and you'll have access to the features that skript-mirror adds.
 
Really great!
You forgot to add instance usage in your doc :emoji_wink:
- Are you thinking of adding custom event support? :emoji_grinning:
- Will you create a simple support for powerful ArrayList? :emoji_slight_smile:
 
Really great!
You forgot to add instance usage in your doc :emoji_wink:
- Are you thinking of adding custom event support? :emoji_grinning:
- Will you create a simple support for powerful ArrayList? :emoji_slight_smile:
  1. Instance usage?
  2. Yes, this has been mentioned in #91
  3. No, that is outside the scope of this addon. You can already use ArrayLists with skript-mirror.
 
Yes you have a condition instance of, but it is not written in the doc yet it is important I find ^^
Ah I hadn't seen great!
Too bad I'm not sure I use them well, I wouldn't want to fill my ram for nothing ^^
 
can anyone help me with this
code_language.skript:
# SkyWars X

import:
    me.wazup.skywars.events.SWPlayerJoinArenaEvent
  
on SWPlayerJoinArenaEvent:
    set {_p} to event.getPlayer()
    set {_arena} to event.getArena() #Not work
    broadcast "%{_p}%, %{_arena}%"
how i can get the arena of player?
thanks.

Edit: solved, it was 'getArenaName'
 
Last edited:
btk5h updated skript-mirror with a new update entry:

skript-mirror 0.19.0

  • General internal code cleanup
  • Add an opt-in consent system for enabling experimental features
  • Allow custom property expressions to be non-single
  • Fix syntax load order issues with other addons
  • Add a more descriptive error when a return is used after a delay
  • Add a way to delay parsing of lines until runtime (#57)
  • Fix comparisons between wrapped java objects...

Read the rest of this update entry...