kegnh Posted February 27, 2021 Share Posted February 27, 2021 Hello, my name is itskegnh, and ill be showing you how to layout code in your scripts.This tutorial assumes you've read my other tutorials. A block of skript code contains 3 things. An Event A Condition (optional) And An Effect What is an Event? An event is a section of code that triggers when something happens (e.g. when a player joins) An Example event would be: on join: which triggers when a player joins What is a Condition? A Condition is a check, and will only run the rest of the code if a condition or check is met. An Example of a condition would be: If player is online: which will only run if the player is online. What is an Effect? An Effect is a line of code that does something. These are the lines of code that effect players or change things. An Example of an effect would be: kill the player Which would kill the player.Formatting Code? An Example of This would be: EVENT: IF CONDITION: EFFECT ELSE: EFFECT The conditions are optional What would be an example of code that actually looks like this? Well for that we could make a script that sends "welcome to the server!" if its their first time joining the server. on join: if all offline players doesn't contains player: send "Welcome to the server!" This triggers when a player joins, checks if offline players contains player (offline players is a list of all players who have joined your server), and if it doesn't sends "Welcome to the server!" If you would like to see more of these (The Next: Variables) leave a like or a comment! . Have a nice day. 2 Minecraft Ranks[DEFAULT] - 9th October 2020[PRO] - 21st November 2020[PATRON] - 27th October 2021 Proficiency Python - 8 Years C/C++ - 5 Years Skript - 4 Years Javascript - 3 Year Java - 1 Year Links Discord - kegnh#1234 Link to comment Share on other sites More sharing options...
_omga Posted February 27, 2021 Share Posted February 27, 2021 Another cool tutorial! 1 If I helped you at all, leave a like! IGN: _omga Discord: omega#1000 Link to comment Share on other sites More sharing options...
CoolProgrammer Posted February 27, 2021 Share Posted February 27, 2021 1 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. 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 More sharing options...
aaaCya Posted February 27, 2021 Share Posted February 27, 2021 Thanks for this tutorial man, i didnt know how to do this I used to play Minehut I guess? Yeah, I still watch the forums for some reason. (15/5/2023) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now