salahzar icon

poesia letta da notecard

salahzar | PRO | 04/05/13 10:41:11 PM UTC | 0 ⭐ | 8892 👁️ | Never ⏰ | []
LScript |

1.16 KB

|

None

|

0 👍

/

0 👎

list poesia;
integer i;
 
mostraverde(string s)
{
    llSetText( s, <0,1,0>, 1);
}
 
mostrablu(string s)
{
    llSetText( s, <0,0,1>, 1);
}
 
 
default
{
    state_entry()
    {
        llOwnerSay("Reading notecard");
        llSetText("Reading notecard...",<1,1,1>,1);
        poesia=[];
        i=0;
        llGetNotecardLine(llGetInventoryName(INVENTORY_NOTECARD,0),i);
    }
 
    dataserver(key id, string data)
    {
        //llOwnerSay("data: "+data);
        if(data==EOF) state ready;
        poesia+=[data];
        i++;
        llGetNotecardLine(llGetInventoryName(INVENTORY_NOTECARD,0),i);
    }
}
 
state ready
{ 
      state_entry()
    {
        llSay(0, "Reset");
        mostraverde(llList2String(poesia,0));
    }
    touch_start(integer count)
    {
        i=1;
       
        mostrablu( llList2String(poesia,i) );
       
        llSetTimerEvent(4);
    }
   
    timer()
    {
        i++;
        if(i< llGetListLength(poesia))
        {
            mostrablu(llList2String(poesia,i));
            return;
        }
       
        
         mostraverde(llList2String(poesia,0));
        
    }
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎