alphabroadcasta

By: bdhtrn on May 12th, 2011  |  syntax: Linden Scripting  |  size: 1.03 KB  |  hits: 104  |  expires: Never
download  |  raw  |  embed  |  report abuse
Copied
  1. string notename="In>";
  2. integer InLn;
  3. key query;
  4. vector cursorpos;
  5. integer chan=999987;
  6.  
  7. init(){
  8.     llShout(chan,"cleartext");
  9.     InLn=0;
  10.     query = llGetNotecardLine(notename, InLn);
  11. }
  12.  
  13. default{
  14.     on_rez(integer p){
  15.         llResetScript();
  16.     }
  17.     state_entry(){
  18.         init();
  19.     }
  20.     dataserver(key query_id, string data) {
  21.         if (query_id == query){
  22.             integer len = llStringLength(data);
  23.             cursorpos=<0,0,2>;
  24.             cursorpos.x -= 0.63*(len/2);
  25.             if (data != EOF){
  26.                 integer i=0;
  27.                 do{
  28.                     string char = llGetSubString(data,i,i);
  29.                     if(char!=" ")
  30.                         llRezObject(char,llGetPos()+cursorpos,ZERO_VECTOR,ZERO_ROTATION,0);
  31.                     i++;
  32.                     cursorpos.x += 0.63;
  33.                 }while(i<llStringLength(data));
  34.                 InLn++;
  35.                 llShout(chan,"nl");
  36.                 query = llGetNotecardLine(notename,InLn);
  37.             }
  38.         }
  39.     }
  40. }