// :CATEGORY:XS Pet // :NAME:XS Pet Robot // :AUTHOR:Ferd Frederix // :KEYWORDS: Pet,XS,breed,breedable,companion,Ozimal,Meeroo,Amaretto,critter,Fennux,Pets // :CREATED:2013-09-06 // :EDITED:2014-01-30 12:24:20 // :ID:988 // :NUM:1519 // :REV:0.50 // :WORLD:Second Life, OpenSim // :DESCRIPTION: // XS Pet xs_home waving flag script // :CODE: //////////////////////////////////////////////////////////////////// // This code is licensed as Creative Commons Attribution/NonCommercial/Share Alike // See http://creativecommons.org/licenses/by-nc-sa/3.0/ // Noncommercial -- You may not use this work for commercial purposes // If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one. // This means that you cannot sell this code but you may share this code. // You must attribute authorship to me and leave this notice intact. // // Exception: I am allowing this script to be sold inside an original build. // You are not selling the script, you are selling the build. // Ferd Frederix // Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: //* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. //* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer // in the documentationand/or other materials provided with the distribution. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, // EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. //////////////////////////////////////////////////////////////////// // Put any texture converted by gif_2_SL_animation_v0.6.exe into a prim with this script to get it to play back automatically as a movie integer animOn = TRUE; //Set to FALSE and call initAnim() again to stop the animation. list effects = [LOOP]; // LOOP for GIF89 movies integer movement = 0; integer face = ALL_SIDES; //Number representing the side to activate the animation on. integer sideX = 1; //Represents how many horizontal images (frames) are contained in your texture. integer sideY = 1; //Same as sideX, except represents vertical images (frames). float start = 0.0; //Frame to start animation on. (0 to start at the first frame of the texture) float length = 0.0; //Number of frames to animate, set to 0 to animate all frames. float speed = 10.0; //Frames per second to play. fetch() { string texture = llGetInventoryName(INVENTORY_TEXTURE,0); list data = llParseString2List(texture,[";"],[]); string X = llList2String(data,1); string Y = llList2String(data,2); string Z = llList2String(data,3); sideX = (integer) X; sideY = (integer) Y; speed = (float) Z; float tot = (float) (sideX * sideY); llSetTextureAnim(ANIM_ON|LOOP,ALL_SIDES,sideX,sideY,start,length,speed); llSetTexture(texture,ALL_SIDES); } default { state_entry() { fetch(); } }