Tutorial by: 1_x409


Okay so in this tutorial, I will show you how to add options. Here is the table of contents:

  1. What are options?
  2. How to set options
  3. How to use them in your skripts

Okay, so what are options?
Options are as they sound options. You put them at the top of the skript and you can set them to a string or a boolean (true or false). Its like a config but easier.
Okay so now what know what options are. How do you set them?
Well you first put Options: at the top of the skript. You can add comments. Here is an example:

# This is a comment. It will still work though.
Options:

Ok, now if you want to set them, you have to make a new line, then indent (2 spaces or 1 tab). You can put what ever you like, for example, a join message. Keep in mind that you don't need qoutation's. If you do add quotes, it will add it to the option when sent.

# This is a comment. It will still work though.
Options:
    Join: &6&lWelcome!

There we go! You just set your first option! So now, how do you use them in commands or stuff like that?
Well you need {}. Put the option inside. Keep in mind that Skript is case-sensitive and if you dont capitalize, it will not work. Make sure to put @. So like this:

# This is a comment. It will still work though.
Options:
    Join: &6&lWelcome!
on join:
    set join message to "{@Join}"

We have just used the option in a on join event. If we were to join this server, it would send us Welcome. You can test this by copying this Skript, and pasting into a .sk file.


Did you find 1_x409's tutorial helpful?


You must be logged in to comment