Script to report on who made which animations in a prim
Jump to navigation
Jump to search
- Back to MLPV2_Addons
<lsl> //really pretty basic. Just drop script in. Will delete itself at end. //bear in mind that counting starts at 0, so 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>