scripting
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| scripting [2012/03/23 00:07] – mit | scripting [2025/05/28 16:34] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ~~DISCUSSION: | ~~DISCUSSION: | ||
| - | ===== World Scripting | + | ~~NOTOC~~ |
| - | + | ===== World Scripting | |
| - | * [[Scripting: | + | |
| - | * [[Scripting: | + | |
| - | * [[Scripting: | + | |
| - | * [[Scripting: | + | |
| - | * [[Scripting: | + | |
| - | * [[Scripting: | + | |
| - | * [[Scripting: | + | |
| - | * [[Scripting: | + | |
| + | * [[Scripting: | ||
| + | * [[Scripting: | ||
| + | * [[Scripting: | ||
| + | * [[Scripting: | ||
| + | * [[Scripting: | ||
| + | * [[Scripting: | ||
| * [[Scripting: | * [[Scripting: | ||
| + | * [[Scripting: | ||
| + | |||
| + | ===== Introduction to World Scripting ===== | ||
| + | The Universal' | ||
| + | |||
| + | ===== Event Scripting ===== | ||
| + | ' | ||
| + | |||
| + | As an initial example - perhaps you want to have a special building that when built, awards your players with a special item. The simple script to do this might look something like.. | ||
| + | |||
| + | < | ||
| + | Event( " | ||
| + | { | ||
| + | *say %PLAYER% built building 3 | ||
| + | *grantitem %PLAYER% Special Item | ||
| + | } | ||
| + | </ | ||
| + | If you've already been playing around with owner features on your world, then the *commands might already be familiar - Just about anything you can do using the commands on the server you can do through the scripting system - which leads to lots of possible clever features done in script. | ||
| + | |||
| + | For details on the range of events supported see the [[scripting: | ||
| + | |||
| + | ===== Script Files ===== | ||
| + | The primary ' | ||
| + | |||
| + | For a quick Hello World example.. Connect to your world, copy the code block below into your serverscript.mit, | ||
| + | < | ||
| + | Event( "& | ||
| + | { | ||
| + | *say Hello World | ||
| + | } | ||
| + | </ | ||
scripting.1332461229.txt.gz · Last modified: (external edit)
