Metis - Guide 1 - Starting



Introduction
Metis is a plugin for RoboMX, created mainly by Thees "Bender" Schwab.  In these tutorials I will help you go from n00bie to Metis Scripting Legend in days.  
I am Richy aka R��k�f룣� �k��K.

The Basics
Okay, so you have gotten Metis installed and you want to know how to use it?
If you open the Plugins folder you will find a file called 'MXC.xml'.  This is the main file that contains the settings for Metis.  I tend to not edit/write my scripts in this file, but to create a new file and link it in, so lets explain how to do that.

Firstly copy the MXC.xml file and paste it, into the same folder, and rename it.  Call it something useful that will help you remember what it is for i.e. Welcome.xml.

Next, open the MXC.xml and scroll to the bottom.  At the very bottom you will see a line saying </config>.  This is the end tag of a Metis script.  Anything after that will not be read.  
Okay, so add the line <include file="Welcome.xml"/> somewhere above the </config> line.  Now when Metis loads in a room it will also load the file called 'Welcome'.

Save the MXC file and close it, and open Welcome.

You can delete everything in this file as it is a mirror image of MXC. We are going to write everything into clean fresh included files so it keeps your bot looking neat and tidy, and helps you find and change any games or features you add.

To run Metis in a room, enter as you would with WinMX/RoboMX.  Login as normal as most scripts you&#65533;ll write will require additional access to utilize the enhanced features.  

Now type /bot to enter bot mode.  This removes the colours from users names and text and displays them as characters.  This is required as Metis cannot read coloured text.  
Next we will start-up Metis, so type /mxc load to load all the files and then /mxc start to start it running.

Okay now we will go on to explain how to script a basic command and what each part means.

Your First Command
Okay, in that nice fresh file Welcome, type <config> as this is the start tag of a Metis script.  Now write the following into that file, using the layout I do it makes it easy to follow.
<command mode="normal" type="script" case="0">
<in type="normal">*hello*</in>
<out type="normal" delay="0">hiya %NAME%</out>
</command>


Now then I'll explain what each line means.
<command mode="normal" type="script" case="0">
Command is the type of command it is, there are also OnJoinRoom which trigger when Metis enters a room, OnEnter when a user enters the room, OnLeave when a user leaves the room, OnRename when anyone changes name, OnTimer which is surprisingly enough a timer, OnPM which is triggered when Metis receives a pm, OnOpMessage which triggers on /opmsg and lastly command which is the most durable.

The Mode determines whether Metis can do other thiings at the same time as this, when set to thread, or not, when set to normal.  
If left blank, or omitted, the default is normal.

The Type can be set to one of three types.  
Either 'normal', i.e. the command has only one output, or
'script' the command has one or more outputs or
'random', the command picks an output at random.  
If left blank, or omitted, the default is normal.

The Case determines if the trigger word(s) are case-sensitive or not.  
0 is no, 1 is yes.  
If left blank, or omitted, the default is 0 or no.

<in type="normal">*hello*</in>
The 'In' line.  This is the trigger line. When Metis sees this typed in the room it will respond.
The Type is either 'normal' or 'exact'.  
Exact means the command will only be triggered if that is the users exact words.  
Normal allows the trigger to be contained in a message e.g. for the trigger hello, the sentence could be helloooooooooo ya&#65533;ll.
You notice the asterisks I have used around the hello.  These are wildcards.  This means that there can be letters on both sides on the word hello and it will still trigger the command.

<out type="normal" delay="0">hiya %NAME%</out>
The 'Out' line.  This is the response line.
The Type in and out line can be very varied.  These are all explained in pretty good detail within the main Metis help file.

The Delay is set to 0 milliseconds in this case but it will make Metis pause for that long before outputting the command.
Note:- Sometimes, if you set this to a large number Metis will output the line and then pause, in these cases it may be better to use the sleep type.

The %NAME% is a variable Metis uses that picks up the person who triggered the command's username without the ID, e.g. #c7#R��k�#c1#f룣� #c8#�k��K000_12345 would appear as #c7#R��k�#c1#f룣� #c8#�k��K.
There is much more detail on the different variables later on.

</command>
Close the command.

So the command would be:-
Shown written using Programmers Notepad.



And the visable output would be:-




You have just created your first Metis script.  Read on for the next section.


Guide 2: Variables

©2005-2024 WinMXWorld.com. All rights reserved. Page last updated Sun Dec 14 2008