<?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%2FHealing_Heart</id>
		<title>User:Allen Kerensky/Myriad Lite Preview 5/Healing Heart - 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%2FHealing_Heart"/>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=User:Allen_Kerensky/Myriad_Lite_Preview_5/Healing_Heart&amp;action=history"/>
		<updated>2026-06-04T06:19:16Z</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/Healing_Heart&amp;diff=27347&amp;oldid=prev</id>
		<title>Allen Kerensky: moved User:Allen Kerensky:Myriad Lite Preview 5:Healing Heart to User:Allen Kerensky/Myriad Lite Preview 5/Healing Heart: move into subsite</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=User:Allen_Kerensky/Myriad_Lite_Preview_5/Healing_Heart&amp;diff=27347&amp;oldid=prev"/>
				<updated>2012-02-06T22:42:27Z</updated>
		
		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/wiki/User:Allen_Kerensky:Myriad_Lite_Preview_5:Healing_Heart&quot; class=&quot;mw-redirect&quot; title=&quot;User:Allen Kerensky:Myriad Lite Preview 5:Healing Heart&quot;&gt;User:Allen Kerensky:Myriad Lite Preview 5:Healing Heart&lt;/a&gt; to &lt;a href=&quot;/wiki/User:Allen_Kerensky/Myriad_Lite_Preview_5/Healing_Heart&quot; title=&quot;User:Allen Kerensky/Myriad Lite Preview 5/Healing Heart&quot;&gt;User:Allen Kerensky/Myriad Lite Preview 5/Healing Heart&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:42, 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/Healing_Heart&amp;diff=27207&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/Healing_Heart&amp;diff=27207&amp;oldid=prev"/>
				<updated>2012-02-06T17:59:57Z</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 Healing Heart =&lt;br /&gt;
&lt;br /&gt;
Many combat-based games offer a heal-up object that will partly or fully restore the player's health when activated.&lt;br /&gt;
&lt;br /&gt;
The Myriad Lite Healing script was designed to sit in a heart-shaped object that spins, turns grey when used until it respawns and turns red again when active.&lt;br /&gt;
&lt;br /&gt;
Jeanie Weston has contributed a heart-shaped sculpy texture to save prims available in the Marketplace pack on SecondLife.&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
# Make a sculpty prim.&lt;br /&gt;
# Drag and Drop the Jeanie's Heart sculpt texture onto the sculpt map area of the build tool&lt;br /&gt;
# Drag and Drop the Myriad Lite Healing script from inventory into the object&lt;br /&gt;
# Edit the script to provide full healing or partial healing as desired.&lt;br /&gt;
# Rez copies of the healing heart where desired to give combatants a chance to heal up.&lt;br /&gt;
&lt;br /&gt;
== Myriad_Lite_Healing-v0.0.2-20120130.lsl ==&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
//============================================================================&lt;br /&gt;
// Myriad_Lite_Healing-v0.0.2-20120130.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;
// CHANMYRIAD OUT - RPEVENT|str eventmessage&lt;br /&gt;
// CHANPLAYER OUT - HEALALL&lt;br /&gt;
// CHANPLAYER OUT - HEALPARTIAL|str HEALAMOUNT&lt;br /&gt;
&lt;br /&gt;
//============================================================================&lt;br /&gt;
// GLOBAL CONSTANTS&lt;br /&gt;
//============================================================================&lt;br /&gt;
float   TOUCH_RANGE = 3.0;      // meters - how close do you have to be for touch-to-heal to work&lt;br /&gt;
integer RESPAWN_FLAG = TRUE;    // once heal is used, respawn it after a certain time?&lt;br /&gt;
float   RESPAWN_TIME = 30.0;    // how long until heal respawns?&lt;br /&gt;
integer CHANMYRIAD = -999;      // channel for Myriad RP events&lt;br /&gt;
string  DIV = &amp;quot;|&amp;quot;;              // Myriad message field divider&lt;br /&gt;
integer HEALALL = TRUE;         // heal all? if FALSE...&lt;br /&gt;
integer HEALAMOUNT = 0;         // heal how many critical/wound boxes?&lt;br /&gt;
&lt;br /&gt;
//============================================================================&lt;br /&gt;
// GLOBAL SETUP()&lt;br /&gt;
//============================================================================&lt;br /&gt;
SETUP() {&lt;br /&gt;
    llSetLinkColor(LINK_SET,&amp;lt;1,0,0&amp;gt;,ALL_SIDES); // set all prims to red on all sides&lt;br /&gt;
    llTargetOmega(&amp;lt;0,0,1&amp;gt;,0.25,1.0); // set the object slowly spinning around the Z (vertical) axis&lt;br /&gt;
    if ( HEALALL == TRUE ) { // what label do we set?&lt;br /&gt;
        llSetText(&amp;quot;Full Healing&amp;quot;,&amp;lt;1,0,0&amp;gt;,1.0); // Set a red FULL heal hovertext&lt;br /&gt;
    } else { // this is only a partial heal&lt;br /&gt;
        llSetText(&amp;quot;Partial Healing&amp;quot;,&amp;lt;1,0,0&amp;gt;,1.0); // set a read PARTIAL heal hovertext&lt;br /&gt;
    }&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;
        SETUP(); // if reset, go to setup&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    //------------------------------------------------------------------------&lt;br /&gt;
    // ON_REZ EVENT&lt;br /&gt;
    //------------------------------------------------------------------------&lt;br /&gt;
    on_rez(integer start_param) {&lt;br /&gt;
        start_param = 0; // LSLINT&lt;br /&gt;
        SETUP(); // if rezzed from inventory, go to setup&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    //------------------------------------------------------------------------&lt;br /&gt;
    // COLLISION_START EVENT - if player runs into the heal object, try healing them&lt;br /&gt;
    //------------------------------------------------------------------------&lt;br /&gt;
    collision_start(integer collisions) {&lt;br /&gt;
        while (collisions--) { // count down through each collision in this event&lt;br /&gt;
            if ( RESPAWN_FLAG == FALSE ) { // this heal has already been used recently&lt;br /&gt;
                return; // so just return since we're not going to heal anyone at the moment&lt;br /&gt;
            }&lt;br /&gt;
            key who = llDetectedKey(collisions); // what hit the heal object?&lt;br /&gt;
            // we check the owner of the colliding object to see if its an avatar, or someone's bullet, etc&lt;br /&gt;
            key whoowner = llList2Key(llGetObjectDetails(who,[OBJECT_OWNER]),0);&lt;br /&gt;
            if ( who == whoowner) { // this is an avatar that owns itself&lt;br /&gt;
                // calculate the CHANPLAYER dynamic channel for who is being healed&lt;br /&gt;
                integer chanplayer = (integer)(&amp;quot;0x&amp;quot;+llGetSubString((string)who,0,6));&lt;br /&gt;
                if ( HEALALL == TRUE ) { // are we healing all damage?&lt;br /&gt;
                    llRegionSay(CHANMYRIAD,llKey2Name(who)+&amp;quot; is fully healed!&amp;quot;);&lt;br /&gt;
                    llWhisper(chanplayer,&amp;quot;HEALALL&amp;quot;); // tell that player's HUD to heal ALL damage&lt;br /&gt;
                } else {&lt;br /&gt;
                    llRegionSay(CHANMYRIAD,llKey2Name(who)+&amp;quot; is partially healed!&amp;quot;);&lt;br /&gt;
                    llWhisper(chanplayer,&amp;quot;HEALPARTIAL&amp;quot;+DIV+(string)HEALAMOUNT); // tell player HUD to heal some damage&lt;br /&gt;
                }&lt;br /&gt;
                llSetLinkColor(LINK_SET,&amp;lt;.5,.5,.5&amp;gt;,ALL_SIDES); // make the heal item grey and used looking&lt;br /&gt;
                llSetTimerEvent(RESPAWN_TIME); // set a timer to respawn this heal item after a while&lt;br /&gt;
                RESPAWN_FLAG=FALSE; // set a flag so the heal can't be reused until it respawns&lt;br /&gt;
                return; // collision is done, let's exit after healing first avatar found in collisions&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    //------------------------------------------------------------------------&lt;br /&gt;
    // TOUCH_START EVENT - when player clicks heal, see if they are close enough&lt;br /&gt;
    //------------------------------------------------------------------------&lt;br /&gt;
    touch_start(integer touches) {        &lt;br /&gt;
        while (touches--) { // count down through all touches in this touch-start event&lt;br /&gt;
            if ( RESPAWN_FLAG == FALSE ) { // this heal has been used recently and has not respawned&lt;br /&gt;
                return; // so exit early since we're not healing anyone right now&lt;br /&gt;
            }&lt;br /&gt;
            &lt;br /&gt;
            key who2 = llDetectedKey(touches); // who clicked us, we don't check for avatar since objects can't click&lt;br /&gt;
            // find the current location of what clicked us&lt;br /&gt;
            vector whopos = llList2Vector(llGetObjectDetails(who2,[OBJECT_POS]),0);&lt;br /&gt;
&lt;br /&gt;
            if ( llVecDist(whopos,llGetPos()) &amp;lt;= TOUCH_RANGE ) { // check distance between heal item and whoever clicked&lt;br /&gt;
                // calculate CHANPLAYER dynamic player channel to send healing message to&lt;br /&gt;
                integer chanplayer2 = (integer)(&amp;quot;0x&amp;quot; + llGetSubString((string)who2,0,6));&lt;br /&gt;
                if ( HEALALL == TRUE ) { // are we healing all damage?&lt;br /&gt;
                    llRegionSay(CHANMYRIAD,llKey2Name(who2)+&amp;quot; is fully healed!&amp;quot;); // tell region someone is healing&lt;br /&gt;
                    llWhisper(chanplayer2,&amp;quot;HEALFULL&amp;quot;); // heal all damage&lt;br /&gt;
                } else {&lt;br /&gt;
                    llRegionSay(CHANMYRIAD,llKey2Name(who2)+&amp;quot; is partially healed!&amp;quot;); // tell region someone is healing&lt;br /&gt;
                    llWhisper(chanplayer2,&amp;quot;HEALPARTIAL&amp;quot;+DIV+(string)HEALAMOUNT); // heal some damage&lt;br /&gt;
                }&lt;br /&gt;
                llSetLinkColor(LINK_SET,&amp;lt;.5,.5,.5&amp;gt;,ALL_SIDES); // make the heal item grey and unused looking&lt;br /&gt;
                llSetTimerEvent(RESPAWN_TIME); // set a timer to respawn this heal item after a while&lt;br /&gt;
                RESPAWN_FLAG=FALSE; // set a flag so the heal can't be reused until it respawns&lt;br /&gt;
                return; // touch is done, let's exit after healing first avatar found in clicks&lt;br /&gt;
            }&lt;br /&gt;
        } // end while&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    //------------------------------------------------------------------------&lt;br /&gt;
    // TIMER EVENT&lt;br /&gt;
    //------------------------------------------------------------------------&lt;br /&gt;
    timer() {&lt;br /&gt;
        llSetLinkColor(LINK_SET,&amp;lt;1,0,0&amp;gt;,ALL_SIDES); // set color to red again to show this can be used&lt;br /&gt;
        RESPAWN_FLAG=TRUE; // set a flag to all the next heal attempt to work&lt;br /&gt;
        llSetTimerEvent(0.0); // stop the timers until the next heal event starts a new one&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>