|
1 | 1 |  |
2 | 2 |  |
3 | 3 | [](https://discord.gg/3j54zBnbbD) |
| 4 | + |
4 | 5 |
|
5 | | - |
6 | | - # What is `Scripted Events Reloaded`? |
7 | | -**Scripted Events Reloaded (SER)** is an SCP:SL plugin for LabAPI that adds a complete custom programming language for server owners to use. |
| 6 | + |
| 7 | +# What is `Scripted Events Reloaded`? |
| 8 | +**Scripted Events Reloaded (SER)** is an SCP:SL plugin that adds a custom scripting language for server-side events. |
| 9 | + |
| 10 | +# Main goal |
| 11 | +Making plugins with C# is NOT an easy thing, especially for beginners. |
| 12 | +If you want to get started with SCP:SL server-side scripting, SER is a great way to begin. |
| 13 | + |
| 14 | +SER simplifies the most essential plugin features into a friendly package. |
| 15 | +All you need to get started is a text editor and a server! |
| 16 | + |
| 17 | +# Nice-to-Haves of SER |
| 18 | +- **Simplification** of the most essential features like commands, events and player management. |
| 19 | +- **No compilation required**, while C# plugins require a full development environment, compilation, and DLL management. |
| 20 | +- **Lots of built-in features** like AudioPlayer, Databases, Discord webhooks, HTTP and more! |
| 21 | +- **Extendable** with frameworks like UCR, EXILED or Callvote, but __without__ any dependencies! |
| 22 | +- **Plugin docs** are available directly on the server using the `serhelp` command. |
| 23 | +- **Helpful community** available to help you with any questions you may have. |
8 | 24 |
|
9 | 25 | # SER Tutorials |
10 | 26 | > https://scriptedeventsreloaded.gitbook.io/docs/tutorial |
11 | 27 |
|
12 | | -# Why use SER? |
13 | | -## ✅ Designed with SCP:SL in mind |
14 | | -Every aspect of SER is designed around simplifying the most widely used features of SCP:SL plugins. |
| 28 | +# Examples |
| 29 | +(these scripts may be outdated, use them as a general overview) |
| 30 | +### Welcome message |
| 31 | +``` |
| 32 | +!-- OnEvent Joined |
| 33 | +
|
| 34 | +Broadcast @evPlayer 10s "Welcome to the server {@evPlayer name}!" |
| 35 | +``` |
| 36 | +### Coin on kill |
| 37 | +``` |
| 38 | +!-- OnEvent Death |
| 39 | +
|
| 40 | +# check if player died without an attacker |
| 41 | +if {VarExists @evAttacker} is false |
| 42 | + stop |
| 43 | +end |
| 44 | +
|
| 45 | +GiveItem @evAttacker Coin |
| 46 | +``` |
| 47 | +### VIP broadcast command |
| 48 | +``` |
| 49 | +# define the command with custom attributes |
| 50 | +!-- CustomCommand vipbc |
| 51 | +-- description "broadcasts a message to all players - VIP only" |
| 52 | +-- neededRank vip svip mvip |
| 53 | +-- arguments message |
| 54 | +-- availableFor Player |
| 55 | +-- cooldown 2m |
| 56 | +
|
| 57 | +# send the broadcast to all players |
| 58 | +Broadcast @all 10s "{@sender name} used VIP broadcast<br>{$message}" |
| 59 | +``` |
| 60 | +### Heal random SCP |
| 61 | +``` |
| 62 | +!-- CustomCommand healscp |
| 63 | +-- description "heals a random SCP" |
| 64 | +-- availableFor Player |
| 65 | +-- cooldown 10s |
15 | 66 |
|
16 | | -## 🧠 Easy to learn |
17 | | -SER cuts down on the unnecessary complexity to remain simple and intuitive, while still providing all the features you need. |
| 67 | +# dont allow SCPs to use this command |
| 68 | +if {@sender team} is "SCPs" |
| 69 | + stop |
| 70 | +end |
18 | 71 |
|
19 | | -## 📰 Extensive documentation and examples |
20 | | -A core part of SER is its devotion to easy access to required documentation and examples. Check out the Wiki! |
| 72 | +@randomScp = LimitPlayers @scpPlayers 1 |
| 73 | +Heal @randomScp 50 |
| 74 | +Broadcast @randomScp 4s "You were healed by {@sender name}!" |
| 75 | +``` |
| 76 | +### Hot Potato event |
| 77 | +``` |
| 78 | +!-- OnEvent RoundStarted |
21 | 79 |
|
22 | | -## 💰 Money saving |
23 | | -SER is completely free to use, why pay someone to make a simple plugin for you? |
| 80 | +forever |
| 81 | + Wait 1m |
24 | 82 |
|
25 | | -## 🗂️ All on the server |
26 | | -You don't need any external programs to write scripts with SER, just text files and access to your server. |
| 83 | + # Get a random player from the alive players |
| 84 | + @potatoCarrier = LimitPlayers @alivePlayers 1 |
27 | 85 |
|
28 | | -## ⚡ Speed of development |
29 | | -As soon as you save your script, the changes are applied immediately, no server restart is required. |
| 86 | + # if no player is alive, continue to next attempt |
| 87 | + if {AmountOf @potatoCarrier} is 0 |
| 88 | + continue |
| 89 | + end |
| 90 | + |
| 91 | + Hint @potatoCarrier 3s "YOU HAVE THE HOT POTATO! DROP IT OR DIE!" |
| 92 | + GiveItem @potatoCarrier GunA7 |
30 | 93 |
|
31 | | -## 🔌 Plugin extensions |
32 | | -SER allows you to control other plugins (like custom roles) directly from your scripts! |
| 94 | + Wait 3s |
33 | 95 |
|
34 | | -### Just Another Way to Make Plugins? |
35 | | -Nope. SER is not here to compete with traditional plugins. |
| 96 | + # Check if they still have the item (GunA7) in their inventory |
| 97 | + over {@potatoCarrier inventory} |
| 98 | + with *item |
36 | 99 |
|
37 | | -To stay simple and approachable, SER doesn't support the more advanced features that standard plugin frameworks do. |
38 | | -**Do not treat SER as an all-in-one replacement** for C# plugin development. |
| 100 | + if {ItemInfo *item type} isnt "GunA7" |
| 101 | + continue |
| 102 | + end |
39 | 103 |
|
| 104 | + AdvDestroyItem *item |
| 105 | + Explode @potatoCarrier |
| 106 | + Broadcast @all 5s "{@potatoCarrier name} failed the Hot Potato!" |
| 107 | + stop |
| 108 | + end |
| 109 | + |
| 110 | + Broadcast @all 5s "The Hot Potato has been neutralized... for now." |
| 111 | +end |
| 112 | +``` |
0 commit comments