Difference between revisions of "MLPV2 Menu Maker Helper"
(Created page with "<lsl> //won't make your MLP menu for you completely but will save you some typing time //drop in a box of animations that are paired by name logically so that they will appear in…") |
|||
Line 1: | Line 1: | ||
<lsl> | <lsl> | ||
//won't make your MLP menu for you completely but will save you some typing time | //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 | //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 | //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 | //you may need to re-order M and F anims in the pose line depending on your style of creating MLP menu lines | ||
//Chaz Longstaff November 2013 | //Chaz Longstaff November 2013 | ||
// | // | ||
//Sample of what this can produce for you | //Sample of what this can produce for you | ||
//[05: | //[05:58] POSE Cuddle 1 B|Cuddle 1 B|Cuddle 1 T | ||
//[05: | //[05:58] POSE Kiss His Neck B|Kiss His Neck B|Kiss His Neck T | ||
//[05: | //[05:58] POSE Relax Hug1 B|Relax Hug1 B|Relax Hug1 T | ||
//[05: | //[05:58] POSE Sex Neck Kiss 01 B|Sex Neck Kiss 01 B|Sex Neck Kiss 01 T | ||
//[05: | //[05:58] POSE Sex1 B|Sex1 B|Sex1 T | ||
//[05: | //[05:58] POSE Sex1Brut B|Sex1Brut B|Sex1Brut T | ||
//[05:58] POSE Sex1BrutFast F|Sex1BrutFast F|Sex1BrutFast T | |||
//[05:58] POSE Sex1Fast B|Sex1Fast B|Sex1Fast T | |||
//[05:58] POSE SexLickTit B|SexLickTit B|SexLickTit T | |||
Line 27: | Line 28: | ||
list printObjectList(integer type) { | list printObjectList(integer type) { | ||
list result = []; | list result = []; | ||
integer n = llGetInventoryNumber( | integer n = llGetInventoryNumber(INVENTORY_ANIMATION); | ||
integer i = 0; | integer i = 0; | ||
integer count = | integer count = 1; | ||
string myitem; | string myitem; | ||
string myitem1; | string myitem1; | ||
Line 37: | Line 38: | ||
while(i < n) { | while(i < n) { | ||
string itemName = llGetInventoryName( | string itemName = llGetInventoryName(INVENTORY_ANIMATION, i); | ||
type = llGetInventoryType(itemName); | type = llGetInventoryType(itemName); | ||
if (type | if (type == INVENTORY_ANIMATION) { | ||
string myitem = llGetInventoryName(type, i); | string myitem = llGetInventoryName(type, i); | ||
if (count == 1) { | if (count == 1) { | ||
myitem1 = myitem; | myitem1 = myitem; | ||
// llSay(0, (string)count + " " + myitem1); | |||
} | } | ||
else myitem2 = myitem; | else myitem2 = myitem; | ||
if (count == 2) { | if (count == 2) { | ||
// llSay(0, (string)count + " " + myitem2); | |||
mySay("","POSE " + myitem1 + "|" + myitem1 + "|" + myitem2 ); | mySay("","POSE " + myitem1 + "|" + myitem1 + "|" + myitem2 ); | ||
count = | count = 1; | ||
myitem = ""; | myitem = ""; | ||
myitem1 = ""; | myitem1 = ""; | ||
Line 62: | Line 63: | ||
} | |||
Line 107: | Line 108: | ||
} | } | ||
</lsl> | </lsl> |
Revision as of 06:02, 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 //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 F|Sex1BrutFast F|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>