<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.cyberlint.org/wiki/index.php?action=history&amp;feed=atom&amp;title=MUDL%3Apost_command</id>
		<title>MUDL:post command - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.cyberlint.org/wiki/index.php?action=history&amp;feed=atom&amp;title=MUDL%3Apost_command"/>
		<link rel="alternate" type="text/html" href="http://www.cyberlint.org/wiki/index.php?title=MUDL:post_command&amp;action=history"/>
		<updated>2026-04-07T08:41:21Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.25.1</generator>

	<entry>
		<id>http://www.cyberlint.org/wiki/index.php?title=MUDL:post_command&amp;diff=65236&amp;oldid=prev</id>
		<title>Teker: Created page with &quot; __TOC__  = Overview =  The MUDL post functions get called after processing a command.  This allows builders to react to something that just took place in an easier fashion....&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.cyberlint.org/wiki/index.php?title=MUDL:post_command&amp;diff=65236&amp;oldid=prev"/>
				<updated>2018-06-25T14:11:50Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot; __TOC__  = Overview =  The MUDL post functions get called after processing a command.  This allows builders to react to something that just took place in an easier fashion....&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
The MUDL post functions get called after processing a command.  This allows builders to react to something that just took place in an easier fashion.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Command Syntax =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
addproc &amp;amp;lt;room|mobile|object&amp;amp;gt; mudl&lt;br /&gt;
setproc &amp;amp;lt;room|mobile|object&amp;amp;gt; ## post_&amp;lt;command&amp;gt;_&amp;lt;arguments&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Global Variables =&lt;br /&gt;
&lt;br /&gt;
The following global variables are available:&lt;br /&gt;
{|class=&amp;quot;abilitiestable&amp;quot; border=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
! Name !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| %a&lt;br /&gt;
| Character&lt;br /&gt;
| The character or mobile that initiated the command.&lt;br /&gt;
|-&lt;br /&gt;
| %c&lt;br /&gt;
| Character&lt;br /&gt;
| The mobile that the MUDL script is attached to.  This value is null if the script is attached to a room or object.&lt;br /&gt;
|-&lt;br /&gt;
| %f&lt;br /&gt;
| Integer&lt;br /&gt;
| [[Procedure Flags]] used to track interaction between different procedures.&lt;br /&gt;
|-&lt;br /&gt;
| %o&lt;br /&gt;
| Object&lt;br /&gt;
| The item that the MUDL script is attached to.  This value is null if the script is attached to a room or mobile.&lt;br /&gt;
|-&lt;br /&gt;
| %room&lt;br /&gt;
| Room&lt;br /&gt;
| The room in the game where the script is being run.  This value may be null if the script is attached to an area.&lt;br /&gt;
|-&lt;br /&gt;
| %area&lt;br /&gt;
| Area&lt;br /&gt;
| The area (zone) in the game where the script is being run.&lt;br /&gt;
|-&lt;br /&gt;
| %parent&lt;br /&gt;
| Character or Room or Area&lt;br /&gt;
| The in-game element that the MUDL script is attached to.  It will be identical to %c or %room or %area.&lt;br /&gt;
|-&lt;br /&gt;
| %procedure_index&lt;br /&gt;
| Integer&lt;br /&gt;
| The index of the current MUDL procedure on the %parent variable.&lt;br /&gt;
|-&lt;br /&gt;
| %s&lt;br /&gt;
| String array&lt;br /&gt;
| The arguments following the command that have not been processed by the game.  See the particular commands below for details on which arguments have been processed and which ones have been left in this array.&lt;br /&gt;
|-&lt;br /&gt;
| %x&lt;br /&gt;
| Character&lt;br /&gt;
| The target of the current command.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Return Values =&lt;br /&gt;
&lt;br /&gt;
The return value from post functions is ignored.  To modify game behavior after the post function, you should manipulate the [[Procedure Flags]] using the %f global variable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Post Commands =&lt;br /&gt;
&lt;br /&gt;
The following post commands have been implemented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== post_arrival ==&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
The following local variables are available:&lt;br /&gt;
{|class=&amp;quot;abilitiestable&amp;quot; border=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
! Name !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| %s&lt;br /&gt;
| String Array&lt;br /&gt;
| %s[1] contains the direction moved during this command.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Triggered Scripts ===&lt;br /&gt;
&lt;br /&gt;
Special procedures are called on mobiles in the room, on the room, and on the area&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
addproc &amp;lt;mobile&amp;gt; mudl&lt;br /&gt;
setproc &amp;lt;mobile&amp;gt; 0 post_arrival&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
setproc &amp;lt;mobile&amp;gt; 0 PROC_ENABLED 1&lt;br /&gt;
compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== post_cast_i ==&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
The following local variables are available:&lt;br /&gt;
{|class=&amp;quot;abilitiestable&amp;quot; border=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
! Name !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| %1&lt;br /&gt;
| Integer&lt;br /&gt;
| Numeric id of the spell that was cast.  The spell_name function can be used to compare the id against the name of a specific spell you are looking for.&lt;br /&gt;
|-&lt;br /&gt;
| %s&lt;br /&gt;
| String Array&lt;br /&gt;
| The arguments typed after the spell name.  Note that these could be anything to allow the post command to process spells cast at abnormal targets (doors, objects, miscellaneous keywords, etc).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Triggered Scripts ===&lt;br /&gt;
&lt;br /&gt;
Special procedures are called on mobiles in the room, on the room, and on the area.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
addproc &amp;lt;mobile&amp;gt; mudl&lt;br /&gt;
setproc &amp;lt;mobile&amp;gt; 0 post_cast_i&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
setproc &amp;lt;mobile&amp;gt; 0 PROC_ENABLED 1&lt;br /&gt;
compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== post_play_ib ==&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
The following local variables are available:&lt;br /&gt;
{|class=&amp;quot;abilitiestable&amp;quot; border=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
! Name !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| %1&lt;br /&gt;
| Integer&lt;br /&gt;
| Numeric id of the song that was played.  The spell_name function can be used to compare the id against the name of a specific song you are looking for.&lt;br /&gt;
|-&lt;br /&gt;
| %2&lt;br /&gt;
| Boolean&lt;br /&gt;
| FALSE if this is the original play/sing and TRUE if this is a replay/resing of the song.&lt;br /&gt;
|-&lt;br /&gt;
| %s&lt;br /&gt;
| String Array&lt;br /&gt;
| The arguments typed after the song name.  Note that these could be anything to allow the post command to process songs played at abnormal targets (doors, objects, miscellaneous keywords, etc).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Triggered Scripts ===&lt;br /&gt;
&lt;br /&gt;
Interrupts are called on all room procedures and mobile procedures for all mobiles in the room.  When the script is called you are guaranteed that the player is able to play the song and that a valid song name was entered.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
addproc &amp;lt;mobile&amp;gt; mudl&lt;br /&gt;
setproc &amp;lt;mobile&amp;gt; 0 post_play_ib&lt;br /&gt;
&lt;br /&gt;
setproc &amp;lt;mobile&amp;gt; 0 PROC_ENABLED 1&lt;br /&gt;
compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== post_sing_ib ==&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
The following local variables are available:&lt;br /&gt;
{|class=&amp;quot;abilitiestable&amp;quot; border=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
! Name !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| %1&lt;br /&gt;
| Integer&lt;br /&gt;
| Numeric id of the song that was sung.  The spell_name function can be used to compare the id against the name of a specific song you are looking for.&lt;br /&gt;
|-&lt;br /&gt;
| %2&lt;br /&gt;
| Boolean&lt;br /&gt;
| FALSE if this is the original play/sing and TRUE if this is a replay/resing of the song.&lt;br /&gt;
|-&lt;br /&gt;
| %s&lt;br /&gt;
| String Array&lt;br /&gt;
| The arguments typed after the song name.  Note that these could be anything to allow the post command to process songs sung at abnormal targets (doors, objects, miscellaneous keywords, etc).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Triggered Scripts ===&lt;br /&gt;
&lt;br /&gt;
Interrupts are called on all room procedures and mobile procedures for all mobiles in the room.  When the script is called you are guaranteed that the player is able to play the song and that a valid song name was entered.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
addproc template mudl&lt;br /&gt;
setproc template 0 post_sing_ib&lt;br /&gt;
&lt;br /&gt;
setproc template 0 PROC_ENABLED 1&lt;br /&gt;
compile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;br /&gt;
[[Category:MUDL|Post_command]]&lt;/div&gt;</summary>
		<author><name>Teker</name></author>	</entry>

	</feed>