Difference between revisions of "MLPV2 Menu Maker Helper"

From Second Life Wiki
Jump to navigation Jump to search
m
m
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
//you may need to re-order M and F anims in the pose line depending on your style of creating MLP menu lines
//you may need to re-order M and F anims in the pose line depending on your style of creating MLP menu lines
//to use, copy this into a script, save, add script to a box which holds the animations you want to use, then click the box to run the script.
//to use, copy this into a script, save, add script to a box which holds the animations you want to use, then click the box to run the script.
//WON'T be useful with all animations because of course how animations are named varies wildly from animator to animator, and not even animators are consistent with their own styles and if such inconsistently named anims are also no mod, you're beat....
//Chaz Longstaff November 2013
//Chaz Longstaff November 2013
//
//
Line 14: Line 15:
//[05:58]  POSE Sex1 B|Sex1 B|Sex1 T
//[05:58]  POSE Sex1 B|Sex1 B|Sex1 T
//[05:58]  POSE Sex1Brut B|Sex1Brut B|Sex1Brut T
//[05:58]  POSE Sex1Brut B|Sex1Brut B|Sex1Brut T
//[05:58]  POSE Sex1BrutFast F|Sex1BrutFast F|Sex1BrutFast T
//[05:58]  POSE Sex1BrutFast B|Sex1BrutFast B|Sex1BrutFast T
//[05:58]  POSE Sex1Fast B|Sex1Fast B|Sex1Fast T
//[05:58]  POSE Sex1Fast B|Sex1Fast B|Sex1Fast T
//[05:58]  POSE SexLickTit B|SexLickTit B|SexLickTit T
//[05:58]  POSE SexLickTit B|SexLickTit B|SexLickTit T

Latest revision as of 07:13, 16 November 2013

<lsl> //won't make your MLP menu for you completely but will save you some typing time by giving you an outline of your menu based on a set of animations //drop in a box of animations that are paired by name logically so that they will appear in alpha order in an inventory list. //it will make an MLP menu giving POSE name to first animation in the set of two //you may need to re-order M and F anims in the pose line depending on your style of creating MLP menu lines //to use, copy this into a script, save, add script to a box which holds the animations you want to use, then click the box to run the script. //WON'T be useful with all animations because of course how animations are named varies wildly from animator to animator, and not even animators are consistent with their own styles and if such inconsistently named anims are also no mod, you're beat.... //Chaz Longstaff November 2013 // //Sample of what this can produce for you //[05:58] POSE Cuddle 1 B|Cuddle 1 B|Cuddle 1 T //[05:58] POSE Kiss His Neck B|Kiss His Neck B|Kiss His Neck T //[05:58] POSE Relax Hug1 B|Relax Hug1 B|Relax Hug1 T //[05:58] POSE Sex Neck Kiss 01 B|Sex Neck Kiss 01 B|Sex Neck Kiss 01 T //[05:58] POSE Sex1 B|Sex1 B|Sex1 T //[05:58] POSE Sex1Brut B|Sex1Brut B|Sex1Brut T //[05:58] POSE Sex1BrutFast B|Sex1BrutFast B|Sex1BrutFast T //[05:58] POSE Sex1Fast B|Sex1Fast B|Sex1Fast T //[05:58] POSE SexLickTit B|SexLickTit B|SexLickTit T


mySay(string objectName, string msg) {

   string name = llGetObjectName();
   llSetObjectName(objectName);
   llSay(0, "/me " + msg);
   llSetObjectName(name);

}


list printObjectList(integer type) {

   list       result = [];
   integer    n = llGetInventoryNumber(INVENTORY_ANIMATION);
   integer    i = 0;
   integer count = 1;
   string myitem;
   string myitem1;
   string myitem2;
   integer type;   
   mySay("", "__________________________________________");
   while(i < n) {
           
       string itemName = llGetInventoryName(INVENTORY_ANIMATION, i);
       type = llGetInventoryType(itemName);
           
       if (type == INVENTORY_ANIMATION) {
       
       string myitem = llGetInventoryName(type, i);
       if (count == 1) {
           myitem1 = myitem;
          // llSay(0, (string)count + " " + myitem1);
       }
       else myitem2 = myitem;
       
       if (count == 2) {
       // llSay(0, (string)count + " " + myitem2);
          mySay("","POSE " + myitem1 + "|" + myitem1  + "|" + myitem2 ); 
          count = 1;
          myitem = "";
          myitem1 = "";
          myitem2 = "";
       }
       else {
          count = count + 1;  
       }
       
              

}


       ++i;
   }
   mySay("", "__________________________________________");
   return result;

}


//__________________________


default {

   on_rez(integer start_param) {
       llResetScript();
   }
   
   
   state_entry() {
   }
   
   
   changed(integer change) {
       if (change & CHANGED_INVENTORY) {
           llResetScript();
       }
   }
   
   touch_start(integer total_number) {
       string tmp = "all";  
       integer type;      
           type = INVENTORY_ALL;

       printObjectList(type);
   }
   


}


</lsl>