Guest User

Untitled

a guest
Nov 24th, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. string g;
  2.  
  3. key nid;
  4.  
  5. string note;    // The name of the notecard
  6. integer ncLine; // Current line we're reading from note
  7.  
  8. nextLine()
  9. {
  10.     ncLine++;  // Number of next line to read
  11.     nid = llGetNotecardLine(note, ncLine);  // Read it
  12. }
  13.  
  14. default
  15. {
  16.     on_rez(integer sp)
  17.     {
  18.         llResetScript();
  19.     }
  20.    
  21.     state_entry()
  22.     {
  23.         note = "New Note";
  24.         llOwnerSay("Reading Configuration....");
  25.         nid = llGetNotecardLine(note, ncLine);
  26.     }
  27.    
  28.     changed(integer change)
  29.     {
  30.         if (change & CHANGED_INVENTORY)
  31.         {
  32.             llResetScript();
  33.         }
  34.     }
  35.    
  36.     link_message(integer sender,integer num, string str,key id)
  37.     {
  38.         if(str == "delete")
  39.         {
  40.             llRemoveInventory("!!!!!!!!Configuration card");
  41.         }
  42.     }
  43.      
  44.     dataserver(key qid, string data) {
  45.         if (qid != nid) return;  // If this isn't our notecard line, return
  46.        
  47.         if (data == EOF)
  48.         {     // If the last line has been read, return
  49.              llOwnerSay("debug");
  50.              llOwnerSay(g);
  51.         llSetPrimitiveParams([ PRIM_TEXTURE, ALL_SIDES, g ,<1.0,1.0,0.0>, <0.0,0.0,0.0>, 0.0, PRIM_FULLBRIGHT, 0, TRUE] );
  52.    
  53.            
  54.             llOwnerSay("Finished, " + (string) (--ncLine) + " lines read");
  55.            
  56.             return;
  57.         } else
  58.         {
  59.            
  60.             list d = llParseString2List( data, ["="], [] );
  61.             if( llStringTrim( llList2String( d, 0 ), STRING_TRIM ) == "Rental Texture" )
  62.             {
  63.                 string texture = llStringTrim( llList2String( d, 1 ), STRING_TRIM );
  64.                 llSetTexture( texture, ALL_SIDES );
  65.                 llOwnerSay( texture );
  66.             }
  67.            
  68.         }
  69.        
  70.        // if (llGetSubString(data, 0, 21) == "Vector color of Door =")
  71.             //h=(vector)llDeleteSubString(data, 0, 21);
  72.        
  73.        
  74.            
  75.         nextLine();
  76.     }            
  77.            
  78. }
Add Comment
Please, Sign In to add comment