Jump to content

Things you probably didn't know were available in vanilla Skript


Migins

Recommended Posts

So I saw this skUnity thread and I thought it was really interesting so I thought I'd share it.

https://forums.skunity.com/threads/things-you-probably-didnt-know-were-available-in-vanilla-skript.8085/

Some cool stuff I got from it was:

Do If (Conditional Effects): Similar to the ternary, the do if effect allows you to execute an effect only if a condition passes. Note that this can be used to entirely replace if statements which only execute one line of code. Example: give a diamond to the player if {honor::%player's uuid%} > 50

Default Value: You can now in one line provide an alternative default value if the first value isn't set. Example: broadcast {score::%player's uuid%} otherwise "%player% has no score!". This only sends their score if their variable is set, otherwise sending the 2nd message.

Scripts: You can check if a specific script is loaded.

 

Continue: You can now use continue in a loop to skip to the next loop value.

Filters (skQuery Lambdas): Vanilla Skript supports filter statements just like skQuery's lambda which allow you to filter objects based on a condition. Some simple examples are send "congrats on being staff!" to all players where [player input has permission "staff"] or loop players in radius 10 of player where [player input isn't player].

Inventories: Skript has much more inventory support now (from many add-ons). You can:

Note: There are probably other posts like these that are more recent, I just felt like sharing this one :).

 

Support  July 29, 2020 → November 3, 2020

► Helper November 3, 2020 → February 22, 2021

► Moderator February 22, 2021 → May 17, 2021

 I might not always respond to forum dms, however I am always contactable on discord (mig#0069)

Screen Shot 2020-03-20 at 5.23.33 pm.png

Link to comment
Share on other sites

  • 1 year later...
  • 2 weeks later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...