Difference between revisions of "Script to report on who made which animations in a prim"

From Second Life Wiki
Jump to: navigation, search
(Created page with "* Back to MLPV2_Addons //really pretty basic. Just drop script in. Will delete itself at end. //bear in mind that counting starts at 0, so add at the end add 1 in your head …")
 
Line 1: Line 1:
 
* Back to [[MLPV2_Addons]]
 
* Back to [[MLPV2_Addons]]
  
 +
<lsl>
 
//really pretty basic. Just drop script in. Will delete itself at end.
 
//really pretty basic. Just drop script in. Will delete itself at end.
 
//bear in mind that counting starts at 0, so add at the end add 1 in your head to the total
 
//bear in mind that counting starts at 0, so add at the end add 1 in your head to the total
Line 59: Line 60:
 
     }
 
     }
 
}
 
}
 +
 +
</lsl>

Revision as of 12:39, 19 December 2011

<lsl> //really pretty basic. Just drop script in. Will delete itself at end. //bear in mind that counting starts at 0, so add at the end add 1 in your head to the total key myQuery; integer Anim_Qty; string ObjectName; integer x; key CreatorID;

default {


       state_entry() {
           x = 0;
           Anim_Qty = llGetInventoryNumber(INVENTORY_ANIMATION);
           state animreport;
       }

}


state animreport {

   state_entry() {
   
           ObjectName = llGetInventoryName(INVENTORY_ANIMATION, x);
           llSetText( "[" + (string)x + "] : " + ObjectName + "\n\n\n",<1.0,1.0,1.0>,1.0);
           CreatorID = llGetInventoryCreator(ObjectName);
           myQuery = llRequestAgentData(CreatorID, DATA_NAME);
   }
   
   dataserver(key queryid, string data) {
       if (myQuery == queryid) {
           llSay(0, (string)x + ". " + ObjectName + " : " + data);
           llSetTimerEvent(5); 
           if (x < Anim_Qty) {
               x = x + 1;
               state next;
           }
       } 
   }
   
   timer() {
       llSetText("",<1.0,1.0,1.0>,1.0);
       llSetTimerEvent(0); 
       llRemoveInventory(llGetScriptName());
   }

}


state next {

   state_entry() {
       
       state animreport;
       
   }

}

</lsl>