-
Notifications
You must be signed in to change notification settings - Fork 1
Getting started | Scripts
Note
To proceed, you have to have SER.dll already installed on your server.
Important
SER requires a dependency called NCalc.dll for managing things like conditions, but it's not strictly required.
Imagine scripts as a list of commands you are giving to the server in a text file. Instead of you running each command by yourself, you can make a script to store all of the commands, and run just that script!
Once you have SER installed on your server, you should see a folder named SER in your config folder (LabAPI -> configs -> Scripted Events Reloaded) This is where all scripts are stored.
Important
If you don't see the folder, please restart your server. The folder should appear after the restart. If you still don't see the folder, it's likely that there is an issue that is specific to you. Check the console for any errors, and verify if your server version is compatible with SER.
Create a file called myScript.txt, this will be your first script. Once created, copy the following:
Reply "Hello, World!"
This is now a valid script!
You can either run it through the server or remote admin console using the serrun command. Simply do
serrun <scriptName>
So in our case, we replace <scriptName> with myScript:
serrun myScript
You should now see a notification like this:
[21:37:69] serrun myScript
[21:37:69] Hello, World!
[21:37:69] Script 'myScript' was requested to run
Important
When using remote admin console, you will need the ser.run permission, otherwise the script will not run.
(These tutorials are ordered, start from the top)