This is an old revision of the document!
Table of Contents
Event Scripting Overview
You can control events on your world server by script through the file “Data/Script/ServerScript.mit”. This section, and the accompanying reference, describe the types of 'events' you can specify and how they are used.
Event Script Example
Heres an example of an event script file..
<codedoc>
Event( "NewBuilding", "3" )
{
*command=say built building 3
*command=grantcash 400
}
Event( "UseItem", "KudosItem1" )
{
*command=say used the kudos item
*command=grantkudos 1
*command=resetpos
}
</codedoc>
This file defines 2 events. In the example above, whenever a player ('Mit' for instance) builds building type 3, the commands within { } braces are executed. i.e. <codedoc>
- say Mit built building 3
- grantcash Mit 400
</codedoc> would be entered - the say message will appear in red for all players and 'Mit' will get an extra 40s. Similar procedure for the other event should someone use the kudos item. Hopefully should be fairly straightforward to get..
commands for scripting
Note : After making any changes to any of your script files you will need to use the command.. <codedoc>
- reloadscript
</codedoc>
.. for the changes to take effect
