Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - // Script scritta fluttuante
 - // Lo script lo chiamate cosรฌ: _llSetText_@: gli ultimi due caratteri indicano separatori per andare a capo e per separare i parametri della descrizione
 - // La descrizione รจ fatta in questo modo
 - // Riga1_riga2_riga3@<1,1,1>@1
 - // Testo----^ Colore Alpha
 - // Default colore = bianco <1,1,1>, alpha 1
 - //
 - string NL="^"; // va a capo nella desc
 - string NF="~"; // separa desc da colore e da alpha
 - list desc;
 - string text;
 - vector color;
 - vector COLOR=<1,1,1>; // colore di default
 - float alpha;
 - string strReplace(string str, string search, string replace) {
 - return llDumpList2String(llParseStringKeepNulls( str, [search], []), replace);
 - }
 - init()
 - {
 - NL=llGetSubString(llGetScriptName(),-2,-2);
 - NF=llGetSubString(llGetScriptName(),-1,-1);
 - desc=llParseStringKeepNulls(llGetObjectDesc(),[NF],[]);
 - text=strReplace(llList2String(desc,0),NL,"\n");
 - color=COLOR;
 - alpha=1;
 - string x;
 - if(llGetListLength(desc)>1)
 - {
 - x=llList2String(desc,1);
 - if(x=="") color=<1,1,1>; else
 - color=(vector)llList2String(desc,1);
 - }
 - if(llGetListLength(desc)>2)
 - {
 - x=llList2String(desc,2);
 - if(x=="") alpha=1;
 - else
 - alpha=(float)llList2String(desc,2);
 - }
 - }
 - default
 - {
 - state_entry()
 - {
 - init();
 - llSetText(text,color,alpha);
 - llRemoveInventory(llGetScriptName());
 - }
 - }
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment