scripting:introduction_to_events
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| scripting:introduction_to_events [2012/03/22 23:52] – mit | scripting:introduction_to_events [2025/05/28 16:34] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ~~NOTOC~~ | ||
| ===== Event Scripting Overview ===== | ===== Event Scripting Overview ===== | ||
| + | Events are triggered on your world server when various things happen - for instance, a ' | ||
| - | You can control events on your world server by script through the file "Data/Script/ | + | ===== Event Script |
| - | === Event Script Example === | + | Here's an example of an event script file.. |
| - | Heres an example of an event script file.. | + | <code> |
| - | + | ||
| - | <codedoc> | + | |
| Event( " | Event( " | ||
| { | { | ||
| - | *command=say built building 3 | + | *say |
| - | *command=grantcash | + | *grantcash |
| } | } | ||
| - | Event( " | + | Event( " |
| { | { | ||
| - | *command=say used the kudos item | + | *say |
| - | *command=grantkudos | + | *grantkudos |
| - | *command=resetpos | + | *resetpos |
| } | } | ||
| - | </codedoc> | + | </code> |
| - | + | ||
| - | This file defines 2 events. In the example above, whenever a player (' | + | |
| - | '' | + | This file defines 2 events. In the example above, whenever a player ('Bob' |
| - | *grantcash | + | < |
| - | '' | + | *say Bob built building 3 |
| + | *grantcash | ||
| + | </ | ||
| + | would be entered - the say message will appear in red for all players and ' | ||
| - | would be entered | + | As well as triggering server commands from script, you can add logic, store persistent (per-player |
| + | ===== Events Reference Links ===== | ||
| - | === commands for scripting === | + | For a full list of events, check the [[scripting: |
| - | Note : After making any changes to any of your script files you will need to use the command.. | + | |
| - | '' *reloadscript | + | For a full list of all the ' |
| - | '' | + | |
| - | .. for the changes to take effect | + | ===== Next section ===== |
| - | + | * Go to [[scripting: | |
scripting/introduction_to_events.1332460341.txt.gz · Last modified: (external edit)
