Here are my main scripts. Hope this helps to get a fwew answers
// The Master Chimera Script...
key k;
list keys = ["NULL","NULL","NULL"];
list dances = ["f_dance_06","f_dance_08","f_dance_09","f_dance_27"];
integer currentdance = 0;
integer active = 0;
integer dancetime = 90;
default
{
state_entry()
{
llListen(33,"","",""

;
llSetTimerEvent(0);
}
timer(){
if (active == 0){
llSetTimerEvent(0);
} else {
currentdance++;
if (currentdance >= llGetListLength(dances)) currentdance = 0;
string mes = "Next|"+llList2String(dances,currentdance);
llMessageLinked(LINK_SET,0,mes,NULL_KEY);
llOwnerSay("Active dancers = "+(string)active+" - Now playing dance, "+llList2String(dances,currentdance));
}
}
listen(integer channel, string name, key id, string message){
message = llToLower(message);
if (message == "stop"

{
integer y = llListFindList(keys,[(string)id]);
if (y != -1){
string mes = "Stop|"+llList2String(keys,y);
keys = llListReplaceList(keys,["NULL"],y,y);
active --;
y++;
llMessageLinked(LINK_SET,y,mes,NULL_KEY);
}
}
}
link_message(integer source, integer num, string message, key id)
{
if (num == 99){
k = (key)message;
integer y = llListFindList(keys,[(string)k]);
if (y == -1){
integer z = llListFindList(keys,["NULL"]);
if (z != -1){
keys = llListReplaceList(keys,[(string)k],z,z);
active++;
if (active == 1) llSetTimerEvent(dancetime);
}
}
}
}
touch_start(integer total_number)
{
k = llDetectedKey(0);
integer y = llListFindList(keys,[(string)k]);
if (y == -1){
integer z = llListFindList(keys,["NULL"]);
if (z != -1){
z++;
string mes = "Start|"+(string)k+"|"+llList2String(dances,currentdance);
llMessageLinked(LINK_SET,z,mes,NULL_KEY);
} else {
llInstantMessage(k,"I'm sorry but all dance slots are in use on this chimera"

;
}
} else {
llInstantMessage(k,"You are already dancing on this chimera"

;
}
}
}
// Script 1 (for use with first permissions, 2 3 4 ... would be for others)
key k;
integer myNum;
string dance;
default
{
state_entry()
{
myNum = (integer)llGetScriptName();
}
link_message(integer source, integer num, string message, key id)
{
if (num == myNum || num == 0){
if (k != NULL_KEY){
list commands = llParseString2List(message,["|"],[]);
string myCom = llList2String(commands,0);
if (myCom =="Start"

{
k = llList2Key(commands,1);
dance = llList2String(commands,2);
llRequestPermissions( k ,PERMISSION_TRIGGER_ANIMATION );
} else if (myCom == "Stop"

{
llStopAnimation(dance);
k = NULL_KEY;
} else if (myCom == "Next"

{
llStopAnimation(dance);
dance = llList2String(commands,1);
llStartAnimation(dance);
}
}
}
}
run_time_permissions(integer parm) {
if( parm == PERMISSION_TRIGGER_ANIMATION ) {
llStartAnimation(dance);
string mes = (string)k;
llMessageLinked(LINK_SET,99,mes,NULL_KEY);
}
}
}