Don't click here unless you want to be banned.

LSL Wiki : exchangeTLMLRenderer

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl435.us.archive.org
exchangeTLML
exchangeTLTP
exchangeTLTPBrowser
exchangeTLMLGenerator

TLML Display Element - Main:
// TLML Display Element - Version 0.62 release candidate

list stack;
integer position;

//{

string pop()
{
    return llList2String(stack, ++position);
}


string peak()
{
    return llList2String(stack, position);
}

//}
//#undef STACK

string url;
string config;
string source_url;
integer config_mask;
float config_scale = 1.0;
string show_command;
string path;
string vecmag_1 = "<1,1,1>";

vector size = <0.05,0.05,0.05>;
vector pos = <0.0,0.0,0.0>;

string floatingtext;
vector floatingtextcolor = <1.0,1.0,1.0>;
float floatingtextalpha = 1.0;
//{

//}
integer status = 0x7F;

//{TightList
list TightListParse(string a) {
    string b = llGetSubString(a,((integer)""),((integer)""));//save memory
    return llParseStringKeepNulls(llDeleteSubString(a,((integer)""),((integer)"")), [a=b],[]);
}

string TightListDump(list a, string b) {
    string c = (string)a;
    if(llStringLength(b)==1)
        if(llSubStringIndex(c,b) & 0x80000000)
            jump end;
    integer d = 1 - llStringLength(b += "|\\/?!@#$%^&*()_=:;~{}`[],\n\" qQxXzZ");
    while(1+llSubStringIndex(c,llGetSubString(b,d,d)) && d)
        ++d;
    b = llGetSubString(b,d,d);
    @end;
    c = "";//save memory
    return b + llDumpList2String(a, b);
}

list tokens(string a, integer b)
{
    list c;
    if(b)
        c = tokens(llDeleteSubString(a,((integer)""),((integer)"")), b - 1);
    return [llGetSubString(a,((integer)""),((integer)""))] + c;
}

list TightListTypeParse(string a) {
    list b;
    if(llStringLength(a) > 6)
    {
        string m = llGetSubString(a,((integer)""),6);
        integer c = -llGetListLength(b = llDeleteSubList(llParseStringKeepNulls(llDeleteSubString(a,((integer)""),5), [a=""],tokens(m, 5)),((integer)""),((integer)"")));
        integer d;
        do
        {
            list f = [a = llList2String(b,c + 1)]; //TYPE_STRING || TYPE_INVALID (though we don't care about invalid)
            if((d = (1 + llSubStringIndex(m, llList2String(b,c)))) == TYPE_INTEGER)
                f = [(integer)a];
            else if(d == TYPE_FLOAT)
                f = [(float)a];
//            else if(d == TYPE_STRING)
//                already handled
            else if(d == TYPE_KEY)
                f = [(key)a];
            else if(d == TYPE_VECTOR)
                f = [(vector)a];
            else if(d == TYPE_ROTATION)
                f = [(rotation)a];
            b = llListReplaceList(b, f, c, c+1);
        }while((c+=2) & 0x80000000);
    }
    return b;
}
//}
//{


//#define DEBUG(a) llOwnerSay((string)(a))


//}
//#define SizeRange(x) (x)
//#define Unescape(x) (x)
//#define SetPrimTypeChained(a,b,c,d,e,f,g,h,i,j,k,l,m) ++position


float SizeRange(float a)
{
    if(0.01 > (a = llFabs(a)))
        a = 0.01;
    if(a > 10.0)
        a = 10.0;
    return a;
}


string Unescape(string a)
{
    string  b = a;
    integer c = -1;
    integer d = ((integer)"");
    integer e = ((integer)"");
    integer f = ((integer)""); 
    while(d = llSubStringIndex(b, (b = "") + "\\") + 1)
    {
        if(2 < (e = llSubStringIndex("uUr\"\\nt", llGetSubString(a,d = 1 + (c+=d),d))))
            a = llInsertString(llDeleteSubString(a,c,d), c, llGetSubString("   \"\\\n\t",e, (e - (7 * (e == 6)))));
        else if(e == 2)
        {
            if(d+(e = (integer)("0x"+llGetSubString(a,d+1,d+1)) * 2)+1 >= (f = llStringLength(a)))
                e = (f - d - 2) & -2;
            if((f = e))//this may look like a mistake, it's not
            {
                do
                    b = "%"+llGetSubString(a,d + e,d + e + 1) + b;
                while((e-=2) > ((integer)""));
            }
            a = llInsertString(llDeleteSubString(a,c, c + 2 + f),c, b = llUnescapeURL(b));
            c += llStringLength(b) - 1;//add to c so we don't accidentily unescape result
        }
        else if(e + 1)// \uXXXX or  \UXXXXXXXX
        {
            b = llGetSubString(a, d + 1, d + 4 + e *= 4);
            a = llDeleteSubString(a, c, d + 4 + e);
            if(((integer)"") < e = (integer)("0x"+b))
            {
                f = (e >= 0x80) + (e >= 0x800) + (e >= 0x10000) + (e >= 0x200000) + (e >= 0x4000000);
                b = "%" + byte2hex((e >> (6 * f)) | ((0x3F80 >> f) * (!!f)));
                while(f)
                    b += "%" + byte2hex((((e >> (6 * --f)) | 0x80) & 0xBF));
                a = llInsertString(a, c, llUnescapeURL(b));
            }
        }
        b = llDeleteSubString(a,((integer)""),c);
    }
    return a;
}

string byte2hex(integer x)
{
    string hexc="0123456789ABCDEF";
    integer xa = (x & 0xF);
    return llGetSubString(hexc, xa = ((x >> 4) & 0xF), xa) + llGetSubString(hexc, xa, xa);
}

hideshow(integer a)
{
    list b = [PRIM_SIZE];
    if(a)
    {
        b += <    SizeRange(size.x * config_scale), 
                SizeRange(size.y * config_scale * (1.0 + (0.1547344110854503464203233256351 * !!(status & 0x20)))), 
                SizeRange(size.z * config_scale)>;

        if((status & (0x3)) || !(status & 0x800))//if something changed we refresh
            llSetText(floatingtext, floatingtextcolor, floatingtextalpha);
    }
    else
    {
        b += <0.05,0.05,0.05>;
        llSetText("", ((vector)""), ((float)""));
    }
    llSetPrimitiveParams([PRIM_POSITION, pos * config_scale * !!a] + b);
    status = (status & (0xffffF7FF)) | (0x800 * !!a);
}

integer parse_config(string c)
{
    stack = TightListParse(c);
    integer mask = (integer)peak();
    if(mask & 1)
        config_scale = (float)pop();
    position+=!!(mask & 2);
    if(mask & 4)
        pos = (vector)pop() + pos * !!(mask & 32);
    if(mask & 16)
        path = pop();
    return mask;
}

default
{
    link_message(integer t_int_1, integer t_int_2, string c, key d)
    {
        rotation t_rot = ((rotation)"");
        position = 3;
        if((t_int_2 & -2) == 1010)
        {
            if(llSubStringIndex(path, llGetSubString(d,0,0)) + 1)
            {
                if(t_int_2 & 1)
                    jump in3;
                d = llDeleteSubString(d,0,0);
                jump in1;
            }
        }
        else if(t_int_2 == 1001)
        {
            if(d == show_command)
                jump in4;
        }
        else if(t_int_2 == 1000)
            jump in2;
        jump out1;
        @in3;@in4;
        {
            position = 1;
            hideshow((integer)llList2String(stack,0) | ((status & 0x800) && (0x8 & parse_config(c))));
        }
        jump out2;
        @in2;@in1;
        {
            config_mask = parse_config(config = d);
            list config_list = stack;
//            config_root_local_rot = (rotation)llList2String(config_list, 1);
//            server = llList2String(config_list, 2);
            position = -llGetListLength(stack = TightListParse(c)); 
            if((t_int_2 = (llStringLength(c = peak()) | (t_int_1 = !((source_url = llList2String(config_list, ((integer)""))) == source_url)))))
            {
                url = "";
                if(t_int_1)
                    show_command = "";
                if(t_int_2 & 0xFFFFFFFE)
                    url = c;
                llSetObjectDesc(url);
            }
            integer source = (integer)("0x"+(c = pop()));
            integer t_int_3 = ((integer)"");
            list t_list_1;
            list t_list_2;
            vector t_vec = ((vector)"");
            integer settings_mask = 0xF; //default all
            if(c != (d="-"))
            {
                if(0x1 & source)
                {
                    if((c = pop()) == "-")
                        settings_mask = 0x1F0; //keep all
                    else if(c != "+")
                        settings_mask = (integer)("0x"+c);
                }
                else if(c!="+")
                    settings_mask = ((integer)""); //clear

                status = ((status | ((0x3)) | (0x400 * t_int_1)) & (((0xffffFFDF)) | (0x20 * !!(settings_mask & 0x80))));

                if(source & 0x2)
                    if(llStringLength(show_command = pop()) == 1)
                        show_command = "";

                if((t_int_1 = (0xC & source)) == 0x4)
                {
                    t_int_2 = (integer)llList2String(t_list_1 = TightListParse(pop()), ((integer)""));
                    if(t_int_2 >= ((integer)"") && t_int_2 <= 6)
                    {//PRIM_TYPE = 9
                        t_list_2 = [9, t_int_2, (integer)llList2String(t_list_1, 1),(vector)llList2String(t_list_1, 2),
                                            (float)llList2String(t_list_1, 3),(vector)llList2String(t_list_1, 4),
                                            (vector)llList2String(t_list_1, 5)];
                        if(t_int_2 != 3)//PRIM_TYPE_SPHERE
                        {
                            t_list_2 += (vector)llList2String(t_list_1, 6);
                            if(t_int_2 > 3)//== PRIM_TYPE_TORUS || e == PRIM_TYPE_TUBE || e == PRIM_TYPE_RING)
                                t_list_2 += [(vector)llList2String(t_list_1, 7),(vector)llList2String(t_list_1, 8),
                                             (float)llList2String(t_list_1, 9), (float)llList2String(t_list_1, 10),
                                             (float)llList2String(t_list_1, 11)];
                        }
                        llSetPrimitiveParams((t_list_1 = t_list_2 = []) + t_list_2);
                    }
                }
                else if(t_int_1 == 0x8)
                {//check defines to see if this function evaporates into TLML-L script.
                    llMessageLinked(LINK_THIS, 1002, pop(), "");
                }
                else if(t_int_1 == 0xC || settings_mask & 0x1)
                {//      [Type][9, 0, 0, <0,1,0>, 0.0, <0,0,0>, <1,1,0>, <0,0,0>]
                    c = "if__v_i9iiv<0,1,0>fvv<1,1,0>v";
                    if(t_int_1)
                        c = pop();
                    llSetPrimitiveParams(TightListTypeParse((c="")+c));
                }

                if(source & 0x10)
                    size = (vector)((c="")+c) + ((vector)vecmag_1 * (float)(c = pop()));
                if(source & 0x20)
                    pos = (vector)pop() + (pos * !!(settings_mask & 0x200));
                if(source & 0x40){
                    t_vec = (vector)llList2String(t_list_1 = TightListParse(pop()), ((integer)""));
                    pos = 0.5 * (t_vec + (size = (vector)llList2String(t_list_1, 1))) + (pos * !!(settings_mask & 0x200));
                    size -= t_vec;
                }

                if(source & 0x80){
                    t_rot = (rotation)(c = pop());
                    if(<t_rot.x, t_rot.y, t_rot.z> != (t_vec = (vector)c))
                        t_rot = llEuler2Rot(t_vec * DEG_TO_RAD);
                }else if(!(settings_mask & 0x2))
                    jump skip7;
                //t_rot hasn't been used yet so we don't have to zero it, isn't that wonderful?
                llSetLocalRot(t_rot * (rotation)llList2String(config_list, 1));
                @skip7;

                if(source & 0x100)
                    floatingtext = Unescape(pop());
                else if(settings_mask & 0x4)
                    floatingtext = "";
                else
                    status = status & (0xffffFFFE);

                if(source & 0x200)
                {
                    t_rot = (rotation)(c = pop());
                    if(<t_rot.x, t_rot.y, t_rot.z> == (floatingtextcolor = (vector)((c="")+c)))
                        floatingtextalpha = t_rot.s;
                }
                else if(settings_mask & 0x8)
                    floatingtextcolor = <1.0,1.0,(floatingtextalpha = 1.0)>;
                else
                    status = status & (0xffffFFFD);

                if(source & 0x400)
                {
                    t_list_2 = TightListTypeParse(pop());
                    status = status | 0x4;
                }
                else if(!(settings_mask & 0x10) && (status & 0x4))
                    status = status & (0xffffFFFB);//t_list_2 is clean
                else
                    jump skip8;
                llParticleSystem(t_list_2);
                @skip8;

                if(source & 0x800)
                {
                    llTargetOmega(    (vector)llList2String(t_list_1 = TightListParse(pop()), ((integer)"")),
                                    (float)llList2String(t_list_1, 1),         (float)llList2String(t_list_1, 2));
                    status = status | 0x8;
                }
                else if(!(settings_mask & 0x20) && (status & 0x8))
                {
                    status = status & (0xffffFFF7);
                    llTargetOmega(((vector)""), ((float)""), ((float)""));
                }

                if(source & 0x1000)
                {
                    llSetTextureAnim((integer)llList2String(t_list_1 = TightListParse(pop()), ((integer)"")),
                                     (integer)llList2String(t_list_1, 1),(integer)llList2String(t_list_1, 2),
                                     (integer)llList2String(t_list_1, 3),(float)llList2String(t_list_1, 4),     
                                     (float)  llList2String(t_list_1, 5),(float)llList2String((t_list_1 = []) + t_list_1, 6));
                    status = status | 0x10;
                }
                else if(!(settings_mask & 0x40) && (status & 0x10))
                {
                    llSetTextureAnim(((integer)""), ((integer)""), ((integer)""), ((integer)""), ((float)""), ((float)""), ((float)""));
                    status = status & (0xffffFFEF);
                }

                if(source & 0x2000)
                {
                    t_int_1 = (integer)llList2String(t_list_1 = TightListParse(pop()), t_int_2 = ((integer)""));
                    t_list_2 = TightListParse(llList2String(config_list, 2));
                    if(t_int_1 & 0x10)//XyText_key
                    {
                        t_list_2 = llListInsertList(t_list_2, llList2List(TightListParse(llList2String(t_list_1, t_int_2 = 1)) + ["",""],((integer)""),1), 1);
                        t_list_2 = llDeleteSubList(llDeleteSubList(t_list_2, t_int_3 = (llList2String(t_list_2,1) == ""), t_int_3),
                                                                             t_int_3 = ((llList2String(t_list_2, -2) != "") - 2), t_int_3);
                    }
                    t_list_2 = [c = TightListDump(t_list_2, "*")];
                    if(!(t_int_1 & 0x18))//XyText_key
                        t_list_2 = [];
                    llMessageLinked(LINK_THIS, 3200, 
                        TightListDump((t_list_1 = t_list_2 = [(0x10 * ((t_int_1 & 0x18) != ((integer)""))) | (t_int_1 & 0x3FFF7)]) + 
                                        t_list_2 + llList2List(t_list_1, t_int_2 + 1, t_int_2 + 12),"|"), c);
                    status = status | 0x20;
                }
                !!(source & 0x40000)+!!(source & 0x20000)+!!(source & 0x10000)+!!(source & 0x8000)+position+=!!(source & 0x4000);
//                else if(!(settings_mask & BITPrimKeepXyText))
//                    status = status | BITStatus_XyText_default;
//        
//                if(source & BITSetURL)
//                {
//                    llSetPrimURL(pop());
//                    status = status | BITStatus_SetURL;
//                }
//                else if(status & BITStatus_SetURL)
//                {
//                    if(settings_mask & BITPrimKeepURL)
//                        llRefreshPrimURL();
//                    else
//                    {
//                        status = status & BITStatus_SetURL_no;
//                        llSetPrimURL("");
//                    }
//                }
            }
//            llOwnerSay((string)llGetFreeMemory());
            c = (string)(t_list_2 = t_list_1 = []);
            if(!(config_mask & 0x8) || (status & 0x800))
                hideshow(!(source & 0x2));
            while((1+position) & (settings_mask = 0x80000000))
            {
                status = (status & ((0xffffFDFF))) | (0x180);
                if(0xF == (t_int_1 = (0xF & (source = (integer)("0x"+llList2String(stack = llDeleteSubList((stack = [])+stack, 0, position), ++position))))))
                {
                    t_int_1 = ALL_SIDES;
                    status = status | 0x200;
                }

                if(source & 0x10)
                {
                    settings_mask = (integer)("0x"+(c = pop()));
                    if(c == "+")
                        settings_mask = 0xFF; //default all
//                    else if(c == "-")
//                        settings_mask = 0x0; //keep all
                }

                position+=!!(source & 0x20);

                if((t_int_2 = (source & 0x100)) || (settings_mask & 0x1))
                {
                    if(t_int_2)
                        c = pop();
                    if(!t_int_2 || (c == ""))
                        c = "5748decc-f629-461c-9a36-a35a221fe21f";
                    t_int_2 = 5000;
                    if((t_int_2 = (integer)("0x"+llGetSubString(c,((integer)""),6)+"1")))//if it's non zero then its likely a key
                        llSetTexture(c, t_int_1);
                    llMessageLinked(LINK_THIS, 5900 - (!t_int_2 * 900), c, c = (string)t_int_1);


                }

                t_vec = (vector)vecmag_1;
                if(source & 0x200)
                    t_vec = (vector)pop();
                else if(!(settings_mask & 0x2))
                    jump skip5;
                llSetColor(t_vec, t_int_1);
                @skip5;

                t_vec.x = 1.0;
                if(source & 0x400)
                    t_vec.x = (float)pop();
                else if(!(settings_mask & 0x4))
                    jump skip6;
                llSetAlpha(t_vec.x, t_int_1);
                @skip6;

                t_vec = (vector)vecmag_1;
                if(source & 0x800)
                    t_vec = (vector)pop();
                else if(!(settings_mask & 0x8))
                    jump skip1;
                llScaleTexture(t_vec.x, t_vec.y, t_int_1);
                @skip1;

                t_vec = ((vector)"");
                if(source & 0x1000)
                    t_vec = (vector)pop();
                else if(!(settings_mask & 0x10))
                    jump skip2;
                llOffsetTexture(t_vec.x, t_vec.y, t_int_1);
                @skip2;

                t_vec.z = ((float)"");
                if(source & 0x2000)
                    t_vec.z = (float)pop();
                else if(!(settings_mask & 0x20))//5 + 5+1+5+1 + 5 + 5
                    jump skip3;
                llRotateTexture(t_vec.z, t_int_1);
                @skip3;

//                t_list_1 = [];//we don't need this since we haven't used it since the last wipe.
                if(source & 0x40)
                    t_list_1 = [PRIM_FULLBRIGHT, t_int_1, !!(source & 0x80)];

                if(source & 0x4000)
                    t_int_2 = (integer)pop();
                else if(settings_mask & 0x40)
                    t_int_2 = PRIM_SHINY_NONE;
                else
                    status = status & (0xffffFF7F);

                //To Save memory we have totaly screwed up the script
                //to add more flags, another integer will need to be added to the memory space
                if(source & 0x8000)
                    t_int_3 = (integer)pop();
                else if(settings_mask & 0x80)
                    t_int_3 = PRIM_BUMP_NONE;
                else if(!(0x100 & (status = (status & (0xffffFEFF)))))
                    jump skip4;

                if(status | 0x200)
                    t_int_1 = llGetNumberOfSides();

                do
                {
                    t_list_1 += t_list_2 + llGetPrimitiveParams(t_list_2 = 
                        [PRIM_BUMP_SHINY, t_int_1 -= !!(status & 0x200)]);
                    if(status & 0x80)
                        t_list_1 = llListReplaceList(t_list_1, [t_int_2], -2, -2);
                    if(status & 0x100)
                        t_list_1 = llListReplaceList(t_list_1, [t_int_3], -1, -1);
                }
                while(t_int_1 && (status & 0x200));
//                if(status & BITStatus_ALL_SIDES)
//                    t_int_1 = ALL_SIDES;

                @skip4;
                if(t_list_1 != [])
                    llSetPrimitiveParams((t_list_1 = [])+ t_list_1);
                !!(source & 0x80000)+!!(source & 0x40000)+!!(source & 0x20000)+position+=!!(source & 0x10000);
            }
            stack = [];
        }
        @out1;@out2;
    }
    touch_start(integer a)
    {
        if (url)
            llMessageLinked(1, 2000, url, config);
    }
}


TLML Display Element - XTM:
//TLML Display Element - XyTextMod Version 0.62 release candidate
//Portions of this script were taken from XyText

//#define EASY_CONFIG


string gCharIndex3;

string gCharIndex6;

//integer faces = 0x16473425;
//list offsetsingle = [0.037,0.0,0.244,0.0,0.037,];
//list offsetdouble = [];

string  XyText_key;
integer XyText_line;
integer XyText_ver = 5;
string  XyText_font = "471a92ff-50f4-2858-2f36-deab4cc50276";
integer XyText_BlockPosition;
integer XyText_mode;
float   XyText_fade_delay;
float   max_Alpha;

list TightListParse(string a) {
    string b = llGetSubString(a,0,0);//save memory
    return llParseStringKeepNulls(llDeleteSubString(a,0,0), [a=b], []);
}

string TightListDump(list a, string b) {
    string c = (string)a;
    if(llStringLength(b)==1)
        if(llSubStringIndex(c,b) == -1)
            jump end;
    integer d = 1 - llStringLength(b += "|\\/?!@#$%^&*()_=:;~{}[],\n\" qQxXzZ");
    while(1+llSubStringIndex(c,llGetSubString(b,d,d)) && d)
        ++d;
    b = llGetSubString(b,d,d);
    @end;
    c = "";//save memory
    return b + llDumpList2String(a, b);
}


//{XyText6 Keys

//}

//{XyText3 Functions
vector GetGridOffset3(string str, integer index) {
    return <-0.45 + 0.1 * ((index = llSubStringIndex(gCharIndex3, llGetSubString(str, index, index))) % 10), 0.45 - 0.1 * (index / 10), 0.0>;
}
//}

//{XyText6 Functions
integer gci6(string str, integer a)
{
    return llSubStringIndex(gCharIndex3 + gCharIndex6, llGetSubString(str, a, a));
}

vector GetGridPos6(string str, integer index2) {
    integer index1 = gci6(str, index2);
    // There are two ways to use the lookup table...
    if (index1 >= (index2 = gci6(str, index2 + 1)))
        return < index2 * 2, index1, 0.0>;
    return < index1 * 2 + 1, index2, 0.0>;
}

string GetGridTexture6(vector grid_pos) {
    integer GridRow = (integer)(grid_pos.y) / 10;

    return     llInsertString(
                llInsertString(
                    llInsertString(
                        llInsertString(
                            llGetSubString("00e9f9f70669181cc1927f8e67678c8d347a5cb600317ec02fcff298eebf3c0e4e7e689e37f19eca8596a958bbd2396319ea9c2167ba8f6f99db573b1b877eb1dde7b412cda1652f6fc273f4641f96e1af6fa3bb3a6c9c4f4bf5d1c126c830daa201d3a2364b43b686865881c0f82a94b674dec8fead99e5c28d2db8e4c51540366e05f3be6be5cfc33b731dff649caa75c4925c0427dc0cc71ce28674ff4d27dcbe166b6a97efb2fc8ee5bc6a8b1be60dca2febfc66a762db8589026a4ecd68a0fca76f503a946b93360a918e886f7a67fb375d89a15a4f8c7a0cd1c066ffc4300470b2da345470074c1b8464ca050cd1f8e91cce2bd85e2120930d3b6309462a190e447b29dadb0bffc31adaf5a17075d55e71f6f89835e746a45f189f30a1300fac332b303da326bce2d70428ec190747c776011a53ce13ee8b5bb9e87c1e85a855c3a94f01ca33e07dde92e727e2cbc1dab22d61298619497a5235c954e1f7aef047f266959616df641010edd8e14c34ebf7e5e12e1a579fe224d9d5e71b4a69e98c26a5ad05e92eb5b906ad9ef9462a92262a9791ac2d8957ab33334b7820b24b3a8c5782eec6ed555003f5dbcd9b481daa9ea8a9fa1ee4ab9a0d38e217c231dbdcc84215b07aa66da14745cfdcc97e3cbbc9a345dfa0ae955c1f4bf9cff1e7d030ff80a242cb69f6951d4eae3bed32d6c4d733c0f1f2426df1d222220d88f96a30dccf9b2031efda0dfeb23c72252f259558b84bcc6515fa274d0cfb65f2838c4fde80cceddff8195dfdf36b2ccc2594feadd2a3dfcdb3a61711badf53e0ce2972da00955c129e3289b36767763e0d336d321fddfa5c1be26131766f6ad43b1dc46b5176a78b9038865b82bf0606d16cbb1868fd1d5c93eae42164a37ddd5d98cf273e3fd0f03048be58ee3a0b0e47c89ede4a6233a2dacb852aad1b00fb9c4a550e13495b25c4f0b459dc06dee3ce8def312c735b0e48018b6799c8832f7132164e71d12303ed9c8554710c6b4a417d8a1f4f404b97836672f8527911ca5e21ec5b2059094c313f90d7316b3306a4fcc3e1c4296d881701f88fbd7367130ac0846f3c95deb5b6d25c8070347459d540a0ae9d36065ae04f2842b64cfa8612ae9af53c5bf428998174d7abc4fd12467401e9792c4934e06ac761542797d53c3eaa0404386006753e375596c3e39f5b26bd81d3b25e62fe5b671d1e3e79f57f0b64a050d617ee00c8e9e3adc9cbbeff166af5f3f05ee02098f2b00e27ed02278a6594ba6d5e0d2b93f2e4f4bf70a707197d449e5b58846c0c850c61f9d6021d4b1a9503a44fee2b976eb5d80e680ae2ffae7265524dcb76c2b691992706f6e41cf21104bd0b0190dffad1bac8132b4bb15e956d56ae69f5d26a20de0ce7f816da2c51f1612a2029a542db7db882345fea05c7be465c409f9dcb3bd2aa07b3017e02c0635185acd51ef5f9d79b894dcff36519713c2bd73c77e1dc54242a", GridRow = ((GridRow * (GridRow + 1) / 2 + ((integer)(grid_pos.x) / 20)) * 32), GridRow + 31)
                            ,8,"-"),
                        13,"-"),
                    18,"-"),
                23,"-");


}

vector GetGridOffset6(vector grid_pos) {
    return <-0.45 + 0.05 * (llRound(grid_pos.x) % 20), 0.45 - 0.1 * (llRound(grid_pos.y) % 10), 0.0>;
}
//}


string hexc="0123456789ABCDEF";

string byte2hex(integer x)
{//Helper function for use with unicode characters.
    integer x0  = (x & 0xF);
    return llGetSubString(hexc, x0 = ((x >> 4) & 0xF), x0) + llGetSubString(hexc, x0, x0);
}

string Unescape(string a)
{
    string  b = a;
    integer c = -1;
    integer d = ((integer)"");
    integer e = ((integer)"");
    integer f = ((integer)""); 
    while(d = llSubStringIndex(b, (b = "") + "\\") + 1)
    {
        if(2 < (e = llSubStringIndex("uUr\"\\nt", llGetSubString(a,d = 1 + (c+=d),d))))
            a = llInsertString(llDeleteSubString(a,c,d), c, llGetSubString("   \"\\\n\t",e, (e - (7 * (e == 6)))));
        else if(e == 2)
        {
            if(d+(e = (integer)("0x"+llGetSubString(a,d+1,d+1)) * 2)+1 >= (f = llStringLength(a)))
                e = (f - d - 2) & -2;
            if((f = e))//this may look like a mistake, it's not
            {
                do
                    b = "%"+llGetSubString(a,d + e,d + e + 1) + b;
                while((e-=2) > ((integer)""));
            }
            a = llInsertString(llDeleteSubString(a,c, c + 2 + f),c, b = llUnescapeURL(b));
            c += llStringLength(b) - 1;//add to c so we don't accidentily unescape result
        }
        else if(e + 1)// \uXXXX or  \UXXXXXXXX
        {
            b = llGetSubString(a, d + 1, d + 4 + e *= 4);
            a = llDeleteSubString(a, c, d + 4 + e);
            if(((integer)"") < e = (integer)("0x"+b))
            {
                f = (e >= 0x80) + (e >= 0x800) + (e >= 0x10000) + (e >= 0x200000) + (e >= 0x4000000);
                b = "%" + byte2hex((e >> (6 * f)) | ((0x3F80 >> f) * (!!f)));
                while(f)
                    b += "%" + byte2hex((((e >> (6 * --f)) | 0x80) & 0xBF));
                a = llInsertString(a, c, llUnescapeURL(b));
            }
        }
        b = llDeleteSubString(a,((integer)""),c);
    }
    return a;
}

list faces()
{
    return llCSV2List("<3,2" + //"<-1,1,0>,<3,2" + 
                llList2String([    ",.025>,<6,1,0>,<5,1,0>,<1,2,-.025>",
                                ".46,.037>,<7,1,0>,<4,-14.8,-.315>,<6,1,0>,<1,2.46,-.037>"],
                            !(XyText_ver % 5)    ));
}

display(string c, integer BlockPosition)
{
    list b;
    string m = "17,.83.020,.80.3";
    integer x = 8 * !(XyText_ver % 5);
    if((string)llGetPrimitiveParams([PRIM_TYPE]) != (string)
        (b = [2, 32, (vector)("<."+llGetSubString(m,x,x+5)+",0>"), (float)llGetSubString(m,x+6,x+7), ((vector)""), (vector)"<1,1,0>", ((vector)"")]))
            llSetPrimitiveParams([PRIM_TYPE] + b);
    if(XyText_mode & 1)
        llSetAlpha(0.00, ALL_SIDES);
    c = llGetSubString(Unescape(c), BlockPosition *= XyText_ver , BlockPosition + XyText_ver - 1);// + "  ";//spaces are the clear.

    b = faces();

    BlockPosition = (!(XyText_ver % 4)) - 5;//6;

    x = (XyText_ver > 5);

    vector t = (vector)"";

    list temp = [PRIM_TEXTURE, ALL_SIDES, "11ee27f5-43c0-414e-afd5-d7f5688c351f", (vector)"<1,1,0>", ((vector)""), ((float)"")];
    do
    {
        vector k = (vector)llList2String(b, BlockPosition);

        if(x)
            temp += [PRIM_TEXTURE, (integer)k.x, GetGridTexture6(t = GetGridPos6( c, XyText_ver + BlockPosition * 2 )),
                    <0.1 * k.y, 0.1, ((float)"")>, GetGridOffset6(t) + <2 * k.z,((float)""),((float)"")> , ((float)""),
                    PRIM_FULLBRIGHT, (integer)k.x, !!(XyText_mode & 2)];
        else

            temp += [PRIM_TEXTURE, (integer)k.x, XyText_font, <.05 * k.y, 0.1, ((float)"")>,
                    GetGridOffset3(c, XyText_ver + BlockPosition) + <k.z,((float)""),((float)"")> , ((float)""),
                    PRIM_FULLBRIGHT, (integer)k.x, !!(XyText_mode & 2)];
    }while(++BlockPosition);
    llSetPrimitiveParams(temp);

    if(XyText_mode & 1)
    {
        float Alpha = 0.05;
        for (; Alpha < max_Alpha; Alpha += 0.05)
            llSetAlpha(Alpha, ALL_SIDES);
        llSetAlpha(max_Alpha, ALL_SIDES);
        if (XyText_fade_delay >= 0.0)
        {
            llSleep(XyText_fade_delay);
            for (Alpha = max_Alpha; Alpha >= 0.05; Alpha -= 0.05)
                llSetAlpha(Alpha, ALL_SIDES);
            llSetAlpha(0.0, ALL_SIDES);
        }
    }
}


key getline;
key getlines;
key card;
list badpos;
integer pos;
integer lines;
string TN_ID;
integer direction;

getNextTexture()
{
    integer c = ((pos + lines) % lines);
    integer d;
    while((llListFindList(badpos, [((c + d + lines + lines) % lines)]) + 1) && (d < lines) && (d > -lines))
        d += direction/llAbs(direction);
    pos = (pos + d) % lines;
    if(llAbs(d) < lines)
        getline = llGetNotecardLine(card, ((pos + lines) % lines));
}

checkBadPos(integer a, integer c)
{
    if(llListFindList(badpos, [a = ((a % lines) + lines ) % lines]) == -1)
    {
        badpos = llListSort(badpos + [a], 1, 1);
        if(c)
            llMessageLinked(LINK_SET, 5100, (string)a, card);
        if(direction)
        {
            integer b = ((pos % lines) + lines ) % lines;
            c = direction/llAbs(direction);
            if(pos*c >= ((integer)"") && a*c <= b*c)
            {
                if(b)
                    pos += c;
                getNextTexture();
            }
        }
    }
}


default
{
    state_entry()
    {
        gCharIndex3 = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`"
                    + "abcdefghijklmnopqrstuvwxyz{|}~"
                    + llUnescapeURL("%CF%80%CE%B8%C3%97%C2%B0%E2%88%9A");

        gCharIndex6 = llUnescapeURL("%C2%B2%C2%B3%C2%BC%C2%BD%C2%BE%C2%A7%C2%A9%C2%AE%E2%80%A2%E2%80%A6");

    }
    link_message(integer a, integer b, string c, key d)
    {


        list info;

        if(b == 3000)
        {    
            if(d == XyText_key && d != "")
                for(a = llGetListLength(info = TightListParse((c = d = "") + c)), b = ((integer)""); b < a; b+= 2)
                    if((integer)llList2String(info,b) == XyText_line)
                        display(llList2String(info,b + 1),XyText_BlockPosition);
        }
        else if(b == 3100 || b == 3200)
        {
            if((b = (b != 3100)) || d != XyText_key)
                if(!b || a != llGetLinkNumber())
                    jump end;
            info = TightListParse(c);
            if((integer)llList2String(info,((integer)"")) == XyText_line || b)
            {
                integer e = !b;
                integer g = 7 & (a = (integer)llList2String(info,e));
                vector t = ((vector)"");
//                if(b == XyText_Group)
//                {

                if(g && (g < 5))
                    XyText_ver = (integer)("0x"+llGetSubString("-458A",g,g));

//                }
                list f = faces();
                if(a & 0x10)
                    XyText_key = llList2String(info, ++e);
                if(a & 0x20)
                    XyText_line = (integer)llList2String(info, ++e);
                if(a & 0x40)
                {// XyText_BlockPosition
                    ++e;
                    if(b)
                        XyText_BlockPosition = (integer)llList2String(info, e);
                }
                if(a & 0x80)
                {// XyText_font
                    XyText_font = llList2String(info, ++e);
                    if(!(a & 0x3000) && XyText_ver < 6)
                    {
                        g = !(XyText_ver % 4) - 5;
                        do
                        {
                            t = (vector)llList2String(f,g);
                            llSetTexture(XyText_font, (integer)t.x);
                        }
                        while(++g);
                    }
                }
                if(!b)
                    XyText_mode = (XyText_mode & -2) | !!(a & 0x100);
                if(a & 0x200)
                {// XyText_fade_delay
                    ++e;
                    if(!b)
                        XyText_fade_delay = (float)llList2String(info, e);
                }
                if(a & 0x400)
                {// max_Alpha
                    max_Alpha = (float)llList2String(info, ++e);
                    g = !(XyText_ver % 4) - 5;
                    do
                    {
                        t = (vector)llList2String(f,g);
                        llSetAlpha(max_Alpha, (integer)t.x);
                    }
                    while(++g);
                }
                if(a & 0x800)
                {
                    vector color = (vector)llList2String(info, ++e);
                    g = !(XyText_ver % 4) - 5;
                    do
                    {
                        t = (vector)llList2String(f,g);
                        llSetColor(color, (integer)t.x);
                    }
                    while(++g);
                }
                if(a & 0x1000)
                    XyText_mode = (XyText_mode & -3) | ((!!(integer)llList2String(info, ++e)) << 1);
                if(a & 0x30000)
                {// display
                    display(c = llList2String(info, ++e), XyText_BlockPosition * !!(a & 0x10000));
                    if(d == XyText_key && b && (a & 0x30000) == 0x30000)
                        llMessageLinked(LINK_ALL_OTHERS, 3000, TightListDump([XyText_line, c],"|"), d);
                }
            }
            @end;
        }
        else if(b == 3300 || b == 8999)
        {
            if(d == XyText_key || a == llGetLinkNumber() || b == 8999)
            {
                XyText_key = "";
                XyText_line = -2147483648;
                XyText_BlockPosition = ((integer)"");
            }
        }

        else if(b == 5000)
        {
            info = TightListParse(c);
            pos = llList2Integer(info,2);
            if(!direction = (integer)llList2String(info,3))
                direction = 1;
            badpos = [];
            getlines = llGetNumberOfNotecardLines(card = llList2String(info,0));
            TN_ID = TightListDump([card,llList2String(info,1)],"*");
        }
        else if(b == 5100)
        {
            if(d == card)
                checkBadPos((integer)c,0);
        }
        else if(b == 5200)
        {
            if(d == TN_ID)
            {
                b = pos + (direction = (integer)c);
                a = direction/llAbs(direction);
                do
                    if(llListFindList(badpos, [(((pos += a) % lines) + lines) % lines]) + 1)
                        b+=a;
                while(pos*a<b*a);
                getNextTexture();
            }
        }

        else if(b == 5900)
        {
            if(a == llGetLinkNumber())
            {
//                llSetTexture(d, (integer)c);
                XyText_line = (integer)(XyText_key = "");
            }
        }


    }

    dataserver(key a, string b)
    {
        if(a == getlines)
        {
            getlines = "";
            lines = (integer)b;
            getNextTexture();
        }
        else if(a == getline)
        {
            getline = "";
            if(llSubStringIndex(hexc+"abcdef", llGetSubString(b,0,0)) + 1)
            {
                list e = llCSV2List(b);
                if(llGetListLength(e) == 1)
                    e = llParseString2List(b, [llGetSubString(b,36,36)],[]);
                integer c = ALL_SIDES;
                if((a = llList2String(e,2)) != "")
                    c = (integer)((string)a);
                llSetTexture(llGetSubString(b,0,35), c);
            }
            else
                checkBadPos(pos,1);
        }
    }

}

TLML-L & Updater
// TLML-L & Updater - Version 0.62

list TightListParse(string a) {
    string b = llGetSubString(a,0,0);//save memory
    return llParseStringKeepNulls(llDeleteSubString(a,0,0), [a=b],[]);
}

vector v_one = <1.0,1.0,1.0>;
string config;
key cardrequest;
string path;

hide(list a)
{
    llSetPrimitiveParams(a + [PRIM_POSITION, (v_one * 0.0), PRIM_SIZE, v_one * 0.05]);
}

SetPrimTypeChained(list versions, list types, 
            integer holeshape, vector cut, float hollow, vector twist, vector topsize, vector topshear,
            vector advancedcut, vector taper, vector stuff)//float revolutions, float radiusoffset, float skew)
{
    if(versions == types)
    {
        integer version;
        integer type;
        integer len = -llGetListLength(versions);
        while(len)
        {
            list r = [version = llList2Integer(versions,len), type = llList2Integer(types,len++)];
            if(1 == version)
            {//legacy PRIM_TYPE interface, still active for backwords compatability. introduced in 1.3 fazed out in 1.5
                r += [cut, hollow];
                if(type != 3)//PRIM_TYPE_BOX,PRIM_TYPE_CYLINDER,PRIM_TYPE_PRISM
                    r += twist.y;
                if(4 == type)//PRIM_TYPE_TORUS
                    r += [topsize.y, topshear, advancedcut];
                if(5 == type)//PRIM_TYPE_TUBE
                    r += topshear.x;
    //            else if(PRIM_TYPE_RING == p) ring shape not arround when this interface was implemented
            }
            if(version == 9)
            {//new PRIM_TYPE interface. introduced in 1.5, various revisions have added new restrictions
                r += [holeshape, cut, hollow, twist];
                if(type >= 4)//PRIM_TYPE_TORUS,PRIM_TYPE_TUBE,PRIM_TYPE_RING
                    r +=[topsize, topshear, advancedcut, taper, stuff.x, stuff.y, stuff.z];// revolutions, radiusoffset, skew];
            }
            if(type <= 2)
                r += [topsize, topshear];
            if(3 == type)//PRIM_TYPE_SPHERE
                r += advancedcut;
            llSetPrimitiveParams(r);
        }
    }
}

list stack;

clear()
{
    llMessageLinked(LINK_THIS, 1000, "|-|31|+|<.05,.05,.05>||1F|+", path = cardrequest = "");
}

default
{
    link_message(integer a, integer b, string c, key d)
    {
        if(b == 1100)
        {//email, we use the elements as a giant email multi-thread.
            if(llList2Integer(stack = TightListParse(c),0) == llGetLinkNumber()) //keeps bad things from happening
            {
                if(llSubStringIndex(c = llList2String(stack,1),"@") == -1)
                    c += "@lsl.secondlife.com";
                llEmail(c, llList2String(stack,2), d);
                llSetTimerEvent((float)llList2String(stack,3));
            }
        }
        else if(b == 8999)
            clear();
        else if(b == 8998)
            llSetRemoteScriptAccessPin((integer)c);
//        else if(b == 8994)
//            llSetScriptState(d,(integer)c);
        else if(b == 8993)
        {
            if(INVENTORY_NONE != llGetInventoryType(c))
                llRemoveInventory(c);
        }
        else if(b == 8992)
            llSetTimerEvent((float)c);
        else if(b == 6000)
        {//begin,end,offset,visible-begin,visible-end
            stack = TightListParse(config = d);
            cardrequest = d = llList2String(stack, 2);
            b = 0;
            if((a = (integer)llList2String(stack,3)) & 2)
                b = (integer)llList2String(stack, 4 | (a & 1));
            a = llGetLinkNumber() - 2 - b;
            stack = TightListParse(c);
            b = (integer)llList2String(stack, 0);
            integer e = (integer)llList2String(stack,1);
            if( a >= b  && a <= e)
            {
                if(d)
                    cardrequest = llGetNotecardLine(d, a - b + (integer)llList2String(stack, 2));
            }
            else if(a < b)
            {
                if(a < e || ((llGetSubString(c, 0, 0) != "0") && !(e = (integer)(c = llList2String(stack, 3)))))
                    hide([]);
            }
            else if(a > (integer)llList2String(stack, 4))
                hide([]);
        }
        else if(b == 1000)
        {
            if(32 & b = (integer)llList2String(stack = TightListParse(d),3))
                path = llList2String(stack,3 + (1 & b) + !!(b & 4) + !!(b & 16));
            cardrequest = "";
        }
        else if(b == 1002)
        {
            if(a == llGetLinkNumber())
                SetPrimTypeChained(TightListParse(llList2String(stack = TightListParse(c), 0)),
                                 TightListParse(llList2String(stack, 1)),  (integer)llList2String(stack, 2),
                                        (vector)llList2String(stack, 3),     (float)    llList2String(stack, 4),
                                        (vector)llList2String(stack, 5),    (vector)llList2String(stack, 6),
                                        (vector)llList2String(stack, 7),    (vector)llList2String(stack, 8),
                                        (vector)llList2String(stack, 9),   <(float)    llList2String(stack, 10),
                                        (float)    llList2String(stack, 11),    (float)    llList2String(stack, 12)>);
        }
        stack = [];
    }
    changed(integer a)
    {
        if(a & CHANGED_LINK)
            if(!llGetLinkNumber())
                llDie();
    }
    dataserver(key request, string data)
    {
        if(cardrequest == request)
            llMessageLinked(LINK_THIS, 1000, data, config);
    }
    email(string t, string a, string s, string m, integer n)
    {
        llMessageLinked(LINK_ROOT,1200, "", m);
    }
    timer()
    {
        llGetNextEmail("","");
    }
}
Ultrabook Notebook Tipis Harga Murah Terbaik
There is no comment on this page. [Display comments/form]