<?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_Preview_5%2FTarget</id>
		<title>User:Allen Kerensky/Myriad Lite Preview 5/Target - 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_Preview_5%2FTarget"/>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=User:Allen_Kerensky/Myriad_Lite_Preview_5/Target&amp;action=history"/>
		<updated>2026-04-17T05:53:26Z</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_Preview_5/Target&amp;diff=27332&amp;oldid=prev</id>
		<title>Allen Kerensky: moved User:Allen Kerensky:Myriad Lite Preview 5:Target to User:Allen Kerensky/Myriad Lite Preview 5/Target: move into subsite</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=User:Allen_Kerensky/Myriad_Lite_Preview_5/Target&amp;diff=27332&amp;oldid=prev"/>
				<updated>2012-02-06T22:35:48Z</updated>
		
		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/wiki/User:Allen_Kerensky:Myriad_Lite_Preview_5:Target&quot; class=&quot;mw-redirect&quot; title=&quot;User:Allen Kerensky:Myriad Lite Preview 5:Target&quot;&gt;User:Allen Kerensky:Myriad Lite Preview 5:Target&lt;/a&gt; to &lt;a href=&quot;/wiki/User:Allen_Kerensky/Myriad_Lite_Preview_5/Target&quot; title=&quot;User:Allen Kerensky/Myriad Lite Preview 5/Target&quot;&gt;User:Allen Kerensky/Myriad Lite Preview 5/Target&lt;/a&gt;: move into subsite&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 22:35, 6 February 2012&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_Preview_5/Target&amp;diff=27199&amp;oldid=prev</id>
		<title>Allen Kerensky: created</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=User:Allen_Kerensky/Myriad_Lite_Preview_5/Target&amp;diff=27199&amp;oldid=prev"/>
				<updated>2012-02-06T17:09:41Z</updated>
		
		<summary type="html">&lt;p&gt;created&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Myriad Lite Target =&lt;br /&gt;
&lt;br /&gt;
The practice target is an object that reports the Myriad Lite attacks and damage amounts.&lt;br /&gt;
This is useful for verifying if your objects and scripts are working correctly, or just practicing with your fists and weapons.&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
# Get yourself a &amp;quot;Noob&amp;quot;, which makes a perfectly useful target item: https://marketplace.secondlife.com/p/Art-Laxness-Noob-Pack/371307&lt;br /&gt;
# Drag and Drop in the Myriad Lite Target script from inventory into the object&lt;br /&gt;
&lt;br /&gt;
The noob is now ready to act as target or practice dummy for testing Close Combat with fists or melee weapons and Ranged Combat with firearms.&lt;br /&gt;
&lt;br /&gt;
== Myriad_Lite_Target-v0.0.6-20120202.lsl ==&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
//============================================================================&lt;br /&gt;
// Myriad_Lite_Target-v0.0.6-20120202.lsl&lt;br /&gt;
// Copyright (c) 2012 By Allen Kerensky (OSG/SL)&lt;br /&gt;
// The Myriad RPG System was designed, written, and illustrated by Ashok Desai&lt;br /&gt;
// Myriad RPG licensed under the Creative Commons Attribution 2.0 UK: England and Wales&lt;br /&gt;
// http://creativecommons.org/licenses/by/2.0/uk/&lt;br /&gt;
// Myriad Lite software Copyright (c) 2011-2012 by Allen Kerensky (OSG/SL)&lt;br /&gt;
// Baroun's Adventure Machine Copyright (c) 2008-2011 by Baroun Tardis (SL)&lt;br /&gt;
// Myriad Lite and Baroun's Adventure Machine licensed under the&lt;br /&gt;
// Creative Commons Attribution-Share Alike-Non-Commercial 3.0 Unported&lt;br /&gt;
// http://creativecommons.org/licenses/by-nc-sa/3.0/&lt;br /&gt;
// You must agree to the terms of this license before making any use of this software.&lt;br /&gt;
// If you do not agree to this license, simply delete these materials.&lt;br /&gt;
// There is no warranty, express or implied, for your use of these materials.&lt;br /&gt;
//============================================================================&lt;br /&gt;
&lt;br /&gt;
//============================================================================&lt;br /&gt;
// MESSAGE FORMAT REFERENCE&lt;br /&gt;
//============================================================================&lt;br /&gt;
// CHANPLAYER IN - DEPRECATED - HITCHECK|int attackstat|int attackskill|int attackdice|key owner|str name&lt;br /&gt;
// CHANPLAYER IN - RANGEDHIT|int attackstat|int attackskill|int attackdice|key weaponowner|str name&lt;br /&gt;
// CHANPLAYER IN - CLOSEHIT|int attackstat|int attackskill|int attackdice|key weaponowner|str name&lt;br /&gt;
&lt;br /&gt;
//============================================================================&lt;br /&gt;
// GLOBAL VARIABLES&lt;br /&gt;
//============================================================================&lt;br /&gt;
integer CHANOBJECT; // channel the target listens on for attacks&lt;br /&gt;
integer HANDOBJECT; // chat channel handle to remove channel later if needed&lt;br /&gt;
integer MINSTAT = 1; // minimum value of a statistic&lt;br /&gt;
integer MAXSTAT = 10; // maximum value of a statistic&lt;br /&gt;
integer MINSKILL = 1; // minimum value of a skill&lt;br /&gt;
integer MAXSKILL = 5; // maximum value of a skill&lt;br /&gt;
integer MINDAMAGE = 1; // minimum damage dice a weapon can inflict&lt;br /&gt;
integer MAXDAMAGE = 5; // maximum damage dice a weapon can inflict&lt;br /&gt;
&lt;br /&gt;
//============================================================================&lt;br /&gt;
// GLOBAL ERROR() - report errors on debug channel&lt;br /&gt;
//============================================================================&lt;br /&gt;
ERROR(string errmsg) {&lt;br /&gt;
    llSay(DEBUG_CHANNEL,&amp;quot;ERROR: &amp;quot;+errmsg);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//============================================================================&lt;br /&gt;
// DEFAULT STATE&lt;br /&gt;
//============================================================================&lt;br /&gt;
default {&lt;br /&gt;
    //------------------------------------------------------------------------&lt;br /&gt;
    // STATE_ENTRY EVENT&lt;br /&gt;
    //------------------------------------------------------------------------&lt;br /&gt;
    state_entry() {&lt;br /&gt;
        llSetPrimitiveParams([PRIM_PHANTOM, FALSE]); // ensure all prims are not phantom to register collisions&lt;br /&gt;
        CHANOBJECT = (integer)(&amp;quot;0x&amp;quot;+llGetSubString((string)llGetKey(),0,6)); // calculate dynamic channel to listen on&lt;br /&gt;
        HANDOBJECT = llListen(CHANOBJECT,&amp;quot;&amp;quot;,NULL_KEY,&amp;quot;&amp;quot;); // start listener for attack events&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    //------------------------------------------------------------------------&lt;br /&gt;
    // ON_REZ EVENT&lt;br /&gt;
    //------------------------------------------------------------------------&lt;br /&gt;
    on_rez(integer param) {&lt;br /&gt;
        param = 0; // LSLINT&lt;br /&gt;
        llResetScript(); // nothing drastic, just reset script and start from the top&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    //------------------------------------------------------------------------&lt;br /&gt;
    // LISTEN EVENT - whispers, says, shouts, regionsays&lt;br /&gt;
    //------------------------------------------------------------------------&lt;br /&gt;
    listen(integer channel,string speakername,key speakerid,string message) {&lt;br /&gt;
        speakername = &amp;quot;&amp;quot;; // LSLINT&lt;br /&gt;
        speakerid = NULL_KEY; // LSLINT&lt;br /&gt;
        if ( channel == CHANOBJECT ) { // is this message on the dynamic channel?        &lt;br /&gt;
            list fields = llParseString2List(message,[&amp;quot;|&amp;quot;],[]); // break message into parts split by | symbol&lt;br /&gt;
            string command = llList2String(fields,0); // field 0 is the command&lt;br /&gt;
            if ( command == &amp;quot;HITCHECK&amp;quot; || command == &amp;quot;RANGEDHIT&amp;quot; || command == &amp;quot;CLOSEHIT&amp;quot; ) { // is this an attack command?&lt;br /&gt;
                integer attackstat = llList2Integer(fields,1); // get the value of the attacker's stat&lt;br /&gt;
                integer attackskill = llList2Integer(fields,2); // get the attackers skill level&lt;br /&gt;
                integer attackdice = llList2Integer(fields,3);  // get the attackers weapon attack dice&lt;br /&gt;
                key owner = llList2Key(fields,4); // get the owner of the attacking object&lt;br /&gt;
                string item = llList2String(fields,5); // get the name of the attacking object&lt;br /&gt;
                if ( attackstat &amp;lt; MINSTAT || attackstat &amp;gt; MAXSTAT ) { // is attack stat valid?&lt;br /&gt;
                    ERROR(&amp;quot;Attack stat value out of range: &amp;quot;+(string)MINSTAT+&amp;quot;-&amp;quot;+(string)MAXSTAT); // report the invalid value&lt;br /&gt;
                    return; // exit early since we've hit a fatal error with message&lt;br /&gt;
                }&lt;br /&gt;
                if ( attackskill &amp;lt; MINSKILL || attackstat &amp;gt; MAXSKILL ) { // is attacker skill value valid?&lt;br /&gt;
                    ERROR(&amp;quot;Attack skill value out of range: &amp;quot;+(string)MINSKILL+&amp;quot;-&amp;quot;+(string)MAXSKILL); // report invalid value&lt;br /&gt;
                    return; // exit early since we've hit a fatal error with message&lt;br /&gt;
                }                &lt;br /&gt;
                if ( attackdice &amp;lt; MINDAMAGE || attackdice &amp;gt; MAXDAMAGE ) { // is attack dice of object valid?&lt;br /&gt;
                    ERROR(&amp;quot;Attack dice value out of range: &amp;quot;+(string)MINDAMAGE+&amp;quot;-&amp;quot;+(string)MAXDAMAGE); // report invalid value&lt;br /&gt;
                    return; // exit early since we've hit a fatal error with message&lt;br /&gt;
                }&lt;br /&gt;
                // its all good - report the hit&lt;br /&gt;
                llShout(PUBLIC_CHANNEL,&amp;quot;/me hit by &amp;quot;+llKey2Name(owner)+&amp;quot;'s &amp;quot;+item+&amp;quot; for &amp;quot;+(string)attackdice+&amp;quot; attack dice!&amp;quot;);&lt;br /&gt;
                return; // exit early in case we add more commands later&lt;br /&gt;
            } // end if attack command           &lt;br /&gt;
        } // end if channel object        &lt;br /&gt;
    }    &lt;br /&gt;
} // end default&lt;br /&gt;
//============================================================================&lt;br /&gt;
// END&lt;br /&gt;
//============================================================================&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Allen Kerensky</name></author>	</entry>

	</feed>