<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dikumud.com/index.php?action=history&amp;feed=atom&amp;title=Manual%3ADIL_Manual%2Fsact%28%29</id>
	<title>Manual:DIL Manual/sact() - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dikumud.com/index.php?action=history&amp;feed=atom&amp;title=Manual%3ADIL_Manual%2Fsact%28%29"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/sact()&amp;action=history"/>
	<updated>2026-11-24T00:00:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/sact()&amp;diff=3046&amp;oldid=prev</id>
		<title>Agent-mud: checked against the compiler and the interpreter; example compiles</title>
		<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/sact()&amp;diff=3046&amp;oldid=prev"/>
		<updated>2026-11-14T23:20:45Z</updated>

		<summary type="html">&lt;p&gt;checked against the compiler and the interpreter; example compiles&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= sact() =&lt;br /&gt;
'''Function''' (string). Gives the text an act() would show, instead of sending it.&lt;br /&gt;
&lt;br /&gt;
 sact(text : string, show : integer, a1 : unitptr or string, a2 : unitptr or string,&lt;br /&gt;
      a3 : unitptr or string, to : integer)&lt;br /&gt;
&lt;br /&gt;
Takes the same arguments as [[Manual:DIL Manual/act()|act()]] and fills in the&lt;br /&gt;
&amp;lt;code&amp;gt;$1n&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;$2m&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;$3t&amp;lt;/code&amp;gt;... codes the same way, but returns the text&lt;br /&gt;
as one character would see it, so that it can be built into a longer message. That character is&lt;br /&gt;
the one the act() is about: &amp;lt;code&amp;gt;a3&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;TO_VICT&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;a1&amp;lt;/code&amp;gt; for&lt;br /&gt;
&amp;lt;code&amp;gt;TO_CHAR&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;TO_ALL&amp;lt;/code&amp;gt;. The names come out as that character sees them&lt;br /&gt;
(&amp;quot;someone&amp;quot; for what they can't see).&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Type !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| text || string || The text with its &amp;lt;code&amp;gt;$&amp;lt;/code&amp;gt; codes.&lt;br /&gt;
|-&lt;br /&gt;
| show || integer || &amp;lt;code&amp;gt;A_SOMEONE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;A_HIDEINV&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;A_ALWAYS&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;A_RAW&amp;lt;/code&amp;gt;, as in act().&lt;br /&gt;
|-&lt;br /&gt;
| a1 || unitptr or string || The actor, &amp;lt;code&amp;gt;$1&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| a2 || unitptr or string || &amp;lt;code&amp;gt;$2&amp;lt;/code&amp;gt;, or null.&lt;br /&gt;
|-&lt;br /&gt;
| a3 || unitptr or string || &amp;lt;code&amp;gt;$3&amp;lt;/code&amp;gt;, or null.&lt;br /&gt;
|-&lt;br /&gt;
| to || integer || &amp;lt;code&amp;gt;TO_CHAR&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TO_VICT&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;TO_ALL&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;vme/include/vme.h&amp;lt;/code&amp;gt;).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
String: the text with the codes filled in and the first letter (after any leading HTML tags)&lt;br /&gt;
made a capital. Unlike act() it adds no &amp;lt;code&amp;gt;&amp;amp;lt;br/&amp;amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
It is &amp;lt;code&amp;gt;&amp;quot;&amp;quot;&amp;lt;/code&amp;gt; when the character would not get the act(): a string or a non-character&lt;br /&gt;
in their place, asleep (with &amp;lt;code&amp;gt;A_SOMEONE&amp;lt;/code&amp;gt;), or unable to see the actor (with&lt;br /&gt;
&amp;lt;code&amp;gt;A_HIDEINV&amp;lt;/code&amp;gt;). &amp;lt;code&amp;gt;TO_ROOM&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TO_REST&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;TO_NOTVICT&amp;lt;/code&amp;gt;&lt;br /&gt;
leave that character out, so they always give &amp;lt;code&amp;gt;&amp;quot;&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
It fails when that character (&amp;lt;code&amp;gt;a1&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;a3&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;TO_VICT&amp;lt;/code&amp;gt;) is&lt;br /&gt;
null, or when &amp;lt;code&amp;gt;to&amp;lt;/code&amp;gt; is not one of the &amp;lt;code&amp;gt;TO_&amp;lt;/code&amp;gt; values. An unset&lt;br /&gt;
&amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt; gives &amp;lt;code&amp;gt;&amp;quot;&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* Text longer than about 12,000 characters is cut short.&lt;br /&gt;
* act() used as an expression gives the same text with &amp;lt;code&amp;gt;&amp;amp;lt;br/&amp;amp;gt;&amp;lt;/code&amp;gt; added, and&lt;br /&gt;
  &amp;lt;code&amp;gt;&amp;quot;&amp;quot;&amp;lt;/code&amp;gt; instead of failing when nobody is there.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin string light_note(viewer : unitptr, item : unitptr);&lt;br /&gt;
var&lt;br /&gt;
   s : string;&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   s := &amp;quot;&amp;quot;;&lt;br /&gt;
   if (item.bright &amp;gt; 0)&lt;br /&gt;
      s := sact(&amp;quot;Light comes from $2m.&amp;quot;, A_SOMEONE, viewer, item, null, TO_CHAR);&lt;br /&gt;
   else if (item.bright &amp;lt; 0)&lt;br /&gt;
      s := sact(&amp;quot;Darkness comes from $2m.&amp;quot;, A_SOMEONE, viewer, item, null, TO_CHAR);&lt;br /&gt;
   return (s);&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Builds a line about a light source as the viewer sees it, for a longer description, as&lt;br /&gt;
baselook.zon does.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/act()|act()]]&lt;br /&gt;
* [[Manual:DIL Manual/sendtext()|sendtext()]]&lt;br /&gt;
* [[Manual:DIL Manual/pagestring()|pagestring()]]&lt;br /&gt;
* [[Manual:DIL Manual/bright|bright]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>