SkQuery [1.13-1.19+]

Addon SkQuery [1.13-1.19+] 4.1.10

  • 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!

SkQ addons aren't used due to existance of functions, but if ya want...
You make .skq file in which you use
Code:
declare expression "custom expression" as "type"
declare effect "effect"
declare loopable expression "loopable expression" as "type"
declare property "property" as"type" for "type"

Thanks for the response! I haven't been able to get it to work still. I have a normal .sk file, in which I put this code:
code_language.skript:
#Substitution for Umbaska's "entity from variable" expression
custom expression logic for "entity from %entity%":
    set expression value to entity expression 1

Then I created a file with the extension .skqc and put this code into it based on your advice:
code_language.skript:
declare expression "entity from %entity%" as "entity"

When I load the server, it still can't recognize it. I noticed that the .skqc file that SkriptPlus uses can't be read in a text editor; do I need to be using a file that's not a text document for the .skqc part?
 
You don't make file with .skqc. You simply make file with.skq and when server loads it will disable .skq file and create .skqc. You edit .skq and reload to update .skqc :emoji_stuck_out_tongue:
 
I have got in to huge problem, it doesn't get values from yaml files anymore after updating from old skquery to new skquery. using:
set {msg::%arg 1%} to yaml value "%arg 1%" from file "languages/EN.yml"
the line in yaml:
gbotautomsg1: §2[§a§lGBot§2]§f If you want to leave a minigame type /q
I'm using Spigot 1.8.8 and Skript 2.2(not the forks or something, because they have tons of bugs and breaks a lot of my scripts)

I know that there are other addons which are able to do yaml things, but I do not want to rewrite all of my scripts, I think Skript is supposed to have it's scripts not breaking after minecraft updates as long as the addon works.
 
I have got in to huge problem, it doesn't get values from yaml files anymore after updating from old skquery to new skquery. using:
set {msg::%arg 1%} to yaml value "%arg 1%" from file "languages/EN.yml"
the line in yaml:
gbotautomsg1: §2[§a§lGBot§2]§f If you want to leave a minigame type /q
I'm using Spigot 1.8.8 and Skript 2.2(not the forks or something, because they have tons of bugs and breaks a lot of my scripts)

I know that there are other addons which are able to do yaml things, but I do not want to rewrite all of my scripts, I think Skript is supposed to have it's scripts not breaking after minecraft updates as long as the addon works.
I made it so it doesn't use the script folder but can use any folder. So now you have to define it's full location
"languages/EN.yml"
into
"plugins/Skript/scripts/languages/EN.yml"
That would fix your issue.

I suggest making a new folder in the plugins folder like "plugins/languages/EN.yml"
But it's up to you. Hope this helps.
 
I made it so it doesn't use the script folder but can use any folder. So now you have to define it's full location
"languages/EN.yml"
into
"plugins/Skript/scripts/languages/EN.yml"
That would fix your issue.

I suggest making a new folder in the plugins folder like "plugins/languages/EN.yml"
But it's up to you. Hope this helps.

Thank you! it works good, and I keep my script things in scripts folder because plugins folder is complete chaos with over 185 files xD while scripts is about 80
 
This won't work for me if the entity is a bat:
make clicked entity pathfind to player with speed 1
(works with other mob types)
 
Hey, somehow the format inventory slot expression isnt working like before (i updated skript, skquery and skellett so i decided to put this here since its a skquery thing)

with the latest versions about a month ago i could do:

code_language.skript:
on right click on nitwit:
    cancel event
    name of clicked entity is "&aExchange"
    wait 1 tick
    open chest with 1 row named "&eCoin Exchange" to player
    format slot 0 of player with black_stained_glass_pane named " " to be unstealable
    set slot 1 of player's current inventory to glowing emerald named "&aBuy 1 Coin" with lore "&afor 100 Claim Blocks"
    set slot 2 of player's current inventory to glowing emerald named "&aBuy 10 Coins" with lore "&afor 1000 Claim Blocks"
    set slot 3 of player's current inventory to glowing emerald named "&aBuy 64 Coins" with lore "&afor 6400 Claim Blocks"
    format slot 4 of player with black_stained_glass_pane named " " to be unstealable
    set slot 5 of player's current inventory to grass named "&6Sell 1 Coin" with lore "&6for 100 Claim Blocks"
    set slot 6 of player's current inventory to grass named "&6Sell 10 Coins" with lore "&6for 1000 Claim Blocks"
    set slot 7 of player's current inventory to grass named "&6Sell 64 Coins" with lore "&6for 6400 Claim Blocks"
    format slot 8 of player with black_stained_glass_pane named " " to be unstealable

but on the latest version the black glass pane wont be unstealable unless i add another tick delay, else the people could use that slot, so now this is the working skript:


code_language.skript:
on right click on nitwit:
    cancel event
    name of clicked entity is "&aExchange"
    wait 1 tick
    open chest with 1 row named "&eCoin Exchange" to player
    wait 1 tick #<--This
    format slot 0 of player with black_stained_glass_pane named " " to be unstealable
    set slot 1 of player's current inventory to glowing emerald named "&aBuy 1 Coin" with lore "&afor 100 Claim Blocks"
    set slot 2 of player's current inventory to glowing emerald named "&aBuy 10 Coins" with lore "&afor 1000 Claim Blocks"
    set slot 3 of player's current inventory to glowing emerald named "&aBuy 64 Coins" with lore "&afor 6400 Claim Blocks"
    format slot 4 of player with black_stained_glass_pane named " " to be unstealable
    set slot 5 of player's current inventory to grass named "&6Sell 1 Coin" with lore "&6for 100 Claim Blocks"
    set slot 6 of player's current inventory to grass named "&6Sell 10 Coins" with lore "&6for 1000 Claim Blocks"
    set slot 7 of player's current inventory to grass named "&6Sell 64 Coins" with lore "&6for 6400 Claim Blocks"
    format slot 8 of player with black_stained_glass_pane named " " to be unstealable

which is kinda annoying since i already have to have a tick delay on the right click event since the cancel event thing wont work anyways but thats not an issue thats related to any plugins....
And yes, im bothered by that tick :emoji_grinning:
 
F
Hey, somehow the format inventory slot expression isnt working like before (i updated skript, skquery and skellett so i decided to put this here since its a skquery thing)

with the latest versions about a month ago i could do:

code_language.skript:
on right click on nitwit:
    cancel event
    name of clicked entity is "&aExchange"
    wait 1 tick
    open chest with 1 row named "&eCoin Exchange" to player
    format slot 0 of player with black_stained_glass_pane named " " to be unstealable
    set slot 1 of player's current inventory to glowing emerald named "&aBuy 1 Coin" with lore "&afor 100 Claim Blocks"
    set slot 2 of player's current inventory to glowing emerald named "&aBuy 10 Coins" with lore "&afor 1000 Claim Blocks"
    set slot 3 of player's current inventory to glowing emerald named "&aBuy 64 Coins" with lore "&afor 6400 Claim Blocks"
    format slot 4 of player with black_stained_glass_pane named " " to be unstealable
    set slot 5 of player's current inventory to grass named "&6Sell 1 Coin" with lore "&6for 100 Claim Blocks"
    set slot 6 of player's current inventory to grass named "&6Sell 10 Coins" with lore "&6for 1000 Claim Blocks"
    set slot 7 of player's current inventory to grass named "&6Sell 64 Coins" with lore "&6for 6400 Claim Blocks"
    format slot 8 of player with black_stained_glass_pane named " " to be unstealable

but on the latest version the black glass pane wont be unstealable unless i add another tick delay, else the people could use that slot, so now this is the working skript:


code_language.skript:
on right click on nitwit:
    cancel event
    name of clicked entity is "&aExchange"
    wait 1 tick
    open chest with 1 row named "&eCoin Exchange" to player
    wait 1 tick #<--This
    format slot 0 of player with black_stained_glass_pane named " " to be unstealable
    set slot 1 of player's current inventory to glowing emerald named "&aBuy 1 Coin" with lore "&afor 100 Claim Blocks"
    set slot 2 of player's current inventory to glowing emerald named "&aBuy 10 Coins" with lore "&afor 1000 Claim Blocks"
    set slot 3 of player's current inventory to glowing emerald named "&aBuy 64 Coins" with lore "&afor 6400 Claim Blocks"
    format slot 4 of player with black_stained_glass_pane named " " to be unstealable
    set slot 5 of player's current inventory to grass named "&6Sell 1 Coin" with lore "&6for 100 Claim Blocks"
    set slot 6 of player's current inventory to grass named "&6Sell 10 Coins" with lore "&6for 1000 Claim Blocks"
    set slot 7 of player's current inventory to grass named "&6Sell 64 Coins" with lore "&6for 6400 Claim Blocks"
    format slot 8 of player with black_stained_glass_pane named " " to be unstealable

which is kinda annoying since i already have to have a tick delay on the right click event since the cancel event thing wont work anyways but thats not an issue thats related to any plugins....
And yes, im bothered by that tick :emoji_grinning:
Format slot has always needed 1-3 ticks in delay. I love set slot as it's quicker, cleaner, faster and more customizable.

Such as this:

code_language.skript:
on right click on nitwit:
    name of clicked entity is "&aExchange"
    cancel event
    open "CHEST" with 1 row named "&eCoin Exchange" to player
    set slots 0, 4 and 8 of player's current inventory to black_stained_glass_pane named " " #Skellett baby ;)
    set slot 1 of player's current inventory to glowing emerald named "&aBuy 1 Coin" with lore "&afor 100 Claim Blocks"
    set slot 2 of player's current inventory to glowing emerald named "&aBuy 10 Coins" with lore "&afor 1000 Claim Blocks"
    set slot 3 of player's current inventory to glowing emerald named "&aBuy 64 Coins" with lore "&afor 6400 Claim Blocks"
    set slot 5 of player's current inventory to grass named "&6Sell 1 Coin" with lore "&6for 100 Claim Blocks"
    set slot 6 of player's current inventory to grass named "&6Sell 10 Coins" with lore "&6for 1000 Claim Blocks"
    set slot 7 of player's current inventory to grass named "&6Sell 64 Coins" with lore "&6for 6400 Claim Blocks"
on inventory click:
    inventory name of player's current inventory is "&eCoin Exchange"
    if clicked slot is 0, 4 or 8:
        cancel event
If you don't want to use set slot, You can also check out TuSke as he attempted to remake the format slot from SkQuery. The SkQuery format slot system has always been weird.

And that multiple set slot syntax is from Skellett. It was a neat feature I wanted as it makes my coding much cleaner on 1 line :emoji_stuck_out_tongue:

I might remake the format slot system when 1.12 comes out aswell. Anyone reading this: Agree emote if you think I should :emoji_stuck_out_tongue:
 
@LimeGlass My Problem is that when I'm using the Latest version of the Normal SkQuery plugin, I get an error message in console when I kick a player with "kick player due to" effect. It works, just gives me big error message. I wish I could just hide errors.