scripting:introduction
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| scripting:introduction [2012/03/23 00:04] – mit | scripting:introduction [2025/05/28 16:34] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ===== Introduction to World Scripting ===== | ===== Introduction to World Scripting ===== | ||
| - | The Universal allows world owners to control much of the game via 'script'. Using the custom scripting language you can create new behaviours for items and scenes on your world. Although the scripting | + | The Universal allows world owners to control much of the game via script. Using the custom scripting language you can create new behaviours for items and scenes on your world. Although the scripting language |
| ===== Script Files ===== | ===== Script Files ===== | ||
| - | The primary ' | + | The primary ' |
| + | <note tip> | ||
| + | After making changes to your ServerScript.mit you will need to use the command.. | ||
| + | < | ||
| + | *reloadscript | ||
| + | </ | ||
| + | .. (alternatively press F11 if you are the world owner) for the changes to take effect. | ||
| + | </ | ||
| ===== The Scripting Language ===== | ===== The Scripting Language ===== | ||
| - | The language used for scripting is a custom one (because Mit finds it more fun to write new things :] ) - but writing it should be easy enough for anyone used to most other programming or scripting languages, such as PHP, C, LUA, Java etc. Check here for an introduction to the language, and a description of the general format and limitations, | + | The language used for scripting is a custom one (because Mit finds it more fun to write new things :] ) - but writing it should be easy enough for anyone used to most other programming or scripting languages, such as PHP, C, LUA, Java etc. Check [[scripting: |
| ===== Event Scripting ===== | ===== Event Scripting ===== | ||
| Line 13: | Line 20: | ||
| 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.. | 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.. | ||
| - | <codeblock> | + | <code> |
| Event( " | Event( " | ||
| { | { | ||
| Line 19: | Line 26: | ||
| *grantitem %PLAYER% Special Item | *grantitem %PLAYER% Special Item | ||
| } | } | ||
| - | </codeblock> | + | </code> |
| 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. | 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 a further description on scripted Events, see the Event Scripting Overview and for a full list of the *commands see the reference section. | + | For a further description on scripted Events, see the [[scripting: |
| - | |||
| - | <note tip> | ||
| - | After making changes to your ServerScript.mit you will need to use the command.. | ||
| - | < | ||
| - | *reloadscript | ||
| - | </ | ||
| - | .. for the changes to take effect | ||
| - | </ | ||
scripting/introduction.1332461072.txt.gz · Last modified: (external edit)
