<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://opensimulator.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://opensimulator.org/index.php?action=history&amp;feed=atom&amp;title=User%3AAllen_Kerensky%2FMyriad_Lite%2FMyriad_Lite_Module_Resilience-v0.0.4-20120827.lsl</id>
		<title>User:Allen Kerensky/Myriad Lite/Myriad Lite Module Resilience-v0.0.4-20120827.lsl - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://opensimulator.org/index.php?action=history&amp;feed=atom&amp;title=User%3AAllen_Kerensky%2FMyriad_Lite%2FMyriad_Lite_Module_Resilience-v0.0.4-20120827.lsl"/>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=User:Allen_Kerensky/Myriad_Lite/Myriad_Lite_Module_Resilience-v0.0.4-20120827.lsl&amp;action=history"/>
		<updated>2026-06-13T16:49:54Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.9</generator>

	<entry>
		<id>http://opensimulator.org/index.php?title=User:Allen_Kerensky/Myriad_Lite/Myriad_Lite_Module_Resilience-v0.0.4-20120827.lsl&amp;diff=30560&amp;oldid=prev</id>
		<title>Allen Kerensky: stop the animdead and anim_incap when healing</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=User:Allen_Kerensky/Myriad_Lite/Myriad_Lite_Module_Resilience-v0.0.4-20120827.lsl&amp;diff=30560&amp;oldid=prev"/>
				<updated>2012-08-28T01:48:28Z</updated>
		
		<summary type="html">&lt;p&gt;stop the animdead and anim_incap when healing&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 01:48, 28 August 2012&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 171:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 171:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; if ( FLAG_DEAD == TRUE ) {&amp;#160;  // healed a critical, critical now &amp;gt; 0 so not dead anymore&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; if ( FLAG_DEAD == TRUE ) {&amp;#160;  // healed a critical, critical now &amp;gt; 0 so not dead anymore&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; FLAG_DEAD = FALSE; // no longer dead&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; FLAG_DEAD = FALSE; // no longer dead&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; llStopAnimation(ANIM_DEAD);&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; llStartAnimation(ANIM_INCAPACITATED);&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; llMessageLinked(LINK_THIS,MODULE_RESILIENCE,&amp;quot;ALIVE&amp;quot;,PLAYERID);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; llMessageLinked(LINK_THIS,MODULE_RESILIENCE,&amp;quot;ALIVE&amp;quot;,PLAYERID);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; METER();&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; METER();&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 184:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 186:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; if ( FLAG_INCAPACITATED == TRUE ) { // were they incapacitated?&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; if ( FLAG_INCAPACITATED == TRUE ) { // were they incapacitated?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; FLAG_INCAPACITATED = FALSE; // no longer gravely wounded&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; FLAG_INCAPACITATED = FALSE; // no longer gravely wounded&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; llStopAnimation(ANIM_DEAD);&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; llStopAnimation(ANIM_INCAPACITATED);&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; llMessageLinked(LINK_THIS,MODULE_RESILIENCE,&amp;quot;REVIVED&amp;quot;,PLAYERID);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; llMessageLinked(LINK_THIS,MODULE_RESILIENCE,&amp;quot;REVIVED&amp;quot;,PLAYERID);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; METER();&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; METER();&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Allen Kerensky</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/index.php?title=User:Allen_Kerensky/Myriad_Lite/Myriad_Lite_Module_Resilience-v0.0.4-20120827.lsl&amp;diff=30557&amp;oldid=prev</id>
		<title>Allen Kerensky: finally fixed the wounds function</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=User:Allen_Kerensky/Myriad_Lite/Myriad_Lite_Module_Resilience-v0.0.4-20120827.lsl&amp;diff=30557&amp;oldid=prev"/>
				<updated>2012-08-28T01:35:29Z</updated>
		
		<summary type="html">&lt;p&gt;finally fixed the wounds function&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 01:35, 28 August 2012&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 341:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 341:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; return;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; return;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; if ( curwounds &amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;0 &lt;/del&gt;&amp;amp;&amp;amp; curcritical == maxcritical ) { // wound boxes left?&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; if ( curwounds &amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;1 &lt;/ins&gt;&amp;amp;&amp;amp; curcritical == maxcritical ) { // wound boxes left?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; curwounds--; // scratch off one&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; curwounds--; // scratch off one&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; SET_RESILIENCE(&amp;quot;Wounds&amp;quot;,curwounds);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; SET_RESILIENCE(&amp;quot;Wounds&amp;quot;,curwounds);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; llOwnerSay(&amp;quot;You've been wounded!&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; llOwnerSay(&amp;quot;You've been wounded!&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; } else if ( curwounds &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt; 1 &lt;/del&gt;&amp;amp;&amp;amp; curcritical &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt; 0 &lt;/del&gt;) { // incapacitated&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; } else if ( curwounds &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt; 0 &lt;/ins&gt;&amp;amp;&amp;amp; curcritical &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;== maxcritical &lt;/ins&gt;) { // &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;last wound box lost, now &lt;/ins&gt;incapacitated&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; curwounds = 0; // force to zero&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; curwounds = 0; // force to zero&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; SET_RESILIENCE(&amp;quot;Wounds&amp;quot;,curwounds);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; SET_RESILIENCE(&amp;quot;Wounds&amp;quot;,curwounds);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; curcritical--; // scratch off a critical wound box&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; SET_RESILIENCE(&amp;quot;Critical&amp;quot;,curcritical);&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; INCAPACITATED(); // show incapacitation&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; INCAPACITATED(); // show incapacitation&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; } else if ( curwounds &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt; 1 &lt;/del&gt;&amp;amp;&amp;amp; curcritical &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt; &lt;/del&gt;1 ) { // out of critical wounds&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;?&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; } else if ( curwounds &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;== 0 &lt;/ins&gt;&amp;amp;&amp;amp; curcritical &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt; &lt;/ins&gt;1 ) &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;{ // out of wounds, but still have critical&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; curwounds = 0; // force zero&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; SET_RESILIENCE(&amp;quot;Wounds&amp;quot;,curwounds);&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; curcritical--; // force zero&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; SET_RESILIENCE(&amp;quot;Critical&amp;quot;,curcritical);&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; } else &lt;/ins&gt;{ // out of critical wounds &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;too, dead!&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; curwounds = 0; // force zero&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; curwounds = 0; // force zero&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; SET_RESILIENCE(&amp;quot;Wounds&amp;quot;,curwounds);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; SET_RESILIENCE(&amp;quot;Wounds&amp;quot;,curwounds);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Allen Kerensky</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/index.php?title=User:Allen_Kerensky/Myriad_Lite/Myriad_Lite_Module_Resilience-v0.0.4-20120827.lsl&amp;diff=30556&amp;oldid=prev</id>
		<title>Allen Kerensky: added more METER() calls for better updates</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=User:Allen_Kerensky/Myriad_Lite/Myriad_Lite_Module_Resilience-v0.0.4-20120827.lsl&amp;diff=30556&amp;oldid=prev"/>
				<updated>2012-08-28T01:05:34Z</updated>
		
		<summary type="html">&lt;p&gt;added more METER() calls for better updates&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 01:05, 28 August 2012&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 93:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 93:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;DEAD() {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;DEAD() {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; FLAG_DEAD = TRUE; // remember that we're now dead&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; FLAG_DEAD = TRUE; // remember that we're now dead&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; METER(); // update hover text&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; llStartAnimation(ANIM_DEAD); // start dead animation&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; llStartAnimation(ANIM_DEAD); // start dead animation&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; RPEVENT(&amp;quot;has been killed!&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; RPEVENT(&amp;quot;has been killed!&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 99:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 98:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; llMessageLinked(LINK_THIS,MODULE_RESILIENCE,&amp;quot;DEAD&amp;quot;,PLAYERID);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; llMessageLinked(LINK_THIS,MODULE_RESILIENCE,&amp;quot;DEAD&amp;quot;,PLAYERID);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; // FIXME if ( DEATHPOINT != ZERO_VECTOR ) osTeleportAgent(llGetKey(),DEATHPOINT);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; // FIXME if ( DEATHPOINT != ZERO_VECTOR ) osTeleportAgent(llGetKey(),DEATHPOINT);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; METER(); // update hover text&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; llSetTimerEvent(RESPAWN_TIME); // respawn in a bit&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; llSetTimerEvent(RESPAWN_TIME); // respawn in a bit&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 172:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 172:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; FLAG_DEAD = FALSE; // no longer dead&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; FLAG_DEAD = FALSE; // no longer dead&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; llMessageLinked(LINK_THIS,MODULE_RESILIENCE,&amp;quot;ALIVE&amp;quot;,PLAYERID);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; llMessageLinked(LINK_THIS,MODULE_RESILIENCE,&amp;quot;ALIVE&amp;quot;,PLAYERID);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; METER();&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; reborn = TRUE; // show rebirth in summary report&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; reborn = TRUE; // show rebirth in summary report&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; DEBUG(&amp;quot;Heal: reborn&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; DEBUG(&amp;quot;Heal: reborn&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 184:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 185:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; FLAG_INCAPACITATED = FALSE; // no longer gravely wounded&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; FLAG_INCAPACITATED = FALSE; // no longer gravely wounded&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; llMessageLinked(LINK_THIS,MODULE_RESILIENCE,&amp;quot;REVIVED&amp;quot;,PLAYERID);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; llMessageLinked(LINK_THIS,MODULE_RESILIENCE,&amp;quot;REVIVED&amp;quot;,PLAYERID);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; METER();&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; revived = TRUE; // show revival in summary report&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; revived = TRUE; // show revival in summary report&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; DEBUG(&amp;quot;Heal: Revived!&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; DEBUG(&amp;quot;Heal: Revived!&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 260:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 262:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; if ( MOVELOCK == &amp;lt;0,0,0&amp;gt; ) MOVELOCK = llGetPos();&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; if ( MOVELOCK == &amp;lt;0,0,0&amp;gt; ) MOVELOCK = llGetPos();&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; llMoveToTarget(MOVELOCK,TAU);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; llMoveToTarget(MOVELOCK,TAU);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; METER(); // update meter&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; llStartAnimation(ANIM_INCAPACITATED); // &amp;quot;we're hurt and down&amp;quot; animation&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; llStartAnimation(ANIM_INCAPACITATED); // &amp;quot;we're hurt and down&amp;quot; animation&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; RPEVENT(&amp;quot;has been incapacitated!&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; RPEVENT(&amp;quot;has been incapacitated!&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; llOwnerSay(&amp;quot;You've been incapacitated!&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; llOwnerSay(&amp;quot;You've been incapacitated!&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; llMessageLinked(LINK_THIS,MODULE_RESILIENCE,&amp;quot;INCAPACITATED&amp;quot;,PLAYERID);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; llMessageLinked(LINK_THIS,MODULE_RESILIENCE,&amp;quot;INCAPACITATED&amp;quot;,PLAYERID);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; METER(); // update meter&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; llSetTimerEvent(RESPAWN_TIME); // heal in a bit&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; llSetTimerEvent(RESPAWN_TIME); // heal in a bit&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 308:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 310:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; llMessageLinked(LINK_THIS,MODULE_RESILIENCE,&amp;quot;SET_RESILIENCE|&amp;quot;+name+&amp;quot;=&amp;quot;+(string)value,llGetOwner());&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; llMessageLinked(LINK_THIS,MODULE_RESILIENCE,&amp;quot;SET_RESILIENCE|&amp;quot;+name+&amp;quot;=&amp;quot;+(string)value,llGetOwner());&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; METER();&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 341:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 344:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; curwounds--; // scratch off one&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; curwounds--; // scratch off one&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; SET_RESILIENCE(&amp;quot;Wounds&amp;quot;,curwounds);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; SET_RESILIENCE(&amp;quot;Wounds&amp;quot;,curwounds);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; METER(); // update&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; llOwnerSay(&amp;quot;You've been wounded!&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; llOwnerSay(&amp;quot;You've been wounded!&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; } else if ( curwounds &amp;lt; 1 &amp;amp;&amp;amp; curcritical &amp;gt; 0 ) { // incapacitated&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; } else if ( curwounds &amp;lt; 1 &amp;amp;&amp;amp; curcritical &amp;gt; 0 ) { // incapacitated&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 475:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 477:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; if ( FLAG_DEAD == TRUE ) { // if dead&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; if ( FLAG_DEAD == TRUE ) { // if dead&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; RPEVENT(&amp;quot;respawns!&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; RPEVENT(&amp;quot;respawns!&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;llMessageLinked&lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;LINK_THIS,MODULE_RESILIENCE,&amp;quot;ALIVE&amp;quot;,PLAYERID&lt;/del&gt;);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;HEAL&lt;/ins&gt;(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;100&lt;/ins&gt;); &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;// heal 100 points of damage to respawn&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; //FIXME if ( RESPAWNPOINT != ZERO_VECTOR ) osTeleportAgent(llGetKey(),RESPAWNPOINT);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; //FIXME if ( RESPAWNPOINT != ZERO_VECTOR ) osTeleportAgent(llGetKey(),RESPAWNPOINT);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; if ( RESPAWNPOINT != ZERO_VECTOR ) llTeleportAgentHome(PLAYERID);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; if ( RESPAWNPOINT != ZERO_VECTOR ) llTeleportAgentHome(PLAYERID);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; RESET(); // heal 100 points of damage to respawn&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; if ( FLAG_INCAPACITATED == TRUE ) { // if hurt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; if ( FLAG_INCAPACITATED == TRUE ) { // if hurt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Allen Kerensky</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/index.php?title=User:Allen_Kerensky/Myriad_Lite/Myriad_Lite_Module_Resilience-v0.0.4-20120827.lsl&amp;diff=30553&amp;oldid=prev</id>
		<title>Allen Kerensky: Myriad_Lite_Module_Resilience-v0.0.4-20120827.lsl</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=User:Allen_Kerensky/Myriad_Lite/Myriad_Lite_Module_Resilience-v0.0.4-20120827.lsl&amp;diff=30553&amp;oldid=prev"/>
				<updated>2012-08-27T22:31:32Z</updated>
		
		<summary type="html">&lt;p&gt;Myriad_Lite_Module_Resilience-v0.0.4-20120827.lsl&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Myriad_Lite_Module_Resilience-v0.0.4-20120827.lsl =&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;lsl&amp;quot;&amp;gt;&lt;br /&gt;
// Myriad_Lite_Module_Resilience-v0.0.4-20120827.lsl&lt;br /&gt;
// Copyright (c) 2012 by Allen Kerensky (OSG/SL) All Rights Reserved.&lt;br /&gt;
// This work is dual-licensed under&lt;br /&gt;
// Creative Commons Attribution (CC BY) 3.0 Unported&lt;br /&gt;
// http://creativecommons.org/licenses/by/3.0/&lt;br /&gt;
// - or -&lt;br /&gt;
// Modified BSD License (3-clause)&lt;br /&gt;
// Redistribution and use in source and binary forms, with or without&lt;br /&gt;
// modification, are permitted provided that the following conditions are met:&lt;br /&gt;
// * Redistributions of source code must retain the above copyright notice, &lt;br /&gt;
//   this list of conditions and the following disclaimer.&lt;br /&gt;
// * Redistributions in binary form must reproduce the above copyright notice,&lt;br /&gt;
//   this list of conditions and the following disclaimer in the documentation&lt;br /&gt;
//   and/or other materials provided with the distribution.&lt;br /&gt;
// * Neither the name of Myriad Lite nor the names of its contributors may be&lt;br /&gt;
//   used to endorse or promote products derived from this software without&lt;br /&gt;
//   specific prior written permission.&lt;br /&gt;
//&lt;br /&gt;
// THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR&lt;br /&gt;
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES&lt;br /&gt;
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN&lt;br /&gt;
// NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,&lt;br /&gt;
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT&lt;br /&gt;
// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,&lt;br /&gt;
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY&lt;br /&gt;
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT&lt;br /&gt;
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF&lt;br /&gt;
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
//&lt;br /&gt;
// The Myriad RPG System was designed, written, and illustrated by Ashok Desai&lt;br /&gt;
// Myriad RPG System licensed under:&lt;br /&gt;
// Creative Commons Attribution (CC BY) 2.0 UK: England and Wales&lt;br /&gt;
// http://creativecommons.org/licenses/by/2.0/uk/&lt;br /&gt;
&lt;br /&gt;
// CONSTANTS - DO NOT CHANGE DURING RUN&lt;br /&gt;
string VERSION = &amp;quot;0.0.4&amp;quot;; // Allen Kerensky's script version&lt;br /&gt;
string VERDATE = &amp;quot;20120827&amp;quot;; // Allen Kerensky's script yyyymmdd&lt;br /&gt;
integer MINSTAT = 1; // min value for statistics&lt;br /&gt;
integer MAXSTAT = 5; // max human value for a statistic/attribute&lt;br /&gt;
integer MINRESILIENCE = 0; // min value for resilience&lt;br /&gt;
integer MAXRESILIENCE = 20; // max value for resilience&lt;br /&gt;
integer MINSKILL = 1; // min value for skill rank&lt;br /&gt;
integer MAXSKILL = 5; // max value for skill rank&lt;br /&gt;
integer CHANMYRIAD = -999; // chat sent to ALL Myriad players in region&lt;br /&gt;
float RESPAWN_TIME = 30.0; // time dead before automatic respawn&lt;br /&gt;
string DIV = &amp;quot;|&amp;quot;; // message field divider&lt;br /&gt;
string ANIM_INCAPACITATED = &amp;quot;sleep&amp;quot;; // anim when incapacitated&lt;br /&gt;
string ANIM_DEAD = &amp;quot;dead&amp;quot;; // anim when dead&lt;br /&gt;
integer MAXARMOR = 5; // max legal armor rating&lt;br /&gt;
&lt;br /&gt;
// Module to Module Messaging Constants&lt;br /&gt;
// integer MODULE_HUD = -1;&lt;br /&gt;
// integer MODULE_CHARSHEET = -2;&lt;br /&gt;
// integer MODULE_ARMOR = -3;&lt;br /&gt;
// integer MODULE_BAM = -4;&lt;br /&gt;
// integer MODULE_RUMORS = -5;&lt;br /&gt;
// integer MODULE_CLOSE = -6;&lt;br /&gt;
// integer MODULE_RANGED = -7;&lt;br /&gt;
integer MODULE_RESILIENCE = -8;&lt;br /&gt;
// integer MODULE_PROGRESS = -9;&lt;br /&gt;
// integer MODULE_WELL = -10;&lt;br /&gt;
// integer MODULE_METER = -11;&lt;br /&gt;
integer LM_SENDTOATTACHMENT = 0x80000000;&lt;br /&gt;
&lt;br /&gt;
// RUNTIME GLOBALS - CAN CHANGE DURING RUN&lt;br /&gt;
integer FLAG_DEBUG; // see debug messages?&lt;br /&gt;
key PLAYERID = NULL_KEY; // cached player UUID&lt;br /&gt;
string PLAYERNAME = &amp;quot;&amp;quot;; // cached player name&lt;br /&gt;
string NAME = &amp;quot;&amp;quot;; // character name&lt;br /&gt;
string SPECIES = &amp;quot;&amp;quot;; // character species&lt;br /&gt;
string BACKGROUND = &amp;quot;&amp;quot;; // character childhood history&lt;br /&gt;
string CAREER = &amp;quot;&amp;quot;; // character career or faction&lt;br /&gt;
list STATISTICS = [];&lt;br /&gt;
list RESILIENCES = [];&lt;br /&gt;
list CURRENT_RESILIENCES = [];&lt;br /&gt;
list SKILLS = []; // skills [ string SkillName, integer SkillRank ]&lt;br /&gt;
integer FLAG_ANIMATE; //&lt;br /&gt;
integer FLAG_INCAPACITATED; // incapacitated by wounds?&lt;br /&gt;
integer FLAG_DEAD; // killed by critical wounds?&lt;br /&gt;
vector  MOVELOCK = &amp;lt;0,0,0&amp;gt;; // movelock position when incapacitated or dead&lt;br /&gt;
float   TAU = 0.05; // movelock tau&lt;br /&gt;
integer CURARMOR = 0; // highest armor value worn out of all armor worn, not a total&lt;br /&gt;
&lt;br /&gt;
// FIXME MOVE THIS TO ARMOR AND SEND LINK MESSAGES&lt;br /&gt;
integer CHANATTACH = 0; // dynamic channel for attachments&lt;br /&gt;
&lt;br /&gt;
vector DEATHPOINT; // OPENSIM ONLY coordinates to move to on death&lt;br /&gt;
vector RESPAWNPOINT; // OPENSIM ONLY coordinates to move to on respawn&lt;br /&gt;
&lt;br /&gt;
// DEAD - player is dead, kill them and wait to respawn&lt;br /&gt;
DEAD() {&lt;br /&gt;
    FLAG_DEAD = TRUE; // remember that we're now dead&lt;br /&gt;
    METER(); // update hover text&lt;br /&gt;
    llStartAnimation(ANIM_DEAD); // start dead animation&lt;br /&gt;
    RPEVENT(&amp;quot;has been killed!&amp;quot;);&lt;br /&gt;
    llOwnerSay(&amp;quot;You've been killed!&amp;quot;);&lt;br /&gt;
    llMessageLinked(LINK_THIS,MODULE_RESILIENCE,&amp;quot;DEAD&amp;quot;,PLAYERID);&lt;br /&gt;
    // FIXME if ( DEATHPOINT != ZERO_VECTOR ) osTeleportAgent(llGetKey(),DEATHPOINT);&lt;br /&gt;
    llSetTimerEvent(RESPAWN_TIME); // respawn in a bit&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// DEBUG - show debug chat with wearer name for sorting&lt;br /&gt;
DEBUG(string dmessage) {&lt;br /&gt;
    if ( FLAG_DEBUG == TRUE ) { // are we debugging?&lt;br /&gt;
        llSay(DEBUG_CHANNEL,&amp;quot;(&amp;quot;+llKey2Name(PLAYERID)+&amp;quot;) Module Resilience: &amp;quot;+dmessage);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// DEBUGOFF - turn off the DEBUG flag&lt;br /&gt;
DEBUGOFF() {&lt;br /&gt;
    DEBUG(&amp;quot;Debug Mode Deactivated&amp;quot;);&lt;br /&gt;
    FLAG_DEBUG = FALSE; // set debug flag to FALSE&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// DEBUGON - turn on the DEBUG flag&lt;br /&gt;
DEBUGON() {&lt;br /&gt;
    FLAG_DEBUG = TRUE; // set debug flag TRUE&lt;br /&gt;
    DEBUG(&amp;quot;Debug Mode Activated&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// ERROR - show errors on debug channel with wearer name for sorting&lt;br /&gt;
ERROR(string emessage) {&lt;br /&gt;
    llSay(DEBUG_CHANNEL,&amp;quot;ERROR (&amp;quot;+llKey2Name(PLAYERID)+&amp;quot;): &amp;quot;+emessage);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// GET_MAX_RESILIENCE&lt;br /&gt;
integer GET_MAX_RESILIENCE(string name) {&lt;br /&gt;
    integer pos = llListFindList(RESILIENCES,[name]);&lt;br /&gt;
    if ( pos &amp;gt;= 0 ) {&lt;br /&gt;
        return llList2Integer(RESILIENCES,pos + 1);&lt;br /&gt;
    }&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// GET_RESILIENCE&lt;br /&gt;
integer GET_RESILIENCE(string name) {&lt;br /&gt;
    integer pos = llListFindList(CURRENT_RESILIENCES,[name]);&lt;br /&gt;
    if ( pos &amp;gt;= 0 ) {&lt;br /&gt;
        return llList2Integer(CURRENT_RESILIENCES,pos + 1);&lt;br /&gt;
    }&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// GETVERSION&lt;br /&gt;
GETVERSION() {&lt;br /&gt;
    SENDTOHUD(&amp;quot;VERSION=&amp;quot;+VERSION+DIV+&amp;quot;VERSIONDATE=&amp;quot;+VERDATE+DIV+llGetObjectName());&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// HEAL - restore lost WOUND and CRITICAL resilience&lt;br /&gt;
// Thanks to Artemis Tesla for contributing summary report logic&lt;br /&gt;
HEAL(integer healamount) {&lt;br /&gt;
    integer critsHealed = 0; // track how many crit boxes restored for summary report&lt;br /&gt;
    integer woundsHealed = 0; // track how many non-crit boxes restored for summary report&lt;br /&gt;
    integer reborn = FALSE; // track if reborn/respawn or not for summary report&lt;br /&gt;
    integer revived = FALSE;  // track of revived or not for summary report&lt;br /&gt;
    integer curwounds = GET_RESILIENCE(&amp;quot;Wounds&amp;quot;);&lt;br /&gt;
    integer maxwounds = GET_MAX_RESILIENCE(&amp;quot;Wounds&amp;quot;);&lt;br /&gt;
    integer curcritical = GET_RESILIENCE(&amp;quot;Critical&amp;quot;);&lt;br /&gt;
    integer maxcritical = GET_MAX_RESILIENCE(&amp;quot;Critical&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    // TODO report once for multiple healing amounts&lt;br /&gt;
    while ( healamount-- ) {&lt;br /&gt;
        // step through each point of healing&lt;br /&gt;
        if ( curcritical &amp;lt; maxcritical ) { // is current critical less than max critical&lt;br /&gt;
            DEBUG(&amp;quot;Heal one critical wound&amp;quot;);&lt;br /&gt;
            curcritical++; // heal one current critical&lt;br /&gt;
            SET_RESILIENCE(&amp;quot;Critical&amp;quot;,curcritical);&lt;br /&gt;
            critsHealed++; // add a point back&lt;br /&gt;
            if ( FLAG_DEAD == TRUE ) {   // healed a critical, critical now &amp;gt; 0 so not dead anymore&lt;br /&gt;
                FLAG_DEAD = FALSE; // no longer dead&lt;br /&gt;
                llMessageLinked(LINK_THIS,MODULE_RESILIENCE,&amp;quot;ALIVE&amp;quot;,PLAYERID);&lt;br /&gt;
                reborn = TRUE; // show rebirth in summary report&lt;br /&gt;
                DEBUG(&amp;quot;Heal: reborn&amp;quot;);&lt;br /&gt;
            }&lt;br /&gt;
        } else {&lt;br /&gt;
                if ( curwounds &amp;lt; maxwounds ) {   // player not critical, heal non-critical?&lt;br /&gt;
                    DEBUG(&amp;quot;Heal one wound&amp;quot;);&lt;br /&gt;
                    curwounds++; // add the healing point to current wounds&lt;br /&gt;
                    SET_RESILIENCE(&amp;quot;Wounds&amp;quot;,curwounds);&lt;br /&gt;
                    woundsHealed++; // add a point of non-critical&lt;br /&gt;
                    if ( FLAG_INCAPACITATED == TRUE ) { // were they incapacitated?&lt;br /&gt;
                        FLAG_INCAPACITATED = FALSE; // no longer gravely wounded&lt;br /&gt;
                        llMessageLinked(LINK_THIS,MODULE_RESILIENCE,&amp;quot;REVIVED&amp;quot;,PLAYERID);&lt;br /&gt;
                        revived = TRUE; // show revival in summary report&lt;br /&gt;
                        DEBUG(&amp;quot;Heal: Revived!&amp;quot;);&lt;br /&gt;
                        llStopMoveToTarget();&lt;br /&gt;
                        MOVELOCK = &amp;lt;0,0,0&amp;gt;;&lt;br /&gt;
                    }&lt;br /&gt;
                } // end if curwounds &amp;lt; wounds&lt;br /&gt;
        }&lt;br /&gt;
    } // end while&lt;br /&gt;
&lt;br /&gt;
    // Summary report of healing effects&lt;br /&gt;
    if ( critsHealed &amp;gt; 0 ) {   // was at least one critical healed?&lt;br /&gt;
        DEBUG(&amp;quot;Critical Heal: &amp;quot;+(string)curcritical+&amp;quot; of &amp;quot;+(string)maxcritical+&amp;quot; critical wound boxes.&amp;quot;);&lt;br /&gt;
        if (critsHealed &amp;gt; 1) { // was more then one critical wound healed?&lt;br /&gt;
            llOwnerSay(&amp;quot;Critical &amp;quot; + (string)critsHealed + &amp;quot; wounds healed.&amp;quot;);&lt;br /&gt;
        } else {&lt;br /&gt;
            llOwnerSay(&amp;quot;Critical &amp;quot; + (string)critsHealed + &amp;quot; wound healed.&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    if (reborn == TRUE ) { // if player reborn from this heal&lt;br /&gt;
        RPEVENT(&amp;quot;has been resurrected!&amp;quot;);&lt;br /&gt;
        if ( FLAG_ANIMATE == TRUE ) { // if we're allowed to change animations&lt;br /&gt;
            llStopAnimation(ANIM_DEAD); // stop &amp;quot;we're dead&amp;quot; animation&lt;br /&gt;
        }&lt;br /&gt;
        llOwnerSay(&amp;quot;You've been resurrected! Welcome back to the land of the living.&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    if ( woundsHealed &amp;gt; 0 ) { // was at least 1 non-critical healed?&lt;br /&gt;
        DEBUG(&amp;quot;Heal Non-Critical Wounds: &amp;quot;+(string)curwounds+&amp;quot; of &amp;quot;+(string)maxwounds+&amp;quot; non-critical wound boxes.&amp;quot;);&lt;br /&gt;
        if (woundsHealed &amp;gt; 1) { // was more than one non-critical healed?&lt;br /&gt;
            llOwnerSay((string)woundsHealed + &amp;quot; non-critical wounds healed.&amp;quot;);&lt;br /&gt;
        } else {&lt;br /&gt;
                llOwnerSay((string)woundsHealed + &amp;quot; non-critical wound healed.&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    if ( revived == TRUE ) { // if player revived from this heal&lt;br /&gt;
        RPEVENT(&amp;quot;has revived and is no longer incapacitated!&amp;quot;);&lt;br /&gt;
        if ( FLAG_ANIMATE == TRUE ) { // if we're allowed to change anims&lt;br /&gt;
            llStopAnimation(ANIM_INCAPACITATED); // stop the &amp;quot;we're down&amp;quot; animation&lt;br /&gt;
        }&lt;br /&gt;
        llOwnerSay(&amp;quot;You are no longer incapacitated! Welcome back to the fight!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    METER(); // update hovertext&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// HIT - player is hit - check to see if attack dice breach armor&lt;br /&gt;
// Making A Damage Roll (Myriad p25, Myriad Special Edition p31)&lt;br /&gt;
HIT(integer attackdice) {&lt;br /&gt;
    integer damagetaken = 0; // start with zero damage&lt;br /&gt;
    while(attackdice--) { // roll for each attack dice&lt;br /&gt;
        integer dieroll = 1+(integer)llFrand(5.0); // reasonably uniform d6&lt;br /&gt;
        if ( dieroll &amp;gt; CURARMOR ) { // attack roll stronger than armor worn?&lt;br /&gt;
            damagetaken++; // add a wound point&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    // finished roll how did we do?&lt;br /&gt;
    if ( damagetaken &amp;gt; 0 ) { // we took damage&lt;br /&gt;
        if ( CURARMOR &amp;gt; 0 ) { // wearing armor? tell them it was breached&lt;br /&gt;
            llOwnerSay(&amp;quot;That attack penetrated your armor and you've been wounded!&amp;quot;);&lt;br /&gt;
            llWhisper(CHANATTACH,&amp;quot;ARMOREFFECTHIT&amp;quot;);&lt;br /&gt;
        } else { // fighting in no armor?&lt;br /&gt;
            llOwnerSay(&amp;quot;You've been wounded! Wear some armor next time?&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        WOUNDED(damagetaken); // apply damage taken to resilences&lt;br /&gt;
    } else { // hit, but no damage taken&lt;br /&gt;
        // must be wearing *some* armor to be hit but avoid a wound, don't recheck for armor here&lt;br /&gt;
        llOwnerSay(&amp;quot;Your armor blocked the damage from that attack!&amp;quot;);&lt;br /&gt;
        llWhisper(CHANATTACH,&amp;quot;ARMOREFFECTBLOCKED&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// INCAPACITATED - player lost all WOUNDS - unable to act&lt;br /&gt;
INCAPACITATED() {&lt;br /&gt;
    FLAG_INCAPACITATED = TRUE; // yes, we're now incapacitated&lt;br /&gt;
    if ( MOVELOCK == &amp;lt;0,0,0&amp;gt; ) MOVELOCK = llGetPos();&lt;br /&gt;
    llMoveToTarget(MOVELOCK,TAU);&lt;br /&gt;
    METER(); // update meter&lt;br /&gt;
    llStartAnimation(ANIM_INCAPACITATED); // &amp;quot;we're hurt and down&amp;quot; animation&lt;br /&gt;
    RPEVENT(&amp;quot;has been incapacitated!&amp;quot;);&lt;br /&gt;
    llOwnerSay(&amp;quot;You've been incapacitated!&amp;quot;);&lt;br /&gt;
    llMessageLinked(LINK_THIS,MODULE_RESILIENCE,&amp;quot;INCAPACITATED&amp;quot;,PLAYERID);&lt;br /&gt;
    llSetTimerEvent(RESPAWN_TIME); // heal in a bit&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// METER - update a hovertext health meter or HUD bar graph&lt;br /&gt;
METER() {&lt;br /&gt;
    llMessageLinked(LINK_THIS,MODULE_RESILIENCE,&amp;quot;METER&amp;quot;,PLAYERID);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// RESET - shut down running animations then reset the script to reload character sheet&lt;br /&gt;
RESET() {    &lt;br /&gt;
    llResetScript(); // now reset&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// RPEVENT&lt;br /&gt;
// FIXME - change all RPEVENT to link message for main HUD to send?&lt;br /&gt;
RPEVENT(string rpevent) {&lt;br /&gt;
    llRegionSay(CHANMYRIAD,&amp;quot;RPEVENT|&amp;quot;+NAME+&amp;quot; (&amp;quot;+PLAYERNAME+&amp;quot;) &amp;quot;+rpevent);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// SET_RESILIENCE&lt;br /&gt;
SET_RESILIENCE(string name,integer value) {&lt;br /&gt;
    if ( value &amp;lt; MINRESILIENCE || value &amp;gt; MAXRESILIENCE ) {&lt;br /&gt;
        ERROR(&amp;quot;Resilience rank &amp;quot;+(string)name+&amp;quot; out of allowed range &amp;quot;+(string)MINRESILIENCE+&amp;quot;-&amp;quot;+(string)MAXRESILIENCE);&lt;br /&gt;
         return;&lt;br /&gt;
    } // out of range&lt;br /&gt;
    integer curpos = llListFindList(CURRENT_RESILIENCES,[name]);&lt;br /&gt;
    integer curval;&lt;br /&gt;
    integer maxval;&lt;br /&gt;
    if ( curpos &amp;gt;= 0 ) {&lt;br /&gt;
        curval = llList2Integer(CURRENT_RESILIENCES,curpos + 1);&lt;br /&gt;
    } else { // resilience not found&lt;br /&gt;
        CURRENT_RESILIENCES = [name,value] + CURRENT_RESILIENCES;&lt;br /&gt;
        RESILIENCES = [name,value] + RESILIENCES;&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
    integer maxpos = llListFindList(RESILIENCES,[name]);&lt;br /&gt;
    if ( maxpos &amp;gt;=0 ) {&lt;br /&gt;
        maxval = llList2Integer(RESILIENCES,maxpos + 1);&lt;br /&gt;
    }&lt;br /&gt;
    if ( value &amp;lt;= maxval) {&lt;br /&gt;
        CURRENT_RESILIENCES = llListReplaceList(CURRENT_RESILIENCES,[value],curpos + 1, curpos + 1);&lt;br /&gt;
    }&lt;br /&gt;
    llMessageLinked(LINK_THIS,MODULE_RESILIENCE,&amp;quot;SET_RESILIENCE|&amp;quot;+name+&amp;quot;=&amp;quot;+(string)value,llGetOwner());&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// SENDTOHUD - send reponses to HUD as Link Messages&lt;br /&gt;
SENDTOHUD(string str) {&lt;br /&gt;
    DEBUG(&amp;quot;SENDTOHUD(&amp;quot;+str+&amp;quot;)&amp;quot;);&lt;br /&gt;
    llMessageLinked(LINK_THIS,LM_SENDTOATTACHMENT,str,PLAYERID);    &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// SETUP - begin bringing the HUD online&lt;br /&gt;
SETUP() {&lt;br /&gt;
    FLAG_DEBUG = FALSE;&lt;br /&gt;
    PLAYERID = llGetOwner(); // remember the owner's UUID&lt;br /&gt;
    PLAYERNAME = llKey2Name(PLAYERID); // remember the owner's legacy name&lt;br /&gt;
    CHANATTACH = (integer)(&amp;quot;0x&amp;quot;+llGetSubString((string)PLAYERID,1,7)); // attachment-specific channel&lt;br /&gt;
    llRegionSay(CHANMYRIAD,&amp;quot;GET_REGION_SETTING|DEATHPOINT&amp;quot;);&lt;br /&gt;
    llRegionSay(CHANMYRIAD,&amp;quot;GET_REGION_SETTING|RESPAWNPOINT&amp;quot;);&lt;br /&gt;
    llRequestPermissions(PLAYERID,PERMISSION_TRIGGER_ANIMATION);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// WOUNDED - Player takes Resilience damage&lt;br /&gt;
WOUNDED(integer amount) {&lt;br /&gt;
    while (amount--) { // for each wound taken&lt;br /&gt;
        integer curwounds = GET_RESILIENCE(&amp;quot;Wounds&amp;quot;);&lt;br /&gt;
        integer curcritical = GET_RESILIENCE(&amp;quot;Critical&amp;quot;);&lt;br /&gt;
        integer maxcritical = GET_MAX_RESILIENCE(&amp;quot;Critical&amp;quot;);&lt;br /&gt;
        if ( curwounds &amp;gt; 0 &amp;amp;&amp;amp; curcritical != maxcritical ) {&lt;br /&gt;
            llSay(DEBUG_CHANNEL,&amp;quot;ERROR! WOUND STATE IS NONSENSE! CANNOT APPLY DAMAGE!&amp;quot;);&lt;br /&gt;
            llOwnerSay(&amp;quot;ERROR! WOUND STATE IS NONSENSE! CANNOT APPLY DAMAGE! TELL ALLEN KERENSKY!&amp;quot;);&lt;br /&gt;
            return;&lt;br /&gt;
        }&lt;br /&gt;
        if ( curwounds &amp;gt; 0 &amp;amp;&amp;amp; curcritical == maxcritical ) { // wound boxes left?&lt;br /&gt;
            curwounds--; // scratch off one&lt;br /&gt;
            SET_RESILIENCE(&amp;quot;Wounds&amp;quot;,curwounds);&lt;br /&gt;
            METER(); // update&lt;br /&gt;
            llOwnerSay(&amp;quot;You've been wounded!&amp;quot;);&lt;br /&gt;
        } else if ( curwounds &amp;lt; 1 &amp;amp;&amp;amp; curcritical &amp;gt; 0 ) { // incapacitated&lt;br /&gt;
            curwounds = 0; // force to zero&lt;br /&gt;
            SET_RESILIENCE(&amp;quot;Wounds&amp;quot;,curwounds);&lt;br /&gt;
            curcritical--; // scratch off a critical wound box&lt;br /&gt;
            SET_RESILIENCE(&amp;quot;Critical&amp;quot;,curcritical);&lt;br /&gt;
            INCAPACITATED(); // show incapacitation&lt;br /&gt;
        } else if ( curwounds &amp;lt; 1 &amp;amp;&amp;amp; curcritical &amp;lt; 1 ) { // out of critical wounds?&lt;br /&gt;
            curwounds = 0; // force zero&lt;br /&gt;
            SET_RESILIENCE(&amp;quot;Wounds&amp;quot;,curwounds);&lt;br /&gt;
            curcritical = 0; // force zero&lt;br /&gt;
            SET_RESILIENCE(&amp;quot;Critical&amp;quot;,curcritical);&lt;br /&gt;
            DEAD(); // show death&lt;br /&gt;
        }&lt;br /&gt;
    } // end while&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// DEFAULT STATE - load character sheet&lt;br /&gt;
default {&lt;br /&gt;
&lt;br /&gt;
    // CHANGED - triggered for many changes to the avatar&lt;br /&gt;
    // TODO reload sim-specific settings on region change&lt;br /&gt;
    changed(integer changes) {&lt;br /&gt;
        if ( changes &amp;amp; CHANGED_REGION || changes &amp;amp; CHANGED_TELEPORT ) {&lt;br /&gt;
            llRequestPermissions(PLAYERID,PERMISSION_TRIGGER_ANIMATION);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    link_message(integer sender_num,integer sender,string str,key id) {&lt;br /&gt;
        if ( sender == MODULE_RESILIENCE || sender == LM_SENDTOATTACHMENT ) return; // ignore our own link messages&lt;br /&gt;
        DEBUG(&amp;quot;EVENT: link_message(&amp;quot;+(string)sender_num+&amp;quot;,&amp;quot;+(string)sender+&amp;quot;,&amp;quot;+str+&amp;quot;,&amp;quot;+(string)id+&amp;quot;)&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        list fields = llParseString2List(str,[DIV],[]); // break into list of fields based on DIVider&lt;br /&gt;
        string command = llToLower(llStringTrim(llList2String(fields,0),STRING_TRIM)); // assume the first field is a Myriad Lite command    &lt;br /&gt;
        string data = llStringTrim(llList2String(fields,1),STRING_TRIM); // field one is the data&lt;br /&gt;
        list subfields = llParseString2List(data,[&amp;quot;=&amp;quot;],[]); // break data field into comma-delimited subfields if needed&lt;br /&gt;
        &lt;br /&gt;
        // Module Resilience specific commands&lt;br /&gt;
        if ( command == &amp;quot;set_name&amp;quot; ) {&lt;br /&gt;
            NAME = llList2String(subfields,1); // set the name&lt;br /&gt;
            return;&lt;br /&gt;
        }&lt;br /&gt;
        if ( command == &amp;quot;set_species&amp;quot; ) {&lt;br /&gt;
            SPECIES = llList2String(subfields,1); // set the species;&lt;br /&gt;
            return;&lt;br /&gt;
        }&lt;br /&gt;
        if ( command == &amp;quot;set_background&amp;quot; ) {&lt;br /&gt;
            BACKGROUND = llList2String(subfields,1); // set the species;&lt;br /&gt;
            return;&lt;br /&gt;
        }&lt;br /&gt;
        if ( command == &amp;quot;set_career&amp;quot; ) {&lt;br /&gt;
            CAREER = llList2String(subfields,1); // set the species;&lt;br /&gt;
            return;&lt;br /&gt;
        }&lt;br /&gt;
        if ( command == &amp;quot;set_statistic&amp;quot; ) {&lt;br /&gt;
            string statname = llList2String(subfields,0); // find the boon name&lt;br /&gt;
            integer statrank = llList2Integer(subfields,1); // find the boon rank value&lt;br /&gt;
            // TODO how to verify stat names are valid?&lt;br /&gt;
            if ( statrank &amp;gt;= MINSTAT &amp;amp;&amp;amp; statrank &amp;lt;= MAXSTAT ) { // rank valid?&lt;br /&gt;
                STATISTICS = [statname,statrank] + STATISTICS; // add statistic to list&lt;br /&gt;
            } else { // invalid, report it&lt;br /&gt;
                ERROR(&amp;quot;STATISTIC &amp;quot;+statname+&amp;quot; rank &amp;quot;+(string)statrank+&amp;quot; value out of allowed range: &amp;quot;+(string)MINSTAT+&amp;quot;-&amp;quot;+(string)MAXSTAT);&lt;br /&gt;
            }&lt;br /&gt;
            return;&lt;br /&gt;
        }&lt;br /&gt;
        if ( command == &amp;quot;set_resilience&amp;quot; ) {&lt;br /&gt;
            string resname = llList2String(subfields,0); // find the boon name&lt;br /&gt;
            integer resrank = llList2Integer(subfields,1); // find the boon rank value&lt;br /&gt;
            // TODO how to verify resilience names are valid?&lt;br /&gt;
            if ( resrank &amp;gt;= MINRESILIENCE &amp;amp;&amp;amp; resrank &amp;lt;= MAXRESILIENCE ) { // rank valid?&lt;br /&gt;
                RESILIENCES = [resname,resrank] + RESILIENCES; // add resilience to list&lt;br /&gt;
                CURRENT_RESILIENCES = [resname,resrank] + CURRENT_RESILIENCES; // add to current list too&lt;br /&gt;
            } else { // invalid, report it&lt;br /&gt;
                ERROR(&amp;quot;RESILIENCE &amp;quot;+resname+&amp;quot; rank &amp;quot;+(string)resrank+&amp;quot; value out of allowed range: &amp;quot;+(string)MINRESILIENCE+&amp;quot;-&amp;quot;+(string)MAXRESILIENCE);&lt;br /&gt;
            }&lt;br /&gt;
            return;&lt;br /&gt;
        }&lt;br /&gt;
        if ( command == &amp;quot;set_skill&amp;quot; ) {&lt;br /&gt;
            string skillname = llList2String(subfields,0); // find the skill name&lt;br /&gt;
            integer skillrank = llList2Integer(subfields,1); // find the skill rank&lt;br /&gt;
            // TODO how to verify skill names are valid?&lt;br /&gt;
            if ( skillrank &amp;gt;= MINSKILL &amp;amp;&amp;amp; skillrank &amp;lt;= MAXSKILL ) { // skill rank valid?&lt;br /&gt;
                SKILLS = [skillname,skillrank] + SKILLS; // add skill to list&lt;br /&gt;
            } else { // invalid, report it&lt;br /&gt;
                ERROR(&amp;quot;SKILL &amp;quot;+skillname+&amp;quot; rank &amp;quot;+(string)skillrank+&amp;quot; value out of allowed range: &amp;quot;+(string)MINSKILL+&amp;quot;-&amp;quot;+(string)MAXSKILL);&lt;br /&gt;
            }&lt;br /&gt;
            return;&lt;br /&gt;
        }&lt;br /&gt;
        if ( command == &amp;quot;armorcurrent&amp;quot; ) { // ARMORCURRENT|integer newcurrentarmor&lt;br /&gt;
            integer rating = llList2Integer(fields,1);&lt;br /&gt;
            if ( rating &amp;gt;= 0 &amp;amp;&amp;amp; rating &amp;lt;= MAXARMOR ) {&lt;br /&gt;
                CURARMOR = rating;&lt;br /&gt;
            }&lt;br /&gt;
            return;&lt;br /&gt;
        }&lt;br /&gt;
        if ( command == &amp;quot;debugoff&amp;quot; ) { DEBUGOFF(); return; }&lt;br /&gt;
        if ( command == &amp;quot;debugon&amp;quot; ) { DEBUGON(); return; }&lt;br /&gt;
        if ( command == &amp;quot;hit&amp;quot;) {&lt;br /&gt;
            integer attdice = llList2Integer(fields,1);&lt;br /&gt;
            if ( attdice &amp;gt;= 1 &amp;amp;&amp;amp; attdice &amp;lt;= 5 ) {&lt;br /&gt;
                HIT(attdice);&lt;br /&gt;
            }&lt;br /&gt;
            return;&lt;br /&gt;
        }&lt;br /&gt;
        if ( command == &amp;quot;healpartial&amp;quot; ) {&lt;br /&gt;
            integer healpart = llList2Integer(fields,1);&lt;br /&gt;
            HEAL(healpart);&lt;br /&gt;
            return;&lt;br /&gt;
        }&lt;br /&gt;
        if ( command == &amp;quot;healfull&amp;quot; ) { HEAL(100); return; } // FIXME HEAL ALL means 100 points of healing&lt;br /&gt;
        if ( command == &amp;quot;reset&amp;quot; ) { RESET(); return;}&lt;br /&gt;
        if ( command == &amp;quot;version&amp;quot; ) { GETVERSION(); return; } // show the version&lt;br /&gt;
        if ( command == &amp;quot;region_setting&amp;quot; ) { // look for deathpoint and respawnpoint&lt;br /&gt;
            string attrib = llToLower(llStringTrim(llList2String(subfields,0),STRING_TRIM)); // find the boon name&lt;br /&gt;
            vector pos = llList2Vector(subfields,1); // find the boon rank value&lt;br /&gt;
            if ( attrib == &amp;quot;deathpoint&amp;quot; ) { DEATHPOINT = pos; }&lt;br /&gt;
            if ( attrib == &amp;quot;respawnpoint&amp;quot; ) { RESPAWNPOINT = pos; }&lt;br /&gt;
            return;&lt;br /&gt;
        }&lt;br /&gt;
        //COMMAND(str); // send to shared command processor for chat and link messages&lt;br /&gt;
        return;&lt;br /&gt;
    } // end of link_message event&lt;br /&gt;
&lt;br /&gt;
    // STATE ENTRY - called on Reset&lt;br /&gt;
    state_entry() {&lt;br /&gt;
        SETUP(); // show credits and start character sheet load&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // TIMER - scheduled events&lt;br /&gt;
    timer() {&lt;br /&gt;
        // Respawn timer ended&lt;br /&gt;
        if ( FLAG_DEAD == TRUE ) { // if dead&lt;br /&gt;
            RPEVENT(&amp;quot;respawns!&amp;quot;);&lt;br /&gt;
            llMessageLinked(LINK_THIS,MODULE_RESILIENCE,&amp;quot;ALIVE&amp;quot;,PLAYERID);&lt;br /&gt;
            //FIXME if ( RESPAWNPOINT != ZERO_VECTOR ) osTeleportAgent(llGetKey(),RESPAWNPOINT);&lt;br /&gt;
            if ( RESPAWNPOINT != ZERO_VECTOR ) llTeleportAgentHome(PLAYERID);&lt;br /&gt;
            RESET(); // heal 100 points of damage to respawn&lt;br /&gt;
        }&lt;br /&gt;
        if ( FLAG_INCAPACITATED == TRUE ) { // if hurt&lt;br /&gt;
            HEAL(1); // heal 1 wound&lt;br /&gt;
        }&lt;br /&gt;
        integer curwounds = GET_RESILIENCE(&amp;quot;Wounds&amp;quot;);&lt;br /&gt;
        integer maxwounds = GET_MAX_RESILIENCE(&amp;quot;Wounds&amp;quot;);&lt;br /&gt;
        if ( curwounds == maxwounds ) { // fully healed?&lt;br /&gt;
            llSetTimerEvent(0.0); // stop timer&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
} // end state running&lt;br /&gt;
// END&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Allen Kerensky</name></author>	</entry>

	</feed>