'Open Source Scripting' group (Second Life) wiki

Object Rezzer

Modified: 11/03/2008 18:53 by 99.246.202.57
Put this in a prim and when the prim is touched a list off all the objects inside of it appear in a menu. Click on a object and it will be rezzed. Contains loops and inventory functions. Also how to remove a listen to reduce lag.

syntax error (9,14) it would seem, this still WIP?

list items;
integer lkey;
integer list_start;
init()
{
    items = [];
    list_start = 0;
    integer i;
    integer ni = llGetInventoryNumber( INVENTORY_OBJECT );
    for (i=0;i"Next";
        llDialog ( llGetOwner(),"Object",temp,8234 );
    }
    listen ( integer ch, string nm, key id, string mess )
    {
        llSetTimerEvent( 0 );
        llListenRemove( lkey );
        if ( mess == "Next" )
        {
            list_start=list_start + 11;
            if ( list_start >= llGetListLength( items ) )
            {
                list_start = 0;
            }
          lkey = llListen( 8234,"",llGetOwner(),"" );
          llSetTimerEvent( 500 );
          list temp = llList2List( items, list_start,list_start + 10 ) + "Next";
          llDialog ( llGetOwner(),"Object",temp,8234 );
          return;
        }
        llRezObject( mess, llGetRootPosition() + <1,1,0> ,ZERO_VECTOR,ZERO_ROTATION,0 );
    }
    timer()
    {
        llListenRemove( lkey );
        llSetTimerEvent(0);
    }
}

ScrewTurn Wiki version 1.0.11. Some of the icons created by FamFamFam.