salahzar

poesia letta da notecard

Apr 5th, 2013
135
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. list poesia;
  2. integer i;
  3.  
  4. mostraverde(string s)
  5. {
  6.     llSetText( s, <0,1,0>, 1);
  7. }
  8.  
  9. mostrablu(string s)
  10. {
  11.     llSetText( s, <0,0,1>, 1);
  12. }
  13.  
  14.  
  15. default
  16. {
  17.     state_entry()
  18.     {
  19.         llOwnerSay("Reading notecard");
  20.         llSetText("Reading notecard...",<1,1,1>,1);
  21.         poesia=[];
  22.         i=0;
  23.         llGetNotecardLine(llGetInventoryName(INVENTORY_NOTECARD,0),i);
  24.     }
  25.  
  26.     dataserver(key id, string data)
  27.     {
  28.         //llOwnerSay("data: "+data);
  29.         if(data==EOF) state ready;
  30.         poesia+=[data];
  31.         i++;
  32.         llGetNotecardLine(llGetInventoryName(INVENTORY_NOTECARD,0),i);
  33.     }
  34. }
  35.  
  36. state ready
  37. {
  38.       state_entry()
  39.     {
  40.         llSay(0, "Reset");
  41.         mostraverde(llList2String(poesia,0));
  42.     }
  43.     touch_start(integer count)
  44.     {
  45.         i=1;
  46.        
  47.         mostrablu( llList2String(poesia,i) );
  48.        
  49.         llSetTimerEvent(4);
  50.     }
  51.    
  52.     timer()
  53.     {
  54.         i++;
  55.         if(i< llGetListLength(poesia))
  56.         {
  57.             mostrablu(llList2String(poesia,i));
  58.             return;
  59.         }
  60.        
  61.        
  62.          mostraverde(llList2String(poesia,0));
  63.        
  64.     }
  65. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×