<?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_Food_Potion-Preview6.lsl</id>
		<title>User:Allen Kerensky/Myriad Lite/Myriad Lite Food Potion-Preview6.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_Food_Potion-Preview6.lsl"/>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=User:Allen_Kerensky/Myriad_Lite/Myriad_Lite_Food_Potion-Preview6.lsl&amp;action=history"/>
		<updated>2026-04-17T05:55:19Z</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_Food_Potion-Preview6.lsl&amp;diff=32168&amp;oldid=prev</id>
		<title>Allen Kerensky: created Myriad_Lite_Food_Potion-Preview6.lsl</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=User:Allen_Kerensky/Myriad_Lite/Myriad_Lite_Food_Potion-Preview6.lsl&amp;diff=32168&amp;oldid=prev"/>
				<updated>2013-03-19T20:19:21Z</updated>
		
		<summary type="html">&lt;p&gt;created Myriad_Lite_Food_Potion-Preview6.lsl&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Myriad_Lite_Food_Potion-Preview6.lsl =&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;lsl&amp;quot;&amp;gt;&lt;br /&gt;
// Myriad_Lite_Food_Potion-Preview6.lsl&lt;br /&gt;
// Copyright (c) 2012 Allen Kerensky (OSG/SL) All Rights Reserved.&lt;br /&gt;
// Copyright (c) 2012 Yoshiko Fazuku (Avination/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;
string  VERSION = &amp;quot;0.0.1&amp;quot;; // version number&lt;br /&gt;
string  VERDATE = &amp;quot;20120830&amp;quot;; // version date&lt;br /&gt;
&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 HEALAMOUNT = 5;         // heal how many critical/wound boxes?&lt;br /&gt;
&lt;br /&gt;
list choices = [&amp;quot;Cancel&amp;quot;, &amp;quot;Eat Now!&amp;quot;];&lt;br /&gt;
string msg = &amp;quot;Please make a choice. You can only eat this food once&amp;quot;;&lt;br /&gt;
key ToucherID;&lt;br /&gt;
integer channel_dialog;&lt;br /&gt;
integer listen_id;&lt;br /&gt;
 &lt;br /&gt;
default{&lt;br /&gt;
&lt;br /&gt;
  state_entry() {&lt;br /&gt;
    channel_dialog = ( -1 * (integer)(&amp;quot;0x&amp;quot;+llGetSubString((string)llGetKey(),-5,-1)) );&lt;br /&gt;
    llRequestPermissions( llGetOwner(), PERMISSION_ATTACH );&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  run_time_permissions( integer vBitPermissions )&lt;br /&gt;
  {&lt;br /&gt;
        if (PERMISSION_ATTACH &amp;amp; vBitPermissions)&lt;br /&gt;
        {&lt;br /&gt;
            llAttachToAvatar(ATTACH_RHAND);&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            llOwnerSay( &amp;quot;You must attach item to use&amp;quot; );&lt;br /&gt;
        }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  on_rez(integer rez)&lt;br /&gt;
    {&lt;br /&gt;
        if(!llGetAttached())&lt;br /&gt;
        { //reset the script if it's not attached.&lt;br /&gt;
            llResetScript();&lt;br /&gt;
        }&lt;br /&gt;
        ToucherID = llGetOwner();&lt;br /&gt;
        llDialog(ToucherID, msg, choices, channel_dialog);&lt;br /&gt;
        listen_id = llListen( channel_dialog, &amp;quot;&amp;quot;, ToucherID, &amp;quot;&amp;quot;);&lt;br /&gt;
        llSetTimerEvent(60); //HERE WE SET A TIME LIMIT&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
  touch_start(integer total_number) {&lt;br /&gt;
    ToucherID = llDetectedKey(0);&lt;br /&gt;
    llDialog(ToucherID, msg, choices, channel_dialog);&lt;br /&gt;
    listen_id = llListen( channel_dialog, &amp;quot;&amp;quot;, ToucherID, &amp;quot;&amp;quot;);&lt;br /&gt;
    llSetTimerEvent(60); //HERE WE SET A TIME LIMIT&lt;br /&gt;
  }&lt;br /&gt;
 &lt;br /&gt;
  listen(integer channel, string name, key id, string choice) { &lt;br /&gt;
    key who = llGetOwner();&lt;br /&gt;
    integer chanplayer = (integer)(&amp;quot;0x&amp;quot;+llGetSubString((string)who,0,6));&lt;br /&gt;
    if (choice == &amp;quot;Eat Now!&amp;quot;) {&lt;br /&gt;
        llListenRemove(listen_id); &lt;br /&gt;
        llRegionSay(CHANMYRIAD,llKey2Name(who)+&amp;quot; has eaten an apple!&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;
        // change aperance or deleate &lt;br /&gt;
    }else{ &lt;br /&gt;
        //do something nothing.&lt;br /&gt;
        llListenRemove(listen_id);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
 &lt;br /&gt;
  timer() { //TIME’S UP!&lt;br /&gt;
    llListenRemove(listen_id);&lt;br /&gt;
    llSetTimerEvent(0.0); //Stop the timer from being called repeatedly&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Allen Kerensky</name></author>	</entry>

	</feed>