Jump to content

[Detailed Guide] How and why to use Skript Effect Commands.


CoolProgrammer

Recommended Posts

Hey. Welcome to yet another guide.

This will explain you how and why to use skript effect commands.

In-case you don't know what effect commands are, it's a skript feature which allows you to use skript syntax in-game.

Still don't understand? Here is an example:

1602783429_ScreenShot2021-01-26at11_07_36AM.png.dda6cb0cd8cb950064f6f472f001e521.png

As you can see here, I just executed send "Hey" to player which is skript syntax, and it works as expected.

Another example:

1494451210_ScreenShot2021-01-26at11_09_08AM.png.b3dc6294390fce3ab34aa4b3965b1766.png

2015046789_ScreenShot2021-01-26at11_09_41AM.png.67d9757ec646fb3d9160c45047e15616.png

Okay... so what exactly happened here??

I set variable {noob} to player (myself), and then exploded myself with strike lightning at location of {noob}. It hurts.

 

Enabling it on your server.

Okay, so now you want to use it on your server, enable it this way:

First of all, go to your server Dashboard. Then navigate to File Manager and dive in this directory: /plugins/Skript.

There you can see a wild config.sk:

1318263676_ScreenShot2021-01-26at11_13_30AM.png.5a909adbe98e1175f760db9a92df2eb3.png

Now punch on config.sk!

Scroll down a tiny bit, and this is what you should find:

277735197_ScreenShot2021-01-26at10_58_19AM.png.b7a99220102db1e86eefb1a3ba1e23ed.png

You see how I've selected true? Your config.sk will show it as false. Quick now... turn it to true!

You can change the "!" to whatever symbol as well. For me, I use "@", because "@" looks very cute. 😊

Note: Skript effect commands are by default is not available to server operators. This means that, if you enable it, you still won't be able to use it because you need a special permission for that, and it's "skript.effectcommands". Just give yourself this permission if you are running a permissions plugin such as GroupManager, PermissionsEX, LuckPerms, etc.

Now, I know! I know! Most of you don't use a permissions plugin, and you have a plugin limit. Luckily... skript allows you to enable effect commands for operators (/op)! 😏

Once again, scroll down a tiny bit, and then look for this option:

2004163677_ScreenShot2021-01-26at10_58_39AM.png.1954b0280b18e49b410223a8238037a1.png

Hehe, you see it's "true" for me, but it will show as "false" for you. Quick!! Turn it to true!

And... you're almost done! Well... don't forget to click Save.

Go back in-game and execute "/sk reload config", or else skript won't know that you have enabled effect commands.

And now you are ready to use effect commands.

 

Pros

• Saves time.

• Quickly read, write or delete variables.

• Testing and debugging, very much simple!

• Gives you more root control over your server. (Beware though, if you enabled this for operators, it can be a dangerous move if someone gets operator access)

• Execute almost any skript syntax, literally anything.

 

Cases of effect commands being helpful.

Here you will see why effect commands can be helpful.

 

Case #1:

I'm a very uncool and bad skript. I came across skript-holograms, and now I give it a try like below:

command /test:
	permission: test.test
	trigger:
		new hologram with lines white stained galass and "hello noob" and store in {test}

I'm mad that it's not working! And suddenly, I realize that I made stupid keyword mistakes such as spelling "glass" as "galass", and missing out on "create" or "spawn" to make the hologram.

I then go back and fix it, and it works fine now.

Now from the beginning, you can obviously make out the amount of time wasted! Making a command, adding the code, saving the file, reloading the skript, raging over it, then correcting it and then finally reloading it again.

But... If I used skript effect commands, This is how it would go:

! new hologram with lines white stained galass and "hello noob" and store in {test}

Realizing I made some mistakes, I quickly fix it and execute it instantly:

! create new hologram with lines white stained glass and "hello noob" and store in {test}

But... I want to delete all the hologram mess I just made! This is what I do to quickly delete all holograms instead of making a command to delete it:

! delete all holograms

Quick as that! Cool huh?

 

Case #2:

I came across an addon called skDragon. It offers very cool cosmetic features! I decide to give it a try.

This time, I manage to code the command successfully without errors as following:

command /test:
	permission test.test
	trigger:
		# I copy pasted the sample expression from the addon's page
		drawArc particle "redstone", center player, target target block, id "%player%", rainbowMode true, density 50, height 2, pitchMultiplier 1, visibleRange 30
		wait 5 seconds
		stopEffect "%player%"

I decided to tweak it to look little better and customized. In this process, I edited the code atleast 10 times. The time it took me to switch in-game, execute /test, go back to the browser to make changes, save the file, come back to the game, execute /test again took me atleast 30 seconds each time. On top of that, I can't instantly see the result. Waste of time and quite stressful!

But instead, if I would have used skript effect commads, this is how it could have gone:

I first copy paste the expression, and execute it like this:

! drawArc particle "redstone", center player, target target block, id "%player%", rainbowMode true, density 50, height 2, pitchMultiplier 1, visibleRange 30

Oh? Then I see that I want to play with the visibleRange. I then proceed to execute these commands:

! stopEffect "%player%"

! drawArc particle "redstone", center player, target target block, id "%player%", rainbowMode true, density 50, height 2, pitchMultiplier 1, visibleRange 69

Easy, right?

 

Honestly...

You may/may not have understood the importance of effect commands, especially with my crap English, but I promise, you will find this very helpful when you start using effect commands, especially when you are dealing with a new add-on or debugging quite annoying bugs in your skript like this! 🐛🔫

 

Thank you so much for reading, take care. ❤️

Edited by CoolProgrammer
Small Error

Hello there! If you're reading this, hope you're having a wonderful day!

 

Feel free to contact me via Discord (CoolProgrammer#1920) for any help.

My DMs are always open for help.

You can also message via. forum messages for help.

1604908226_ScreenShot2021-01-28at10_32_28AM.png.2646ad6be239a9d0756a99e8e15602ab.png

Also, don't hesitate to leave a like on my post if I helped you in any way.

Link to comment
Share on other sites

Great tutorial 😎

  • Like 1

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

Just now, Migins said:

Great tutorial 😎

Thanks 😄

Edited by CoolProgrammer

Hello there! If you're reading this, hope you're having a wonderful day!

 

Feel free to contact me via Discord (CoolProgrammer#1920) for any help.

My DMs are always open for help.

You can also message via. forum messages for help.

1604908226_ScreenShot2021-01-28at10_32_28AM.png.2646ad6be239a9d0756a99e8e15602ab.png

Also, don't hesitate to leave a like on my post if I helped you in any way.

Link to comment
Share on other sites

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