Scripts for MudMagic
	
	MudMagic client offers support for python scripts.

	A tutorial of python can be found at http://docs.python.org/tut/tut.html
	and  language reference at http://docs.python.org/ref/ref.html

	There are 3 types of MudMagic scripts.
		1. Triggers
		2. Aliases
		3. Macros
	There are 2 types of script usage:
		1. Python script file support
		2. Direct command entry support


	TRIGGERS:
	----------------
	1. A trigger script is run when a specified string occurs in 
	game output. This allow to execute some task automatically.

	For example: 
		Python Script:
		========================================
		   Trigger:  You are attacked by a (.*?)
		   -------
		   Script:
		   ------
			#!python23
				$monster = _1;

				if( $monster == "bear" )
					send("kill bear");
				else
					send("flee");
			
		Command Input:
		=========================================
		   Trigger: (.*?) tells you '(.*?)'
		   -------
		   Command:
		   -------
			chat Teacher!, $1 is telling me $2 !!
			tell $1 I told teacher that you told me: $2
			emote sticks his tongue out at $1
	

	Note : "send" is a function exported by MudMagic to Python 
	interpreter which send the string specified in argument
	to server.
	
	A trigger can be specified using Perl Regular Expressions.
	A link to documentation for perlre is
		http://www.perldoc.com/perl5.8.0/pod/perlre.html

	The substring matched are exported to Python in variable 
	named with order of the substring with a underscore prefixing it.

	For example: 
		Trigger: You are attacked by a \([^.]*\).
		Script: send("kill " + _1 );

	If server send "You are attacked by a snake" then:
		the _0 will contain "You are attacked by a snake."
		the _1 will contain "snake"
		
	
	ALIASES:
	-------------------------
	2. Aliases are similar with trigger with the difference that
	act on user input instead on data sent by server.

	For example: 
		Alias: eb
			Python script:
			-------------
			#!python
				send("eat bread");

			[OR]
			Command input:
			-------------
				eat bread

	MACROS:
	==================
	3. A macro script is run when a specified combination of keys 
	is pressed. I a label is set the a button which will launch the 
	script appears on session toolbar.

	For example: 
		Alias: Ctrl+E
		Script: send( "eat bread" );
		Command: eat bread
	
	

	

	
	
	
