Second Life Copybot

Full Version: resize script with stretch x y z full
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
i need of this script resize with strech x,y,z in full perm
I need say this you have many time in this forum, only 9 post. You need. Read more and shared more search more

I can a little help but only for this time

[To see links please register here]


I recomend you search with this label: resizer


Many only work with link prim if you need for singlee prim use the dummie edit tool
Lol
if you get the Hucci Kayla Pump Demo... there is a *Bosh* resizer plus stretch script that is copy and transfer (I just tested the demo).... I just stumbled across this script by accident and it works perfect. Wink

these shoes...

[To see links please register here]

Rosal, the corset maker, shares something similar

[To see links please register here]

In Avid inworld store there is a resizer script for free
(04-18-2012, 01:23 AM)Sonia Blade Wrote:

[To see links please register here]

In Avid inworld store there is a resizer script for free

Yes they have but its the old all-directions at once sizing script.
Naoliya was looking for a script with seperate sizing in x,y,z direction

Imagine a primcorset: while downscaling to your shape, it gets shorter and this is very bad on a petite shape especially if you dont want a waist belt ^^
Would definitely be a nice script to have in our collection. I'll keep my eyes/ears open. Meaw

*EDIT - Found one that works with linksets, unfortunately, all prims must share the same axis for it to work... so it's pretty limited. Give it a shot if you want.

PHP Code:
vector Axes ZERO_VECTOR;        
integer Delete FALSE;        
float MaxDim 10.0
vector Maxima ZERO_VECTOR;
integer MenuListen;
float MinDim 0.01;
vector Minima = <10.010.010.0>;
vector Scale = <1.01.01.0>;

CloseListen() {
    
llSetTimerEvent(0.0);
    if(
MenuListen){
        
llListenRemove(MenuListen);
        
MenuListen 0;
    }
}

Menu() {
    list 
MenuButtons = ["Restore""Done""Delete"];
    
string MenuMessage "Scale:\nMax: " + (string) Maxima "\nNow: " + (string) Scale "\nMin: " + (string) Minima;

    if(
Delete) {
        
MenuButtons = ["Confirm""Cancel"];
        
MenuMessage "Are you sure you want to delete this resize script?";
    }
    else {
        if(
Axes.x){MenuButtons += ["X •"];}else{MenuButtons += ["X"];}
        if(
Axes.y){MenuButtons += ["Y •"];}else{MenuButtons += ["Y"];}
        if(
Axes.z){MenuButtons += ["Z •"];}else{MenuButtons += ["Z"];}
        
MenuButtons += ["-0.05","-0.10","-0.25""+0.05","+0.10","+0.25"];
    }
        
    
integer MenuChannel = -(integer) (llFrand(999999999.9) + 1);
    
MenuListen llListen(MenuChannel""llGetOwner(), "");
    
llDialog(llGetOwner(), MenuMessageMenuButtonsMenuChannel);
    
llSetTimerEvent(30.0);
}

Resize() {
    if(
Scale.Minima.x){Scale.Minima.x;}else if(Scale.Maxima.x){Scale.Maxima.x;}
    if(
Scale.Minima.y){Scale.Minima.y;}else if(Scale.Maxima.y){Scale.Maxima.y;}
    if(
Scale.Minima.z){Scale.Minima.z;}else if(Scale.Maxima.z){Scale.Maxima.z;}

    
integer Counter llGetNumberOfPrims();
    if(
== Counter) {
            list 
Originals llParseString2List(llList2String(llGetLinkPrimitiveParams(0, [PRIM_TEXT]), 0), ["\n"], []);
            
vector NewSize = (vectorllList2String(Originals0);
            
NewSize.*= Scale.x;
            
NewSize.*= Scale.y;
            
NewSize.*= Scale.z;
            
llSetLinkPrimitiveParamsFast(0, [PRIM_SIZENewSize]);
    }
    else {
        while(
Counter) {
            list 
Originals llParseString2List(llList2String(llGetLinkPrimitiveParams(Counter, [PRIM_TEXT]), 0), ["\n"], []);
            
vector NewSize = (vectorllList2String(Originals0);
            
NewSize.*= Scale.x;
            
NewSize.*= Scale.y;
            
NewSize.*= Scale.z;
            
vector NewPos = (vectorllList2String(Originals1);
            
NewPos.*= Scale.x;
            
NewPos.*= Scale.y;
            
NewPos.*= Scale.z;
            if(
== Counter) {
                
llSetLinkPrimitiveParamsFast(Counter--, [PRIM_SIZENewSize]);
            }
            else {
                
llSetLinkPrimitiveParamsFast(Counter--, [PRIM_SIZENewSizePRIM_POSITIONNewPos]);
            }
        }
    }

    
Menu();
}

default {
    
link_message(integer FromPriminteger Numberstring Textkey UUID) {
        if(
"RESIZEQUERY" == Text) {
            
llMessageLinked(FromPrimNumber, (string) Maxima "_" + (string) Scale "_" + (string) MinimaUUID);
        }else if(
"RESIZE:" == llGetSubString(Text06)) {
            
Scale = (vectorllDeleteSubString(Text06);
            
Resize();
        }
    }

    
listen(integer ChannelInstring FromNamekey FromIDstring Message) {
        
CloseListen();
        if((float) 
Message) {
            if(
Axes.x){Scale.+= (float) Message;}
            if(
Axes.y){Scale.+= (float) Message;}
            if(
Axes.z){Scale.+= (float) Message;}
            
Resize();
        }
        else {
            if(
"Cancel" == Message) {
                
Delete FALSE;
                
Menu();
            }
            else if(
"Confirm" == Message) {
                
integer Counter llGetNumberOfPrims();
                if(
== Counter) {
                    
llSetLinkPrimitiveParamsFast(0, [PRIM_TEXT""ZERO_VECTOR0.0]);
                }
                else {
                    while(
Counter) {
                        
llSetLinkPrimitiveParamsFast(Counter--, [PRIM_TEXT""ZERO_VECTOR0.0]);
                    }
                }
                
llRemoveInventory(llGetScriptName());
                
llOwnerSay("Script deleted");
            }
            else if(
"Done" == Message) {
            }
            else if(
"Delete" == Message) {
                
Delete TRUE;
                
Menu();
            }
            else if(
"Restore" == Message) {
                
Scale = <1.01.01.0>;
                
Resize();
            }
            else {
                
Message llGetSubString(Message00);
                if(
"X" == Message){Axes.= !(integer) Axes.x;}
                else if(
"Y" == Message){Axes.= !(integer) Axes.y;}
                else if(
"Z" == Message){Axes.= !(integer) Axes.z;}
                
Menu();
            }
        }
    }

    
state_entry() {
        
llOwnerSay("Initialising, please wait ...");
        
integer Counter llGetNumberOfPrims();
        if(
== Counter) {
            
Maxima llList2Vector(llGetLinkPrimitiveParams(0, [PRIM_SIZE]), 0);
            
Minima Maxima;
            
llSetLinkPrimitiveParamsFast(Counter, [PRIM_TEXT, (string) MaximaZERO_VECTOR0.0]);
        }
        else {
            
vector RootPos llGetRootPosition();
            
rotation RootRot llGetRootRotation();
            while(
Counter){
                
vector LinkScale llList2Vector(llGetLinkPrimitiveParams(Counter, [PRIM_SIZE]), 0);
                if(
LinkScale.Minima.x){Minima.LinkScale.x;}else if(LinkScale.Maxima.x){Maxima.LinkScale.x;}
                if(
LinkScale.Minima.y){Minima.LinkScale.y;}else if(LinkScale.Maxima.y){Maxima.LinkScale.y;}
                if(
LinkScale.Minima.z){Minima.LinkScale.z;}else if(LinkScale.Maxima.z){Maxima.LinkScale.z;}
                
llSetLinkPrimitiveParamsFast(Counter, [PRIM_TEXT, (string) LinkScale "\n" +
                    (string) ((
llList2Vector(llGetLinkPrimitiveParams(Counter--, [PRIM_POSITION]), 0) - RootPos) / RootRot)
                    , 
ZERO_VECTOR0.0]);
            }
        }
        
Maxima.MaxDim Maxima.x;
        
Maxima.MaxDim Maxima.y;
        
Maxima.MaxDim Maxima.z;
        
Minima.MinDim Minima.x;
        
Minima.MinDim Minima.y;
        
Minima.MinDim Minima.z;
        
llOwnerSay("Ready - touch for menu");
    }

    
timer() {
        
llOwnerSay("Menu timed-out.  Touch again to reactivate it");
        
Delete FALSE;
        
CloseListen();
    }

    
touch_start(integer HowMany) {
        if(
llDetectedKey(0) == llGetOwner()) {
            
CloseListen();
            
Menu();
        }
    }

thanks Harley, I will play with it on my next need for something like this.
maybe we can fiddling something together from parts of the old resizers.
(04-18-2012, 05:00 AM)Technopussy Wrote:

[To see links please register here]

thanks Harley, I will play with it on my next need for something like this.
maybe we can fiddling something together from parts of the old resizers.

I don't think it's that simple... you need to have it so it stores all the rotations, sizes the axis, then sets the original rotations back(or something similar). Possible, but out of my league, lol.
(04-16-2012, 05:38 AM)Naoliya Wrote:

[To see links please register here]

i need of this script resize with strech x,y,z in full perm

here is a good one that does job for you

vector vSize;
vector vPos1;
vector vPos;
string sPctP3 = "5";
string sPctP2 = "2";
string sPctP1 = "1";
string sPctM3 = "5";
string sPctM2 = "2";
string sPctM1 = "1";
string sPct;
list lSortPrims;
list lSizes;
list lPos;
list lName;
list lElem;
integer iSens;
integer iNumberOfPrims;
integer iNoMoreMax;
integer iNbPasses;
integer iMenuOn;
integer iLast;
integer iIdx;
integer iHugeUsed;
integer iFirst;
integer iFin;
integer iError;
integer iEcouteMenu;
integer iDeb;
integer iCurrentMenu;
integer iCanalMenu;
integer iCanalComm = -8547548;
integer iBcl;
integer iAllowResizeHugePrims = -1;
float fTmp;
float fMin;
float fMax;
float fLimiteMax;
float fFactor;
float fDefault;
integer TestError()
{
    if( fMax > fLimiteMax )
        ControlSizePos( vSize, vPos );

    return( iError );
}
float MinMaxVal( integer iOperation )
{
    return( llListStatistics( iOperation, [ vSize.x, vSize.y, vSize.z ] ) );
}



GoBackToGoodSize()
{
    llOwnerSay( "Error, back to previous good size..." );

    sPct = "aborted";

    if( llRound( fFactor * 100.0 ) == 101 )
        iNoMoreMax = TRUE;

    fMin     /= fFactor;
    fMax     /= fFactor;
    iFin      = iDeb - iSens;
    iDeb      = iIdx;
    iSens    *= -1;
    fFactor   = 1.0;
    iNbPasses = 3;

    if( iNoMoreMax )
        fLimiteMax = fMax;

    do
    {
        Booster();
        iError = FALSE;

        for( iIdx = iDeb; iIdx != iFin; iIdx += iSens )
        {
            iBcl = llList2Integer( lSortPrims, iIdx );

            lElem = [ PRIM_SIZE, llList2Vector( lSizes, iIdx ) ];

            if( iBcl != iFirst )
            {
                vPos  = llList2Vector( lPos, iIdx );

                lElem += [ PRIM_POSITION, vPos ];
            }

            llSetLinkPrimitiveParamsFast( iBcl, lElem );
            llSetLinkPrimitiveParamsFast( iBcl, lElem );
            llSetLinkPrimitiveParamsFast( iBcl, lElem );
        }

        ControlBuild( FALSE );
    }
    while( iError && --iNbPasses );

    if( iError )
        llOwnerSay( "Sorry, the build is broken and can't be repaired." );
}



GetSizePos()
{
    vSize = llList2Vector( llGetLinkPrimitiveParams( iBcl, [ PRIM_SIZE ] ), 0 ) * fFactor;

    if( iBcl == iFirst )
    {
        if( llGetAttached() )

            vPos = llGetLocalPos();
        else

            vPos = llGetRootPosition();
    }
    else

        vPos = ( ( llList2Vector( llGetLinkPrimitiveParams( iBcl, [ PRIM_POSITION ] ), 0 ) - llGetRootPosition() ) / llGetRootRotation() ) * fFactor;
}



ControlSizePos( vector vRefSize, vector vRefPos )
{
    if( llVecDist( llList2Vector( llGetLinkPrimitiveParams( iBcl, [ PRIM_SIZE ] ), 0 ), vRefSize ) > 0.001 )
        iError = TRUE;
    else if( iBcl != iFirst )
    {
        if( llVecDist( ( llList2Vector( llGetLinkPrimitiveParams( iBcl, [ PRIM_POSITION ] ), 0 ) - llGetRootPosition() ) / llGetRootRotation(),
                       vRefPos ) > 0.001 )
        iError = TRUE;
    }
}






ControlBuild( integer iBoost )
{
    if( iBoost )
        Booster();



    for( iIdx = iDeb; iIdx != iFin; iIdx += iSens )
    {
        iBcl = llList2Integer( lSortPrims, iIdx );

        ControlSizePos( llList2Vector( lSizes, iIdx ) * fFactor, llList2Vector( lPos, iIdx ) * fFactor );

        if( iError )
        {
            if( iBoost )
                iIdx = iFin - iSens;
            return;
        }
    }
}



ChangeSizePos()
{
    Booster();

    for( iIdx = iDeb; iIdx != iFin; iIdx += iSens )
    {
        iBcl = llList2Integer( lSortPrims, iIdx );
        GetSizePos();

        llSetLinkPrimitiveParamsFast( iBcl, [ PRIM_SIZE, vSize, PRIM_POSITION, vPos ] );
        llSetLinkPrimitiveParamsFast( iBcl, [ PRIM_POSITION, vPos ] );
        llSetLinkPrimitiveParamsFast( iBcl, [ PRIM_POSITION, vPos ] );

        if( TestError() )
            return;
    }
}



ChangeSize( integer iCorrect )
{
    Booster();

    for( iIdx = iDeb; iIdx != iFin; iIdx += iSens )
    {
        iBcl = llList2Integer( lSortPrims, iIdx );
        GetSizePos();

        if( iCorrect )
            vPos /= fFactor;

        llSetLinkPrimitiveParamsFast( iBcl, [ PRIM_SIZE, vSize ] );

        if( TestError() )
            return;
    }
}



ChangePos( integer iCorrect )
{
    Booster();

    for( iIdx = iDeb; iIdx != iFin; iIdx += iSens )
        if( ( iBcl = llList2Integer( lSortPrims, iIdx ) ) != iFirst )
        {
            GetSizePos();
            vPos1 = vPos / fFactor;

            if( iCorrect )
                vSize /= fFactor;

            llSetLinkPrimitiveParamsFast( iBcl, [ PRIM_POSITION, vPos ] );
            llSetLinkPrimitiveParamsFast( iBcl, [ PRIM_POSITION, vPos ] );
            llSetLinkPrimitiveParamsFast( iBcl, [ PRIM_POSITION, vPos ] );

            if( TestError() )
                return;
        }
}



Booster()
{
    for( iBcl = 0; iBcl < 5000; iBcl++ );
}


AlreadyAt( integer iMess, string sMess )
{
    if( iMess )
    {
        llOwnerSay( "Already at " + sMess + " size." );
        Menu();
    }
}






init()
{
    Booster();

    iNumberOfPrims = llGetNumberOfPrims();
    iFirst         = (integer)( iNumberOfPrims > 1 );
    iLast          = iNumberOfPrims - (integer)( iNumberOfPrims == 1 );

    llOwnerSay( "Searching min/max prim size..." );

    fMin    = 10.0;
    fMax    = 0.01;
    fFactor = 1.0;
    for( iBcl = iFirst; ( fMax <= 10.0 || iAllowResizeHugePrims ) && iBcl <= iLast; iBcl++ )
    {
        GetSizePos();

        if( iBcl == iFirst )
        {
            fDefault = vSize.x;
            lElem = [ 0.0, iFirst ];
        }
        else
            lElem += [ llVecDist( ZERO_VECTOR, vPos ), iBcl ];

        fTmp = MinMaxVal( LIST_STAT_MIN );
        if( fTmp < fMin )
            fMin = fTmp;

        fTmp = MinMaxVal( LIST_STAT_MAX );
        if( fTmp > fMax )
            fMax = fTmp;
    }

    if( fMax > 10.0 && ! iAllowResizeHugePrims )
    {
        iHugeUsed = TRUE;
        llOwnerSay( "Script not active, object uses huge prim." );
    }
    else
    {
        llOwnerSay( "Size range : " + (string)fMin + " -> " + (string)fMax );

        iNoMoreMax = FALSE;
        iHugeUsed  = FALSE;

        llOwnerSay( "Sorting prims..." );

        lElem = llListSort( lElem, 2, TRUE );

        lSortPrims = [];
        for( iBcl = 1; iBcl < llGetListLength( lElem ); iBcl += 2 )
            lSortPrims += [ llList2Integer( lElem, iBcl ) ];

        llOwnerSay( (string)iNumberOfPrims + " prim" + llList2String( [ "", "s" ], (integer)(iNumberOfPrims > 1) ) + " sorted." );

        fLimiteMax = llListStatistics( LIST_STAT_MAX, [ 10.0, fMax ] );

        llOwnerSay( "Storing size/pos of each prim..." );

        SaveSizePos();
    }

    llOwnerSay( "Init. complete." );
}



SaveSizePos()
{
    Booster();

    fFactor = 1.0;
    lSizes  = [];
    lPos    = [];

    for( iIdx = 0; iIdx != iNumberOfPrims; iIdx++ )
    {
        iBcl = llList2Integer( lSortPrims, iIdx );
        GetSizePos();

        lSizes += [ vSize ];
        lPos   += [ vPos  ];
    }
}



Resize( integer iMess )
{

    fMin *= fFactor;
    fMax *= fFactor;

    sPct = "done";

    if( fFactor < 1.0 )
    {

        iDeb  = llGetListLength( lSortPrims ) - 1;
        iFin  = -1;
        iSens = -1;
    }
    else
    {

        iDeb  = 0;
        iFin  = llGetListLength( lSortPrims );
        iSens = 1;
    }

    iError = FALSE;

    if( fFactor < 0.5 )

        ChangePos( FALSE );
    else if( fFactor > 2.0 )

        ChangeSize( FALSE );
    else

        ChangeSizePos();

    if( ! iError )
    {
        if( fFactor < 0.5 )

            ChangeSize( TRUE );
        else if( fFactor > 2.0 )

            ChangePos( TRUE );
    }

    if( ! iError )
        ControlBuild( TRUE );

    if( iError )

        GoBackToGoodSize();
    else
    {

        SaveSizePos();
        if( fMax == 10.0 && ! iAllowResizeHugePrims )
        {
            iNoMoreMax = TRUE;
            fLimiteMax = fMax;
        }
    }

    if( fMax > fLimiteMax )

        fLimiteMax = fMax;


    llResetTime();

    if( iMess )
    {

        llOwnerSay( "Resize " + sPct + "." );
        Menu();
    }
}



MinimumSize( integer iMess )
{
    if( ( fFactor = 0.01 / fMin ) != 1.0 )
    {
        if( iMess )
        {
            sPct = (string)llRound( ( fFactor - 1.0 ) * 100.0 );
            if( fFactor > 1.0 )
                sPct = "+" + sPct;
            llOwnerSay( "Minimum size (" + sPct + "%)..." );
        }

        Resize( iMess );
    }
    else
        AlreadyAt( iMess, "minimum" );
}



Menu()
{
    llSetTimerEvent( 30.0 );
    llDialog( llGetOwner(),
              "Resizer action :\n" +
              "Quit : Leave this menu.\n" +
              "Options : Current size becomes default.\n" +
              ">> : Next set of percentages.\n" +
              "Min : Resize to minimum size.\n" +
              "Default : Return to initial size.\n" +
              "Max : Resize to maximum size.",
              [ "Quit", "Options", ">>",
                "-" + sPctM1 + "%", "Min",     "+" + sPctP1 + "%",
                "-" + sPctM2 + "%", "Default", "+" + sPctP2 + "%",
                "-" + sPctM3 + "%", "Max",     "+" + sPctP3 + "%" ],
              iCanalMenu );
}



MaximumSize( integer iMess )
{
    if( ( fFactor = fLimiteMax / fMax ) != 1.0 )
    {
        if( iMess )
        {
            sPct = (string)llRound( ( fFactor - 1.0 ) * 100.0 );
            if( fFactor > 1.0 )
                sPct = "+" + sPct;
            llOwnerSay( "Maximum size (" + sPct + "%)..." );
        }

        Resize( iMess );
    }
    else
        AlreadyAt( iMess, "maximum" );
}



FinMenu( integer iAlert )
{
    iMenuOn = FALSE;
    llSetTimerEvent( 0.0 );
    llListenRemove( iEcouteMenu );
    if( iAlert )
        llOwnerSay( "Menu timeout." );
}



DefaultSize( integer iMess )
{
    vSize = llList2Vector( llGetLinkPrimitiveParams( iFirst, [ PRIM_SIZE ] ), 0 );

    if( ( fFactor = fDefault / vSize.x ) != 1.0 )
    {
        if( iMess )
        {
            sPct = (string)llRound( ( fFactor - 1.0 ) * 100.0 );
            if( fFactor > 1.0 )
                sPct = "+" + sPct;
            llOwnerSay( "Default size (" + sPct + "%)..." );
        }

        Resize( iMess );
    }
    else
        AlreadyAt( iMess, "default" );
}


default
{
    state_entry()
    {
        if( iAllowResizeHugePrims < 0 )
            iAllowResizeHugePrims = (integer)( llSubStringIndex( llGetSimulatorHostname(), ".lindenlab.com" ) < 0 );

        init();
        llListen( iCanalComm, "", NULL_KEY, "" );
    }

    changed( integer iChange )
    {
        if(   ( iChange & CHANGED_LINK  ) ||
            ( ( iChange & CHANGED_SCALE ) &&
              llGetTime() > 5.0 / llList2Float( [ llGetRegionTimeDilation(), 0.01 ],
                                                (integer)( llGetRegionTimeDilation() < 0.01 ) ) ) )
            init();
    }

    listen( integer iChannel, string sName, key kId, string sMess )
    {
        if( iChannel == iCanalMenu )
        {
            llSetTimerEvent(  0.0 );

            if( sMess == ">>" )
            {
                if( (++iCurrentMenu) == 3 )
                    iCurrentMenu = 0;

                if( ! iCurrentMenu )
                {
                    sPctM1 = "1";
                    sPctM2 = "2";
                    sPctM3 = "5";
                    sPctP1 = "1";
                    sPctP2 = "2";
                    sPctP3 = "5";
                }
                else if( iCurrentMenu == 1 )
                {
                    sPctM1 = "10";
                    sPctM2 = "25";
                    sPctM3 = "50";
                    sPctP1 = "10";
                    sPctP2 = "25";
                    sPctP3 = "50";
                }
                else
                {
                    sPctM1 = "75";
                    sPctM2 = "85";
                    sPctM3 = "95";
                    sPctP1 = "75";
                    sPctP2 = "100";
                    sPctP3 = "200";
                }

                Menu();
            }
            else if( sMess == "Options" || sMess == " " )
            {
                llSetTimerEvent( 30.0 );
                llDialog( llGetOwner(),
                          "\nResizer options :\n \n" +
                          "Quit : Leave this menu.\n" +
                          "BACK : To main menu.\n" +
                          "Set default : Current size is default.\n" +
                          "Remove : Remove the script.",
                          [ "Quit", " ", "BACK",
                            "Set default", " ", "Remove" ],
                          iCanalMenu );
            }
            else if( sMess == "BACK" )
                Menu();
            else if( sMess == "Set default" )
            {
                vSize = llList2Vector( llGetLinkPrimitiveParams( iFirst, [ PRIM_SIZE ] ), 0 );
                fDefault = vSize.x;

                if( llGetAttached() )
                    llSay( iCanalComm, (string)llGetOwner() + "|Default|" + (string)fDefault );

                llOwnerSay( "This size is now the default size." );
                Menu();
            }
            else if( sMess == "Remove" )
            {
                llSetTimerEvent( 30.0 );
                llDialog( llGetOwner(),
                          "\nSure to remove the script from this object ?",
                          [ "Yes", "No" ],
                          iCanalMenu );
            }
            else if( sMess == "Default" )
                DefaultSize( TRUE );
            else if( sMess == "Min" )
                MinimumSize( TRUE );
            else if( sMess == "Max" )
                MaximumSize( TRUE );
            else if( ( iBcl = llListFindList( [ "+", "-" ], [ llGetSubString( sMess, 0, 0 ) ] ) ) >= 0 )
            {
                fFactor = 1.0 + (float)llGetSubString( sMess, 0, -2 ) / 100.0;
                fTmp    = llList2Float( [ llList2Float( [ 10.0, 10000.0 ], iAllowResizeHugePrims ), fLimiteMax ], iNoMoreMax );

                if( fMin * fFactor < 0.01 )
                    fFactor = 0.01 / fMin;
                else if( fMax * fFactor > fTmp )
                    fFactor = fTmp / fMax;

                if( fMin * fFactor >= 0.01 && fMax * fFactor <= fTmp && llRound( fFactor * 100.0 ) != 100 )
                {
                    sPct = (string)llRound( ( fFactor - 1.0 ) * 100.0 ) + "%";
                    if( fFactor > 1.0 )
                        sPct = "+" + sPct;
                    llOwnerSay( llList2String( [ "Increas", "Reduc" ], iBcl ) + "ing size : " +
                                sPct + llList2String( [ " (" + sMess + " asked)", "" ], (integer)(sMess == sPct) ) + "..." );

                    if( llGetAttached() )
                        llSay( iCanalComm, (string)llGetOwner() + "|Factor|" + (string)fFactor );

                    Resize( TRUE );
                }
                else
                {
                    llOwnerSay( "Out of size range." );
                    Menu();
                }
            }
            else
            {
                FinMenu( FALSE );

                if( sMess == "Yes" )
                {
                    if( llGetAttached() )
                        llSay( iCanalComm, (string)llGetOwner() + "|Remove" );
                    llRemoveInventory( llGetScriptName() );
                }
            }
        }
        else if( llGetAttached() && sName != llGetObjectName() )
        {
            lElem = llParseString2List( sName, [ " " ], [ "" ] );
            if( llGetListLength( lElem ) < 2 )
                return;
            lName = llParseString2List( llGetObjectName(), [ " " ], [ "" ] );
            if( llGetListLength( lName ) < 2 )
                return;

            if( llDumpList2String( llList2List( lElem, 0, -2 ), " " ) !=
                llDumpList2String( llList2List( lName, 0, -2 ), " " ) )
                return;

            lElem = llParseString2List( sMess, [ "|" ], [ "" ] );

            if( llList2String( lElem, 0 ) == (string)llGetOwner() )
            {
                if( llList2String( lElem, 1 ) == "Remove" )
                    llRemoveInventory( llGetScriptName() );
                else if( llList2String( lElem, 1 ) == "Factor" )
                {
                    fFactor = llList2Float( lElem, 2 );
                    Resize( FALSE );

                    llResetTime();
                }
                else if( llList2String( lElem, 1 ) == "Min" )
                    MinimumSize( FALSE );
                else if( llList2String( lElem, 1 ) == "Max" )
                    MaximumSize( FALSE );
                else if( llList2String( lElem, 1 ) == "Default" )
                {
                    if( llGetListLength( lElem ) == 2 )
                        DefaultSize( FALSE );
                    else
                        fDefault = llList2Float( lElem, 2 );
                }
            }
        }
    }

    timer()
    {
        FinMenu( TRUE );
    }

    touch_start( integer iNum )
    {
        if( llDetectedKey( 0 ) == llGetOwner() && ! iMenuOn && ! iHugeUsed )
        {

            iMenuOn = TRUE;
            iCanalMenu = iCanalComm - 10 - (integer)llFrand( 124578 );
            iEcouteMenu = llListen( iCanalMenu, "", llGetOwner(), "" );
            Menu();
        }
    }
}
Pages: 1 2