Masoin
Masoin
Member

160 posts
Minecraft: Masoin
Discord: Unknown
By Masoin » over 5 years ago
 
Introduction
Hi, everyone! I recently have seen a lot of people wanting help with skript. Although I would love to help everyone, skripts can take a lot of time to make: especially if you want it to be a very good and detailed one. For this reason, I would like to supply you with all the BASICS about skript.

Disclaimer! Please remember, these are the bare basics. If you also know skript, feel free to add on! But, I am going to try to put everything as simple as I possibly can. So, see shortcuts; also recognize, that you can do skript your way. This is just how I learned, and how I do it. With that said, let us get into it.
 
 
Requirements
⋆ Skript
⋆ Skript addons, all except "skrambled". Recognize that this has recently had problems, this may or may not have been fixed, but I would just do without it. You do you. :p
 
 
Events
Wait- what is an event? Well, this is the shortest way to put it; an event is the very first line of your script. This meaning, the rest of your script is going to be triggered when this happens, let me give you an example:

on break:

The "on break" event is quite commonly used. This means, when a block is broken, the other parts are going to trigger. Remember, you can set principles, but we will get into that soon,

Find list of events here: http://en.njol.ch/projects/skript/doc/events
 
 
Trigger Code
I like to call the rest "trigger code". This is what is going to trigger from your code. Now now, before we get into it, remember this one principle, where you see any colon, there is 4 spaces, or 1 tab:

Incorrect:
on break:
give player 1 of diamond

Correct:
on break:
    give player 1 of diamond

Remember also, that you can not switch between tabs and spaces. For example, you put 4 spaces once, then on the next line, you put a tab. This will give you an "expected xxx number of spaces" or "expected xx tabs" error. 

Alright, now, let us get to it. So, as you can probably tell, trigger code is what is going to be triggered. This has to be in a format too, let me give you an example:

Incorrect:
on break:
give player one of "diamond"

Correct:
on break:
    give player 1 of diamond

Find a list of this on this website, there is really no specific one, as there can be a wide variety of classifications for different types: https://en.njol.ch/projects/skript
 
 
Principles
Now, let us get into the principles. Now, what do I mean by principles, you may ask. Well, these are what you can call "limitations" or "restrictions". This means, after an event, you can set an requirement for the rest of the code to be triggered. Let us set the story, your {money.%player%} is 100

The code would not trigger if:
on break:
    if {money.%player%} is more than 100:
        send "hi"

The code would trigger if:
on break:
    if {money.%player%} is 100:
        send "hi"
 
 
Conclusion
Now, I know this is not the most detailed tutorial in the world, but I believe it is something good for you to start off with. If you need more help, feel free to respond to this comment, or add me on discord, Masonnn#3343.

Thank you so much for reading this tutorial! Wish you the best of luck, ~ Mason.



Last edited: over 5 years ago
Masoin
Masoin
Member

160 posts
Minecraft: Masoin
Discord: Unknown
By Masoin » over 5 years ago
Oh and, if you want me to do a tutorial on any other plugins, feel free to also respond, or message me on discord!