<?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%2FHolster</id>
		<title>User:Allen Kerensky/Myriad Lite Preview 5/Holster - 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%2FHolster"/>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=User:Allen_Kerensky/Myriad_Lite_Preview_5/Holster&amp;action=history"/>
		<updated>2026-06-13T07:56:53Z</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/Holster&amp;diff=27327&amp;oldid=prev</id>
		<title>Allen Kerensky: fixed subsite links</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=User:Allen_Kerensky/Myriad_Lite_Preview_5/Holster&amp;diff=27327&amp;oldid=prev"/>
				<updated>2012-02-06T22:34:23Z</updated>
		
		<summary type="html">&lt;p&gt;fixed subsite links&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 22:34, 6 February 2012&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&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;Players can draw weapons from a holster or sheathe to begin combat, or sheathe/holster weapons to withdraw from combat.&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;Players can draw weapons from a holster or sheathe to begin combat, or sheathe/holster weapons to withdraw from combat.&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 class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;See the [[User:Allen_Kerensky&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;:&lt;/del&gt;Myriad_Lite_Preview_5&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;:&lt;/del&gt;Commands|Commands]] page for holster commands.&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;See the [[User:Allen_Kerensky&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;/&lt;/ins&gt;Myriad_Lite_Preview_5&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;/&lt;/ins&gt;Commands|Commands]] page for holster commands.&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 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;== Setup ==&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;== Setup ==&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_Preview_5/Holster&amp;diff=27325&amp;oldid=prev</id>
		<title>Allen Kerensky: moved User:Allen Kerensky:Myriad Lite Preview 5:Holster to User:Allen Kerensky/Myriad Lite Preview 5/Holster: move into subsite</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=User:Allen_Kerensky/Myriad_Lite_Preview_5/Holster&amp;diff=27325&amp;oldid=prev"/>
				<updated>2012-02-06T22:33:55Z</updated>
		
		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/wiki/User:Allen_Kerensky:Myriad_Lite_Preview_5:Holster&quot; class=&quot;mw-redirect&quot; title=&quot;User:Allen Kerensky:Myriad Lite Preview 5:Holster&quot;&gt;User:Allen Kerensky:Myriad Lite Preview 5:Holster&lt;/a&gt; to &lt;a href=&quot;/wiki/User:Allen_Kerensky/Myriad_Lite_Preview_5/Holster&quot; title=&quot;User:Allen Kerensky/Myriad Lite Preview 5/Holster&quot;&gt;User:Allen Kerensky/Myriad Lite Preview 5/Holster&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:33, 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/Holster&amp;diff=27196&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/Holster&amp;diff=27196&amp;oldid=prev"/>
				<updated>2012-02-06T17:00:32Z</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 Holster =&lt;br /&gt;
&lt;br /&gt;
Players can draw weapons from a holster or sheathe to begin combat, or sheathe/holster weapons to withdraw from combat.&lt;br /&gt;
&lt;br /&gt;
See the [[User:Allen_Kerensky:Myriad_Lite_Preview_5:Commands|Commands]] page for holster commands.&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
&lt;br /&gt;
# Create an object to act as a wearable holster for a firearm or a sheathe for a melee weapon.&lt;br /&gt;
# Drag and Drop the Myriad Lite Holster script from inventory into the holster object: ?&lt;br /&gt;
# Attach the object to the desired attachment point.&lt;br /&gt;
# Adjust the position and rotation.&lt;br /&gt;
# Detach the object back to inventory to &amp;quot;save&amp;quot; the new default attach point.&lt;br /&gt;
# Attach or wear the holster when desired.&lt;br /&gt;
&lt;br /&gt;
== Myriad_Lite_Holster-v0.0.1-20120201.lsl ==&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
//============================================================================&lt;br /&gt;
// Myriad_Lite_Holster-v0.0.1-20120201.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;
// CHANATTACH IN - DRAWLEFT,DRAWRIGHT,DRAWBOTH&lt;br /&gt;
// CHANATTACH IN - HOLSTERLEFT,HOLSTERRIGHT,HOLSTERBOTH&lt;br /&gt;
// CHANATTACH IN - SHEATHELEFT,SHEATHERIGHT,SHEATHEBOTH&lt;br /&gt;
&lt;br /&gt;
list LEFTATTACHED = [3,7,20,21,25,26,27,29]; // left side holster attachment slots&lt;br /&gt;
list RIGHTATTACHED = [4,8,18,19,22,23,24,30]; // right side holster attachment slots&lt;br /&gt;
&lt;br /&gt;
//===========================================================================&lt;br /&gt;
// GLOBAL RUNTIMES - runtime variables we change as we go&lt;br /&gt;
// Don't alter anything below if your not  familiar with it.&lt;br /&gt;
//===========================================================================&lt;br /&gt;
integer CHANATTACH = 0; // dynamic channel for attachment messages&lt;br /&gt;
integer HANDATTACH = 0; // chat channel handle for attachment dynamic channel&lt;br /&gt;
&lt;br /&gt;
//===========================================================================&lt;br /&gt;
// GLOBAL SETUP&lt;br /&gt;
//===========================================================================&lt;br /&gt;
SETUP() {&lt;br /&gt;
    CHANATTACH = (integer)(&amp;quot;0x&amp;quot;+llGetSubString((string)llGetOwner(),1,7)); // calculate the dynamic attachment channel&lt;br /&gt;
    if ( HANDATTACH != 0 ) llListenRemove(HANDATTACH); // clean up a previous listener&lt;br /&gt;
    HANDATTACH = llListen(CHANATTACH,&amp;quot;&amp;quot;,NULL_KEY,&amp;quot;&amp;quot;); // start a listener on the attachment channel&lt;br /&gt;
    llSetLinkAlpha(LINK_SET,1.0,ALL_SIDES); // make holster/sheathe visible&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// DRAW THE WEAPON&lt;br /&gt;
DRAW(string hand) {&lt;br /&gt;
    // draw code goes here&lt;br /&gt;
    if ( llListFindList(LEFTATTACHED,[llGetAttached()]) != -1 &amp;amp;&amp;amp; ( hand == &amp;quot;left&amp;quot; || hand == &amp;quot;both&amp;quot; ) ) {&lt;br /&gt;
        llSetLinkAlpha(LINK_SET,0.0,ALL_SIDES); // go invisible when weapon drawn&lt;br /&gt;
    }&lt;br /&gt;
    if ( llListFindList(RIGHTATTACHED,[llGetAttached()]) != -1 &amp;amp;&amp;amp; ( hand == &amp;quot;right&amp;quot; || hand == &amp;quot;both&amp;quot; ) ) {&lt;br /&gt;
        llSetLinkAlpha(LINK_SET,0.0,ALL_SIDES); // go invisible when weapon drawn&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// HOLSTER THE WEAPON&lt;br /&gt;
HOLSTER(string hand) {&lt;br /&gt;
    // holster code goes here&lt;br /&gt;
    if ( llListFindList(LEFTATTACHED,[llGetAttached()]) != -1 &amp;amp;&amp;amp; ( hand == &amp;quot;left&amp;quot; || hand == &amp;quot;both&amp;quot; ) ) {&lt;br /&gt;
        llSetLinkAlpha(LINK_SET,1.0,ALL_SIDES); // go visible when weapon holstered/sheathed&lt;br /&gt;
    }&lt;br /&gt;
    if ( llListFindList(RIGHTATTACHED,[llGetAttached()]) != -1 &amp;amp;&amp;amp; ( hand == &amp;quot;right&amp;quot; || hand == &amp;quot;both&amp;quot; ) ) {&lt;br /&gt;
        llSetLinkAlpha(LINK_SET,1.0,ALL_SIDES); // go visible when weapon holstered/sheathed&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//===========================================================================&lt;br /&gt;
// STATE DEFAULT - the main state is the default state.&lt;br /&gt;
// When a script is compiled, reset or loaded, this is the state it enters by default.&lt;br /&gt;
//===========================================================================&lt;br /&gt;
default {&lt;br /&gt;
    //-----------------------------------------------------------------------&lt;br /&gt;
    // STATE_ENTRY EVENT - Triggered on any state transition and start up&lt;br /&gt;
    //-----------------------------------------------------------------------&lt;br /&gt;
    state_entry() {&lt;br /&gt;
        SETUP(); // call global setup&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    //-----------------------------------------------------------------------&lt;br /&gt;
    // ON_REZ EVENT - Triggered when object attached or rezzed on the ground&lt;br /&gt;
    //-----------------------------------------------------------------------&lt;br /&gt;
    on_rez(integer rezparams) {&lt;br /&gt;
        rezparams = 0; // LSLINT&lt;br /&gt;
        SETUP();&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    //-----------------------------------------------------------------------&lt;br /&gt;
    // ATTACH EVENT - when the object is attached or detached&lt;br /&gt;
    //-----------------------------------------------------------------------&lt;br /&gt;
    attach(key id) {&lt;br /&gt;
        if ( id != NULL_KEY ) { // attached from ground or inventory&lt;br /&gt;
            SETUP();&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    //-----------------------------------------------------------------------&lt;br /&gt;
    // LISTEN EVENT - listen for whisper, say, shout, regionsay messages&lt;br /&gt;
    //-----------------------------------------------------------------------&lt;br /&gt;
    listen(integer channel, string name, key uuid, string message) {&lt;br /&gt;
        name = &amp;quot;&amp;quot;; // LSLINT&lt;br /&gt;
        uuid = NULL_KEY; // LSLINT&lt;br /&gt;
        if ( channel == CHANATTACH ) { // did message come in on attachment channel?&lt;br /&gt;
            if ( message == &amp;quot;DRAWLEFT&amp;quot; ) { DRAW(&amp;quot;left&amp;quot;); return;} // draw weapons if in left hand&lt;br /&gt;
            if ( message == &amp;quot;DRAWRIGHT&amp;quot; ) { DRAW(&amp;quot;right&amp;quot;); return;} // draw weapons in right hand&lt;br /&gt;
            if ( message == &amp;quot;DRAWBOTH&amp;quot; ) { DRAW(&amp;quot;both&amp;quot;); return; } // draw weapons in both hands&lt;br /&gt;
            if ( message == &amp;quot;HOLSTERLEFT&amp;quot; ) { HOLSTER(&amp;quot;left&amp;quot;); return;} // holster left-hand weapons&lt;br /&gt;
            if ( message == &amp;quot;HOLSTERRIGHT&amp;quot; ) { HOLSTER(&amp;quot;right&amp;quot;); return;} // holster right-hand weapons&lt;br /&gt;
            if ( message == &amp;quot;HOLSTERBOTH&amp;quot; ) { HOLSTER(&amp;quot;both&amp;quot;); return; } // holster both weapons&lt;br /&gt;
            if ( message == &amp;quot;SHEATHELEFT&amp;quot; ) { HOLSTER(&amp;quot;left&amp;quot;); return;} // sheathe left-hand weapon&lt;br /&gt;
            if ( message == &amp;quot;SHEATHERIGHT&amp;quot; ) { HOLSTER(&amp;quot;right&amp;quot;); return;} // sheathe right-hand weapons&lt;br /&gt;
            if ( message == &amp;quot;SHEATHBOTH&amp;quot; ) { HOLSTER(&amp;quot;both&amp;quot;); return; } // sheatheholster both weapons&lt;br /&gt;
        }&lt;br /&gt;
    }    &lt;br /&gt;
} // end of 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>