From: Ruthven Willenov
as explained in many other posts, this forum is not for free scripts, it's for help in creating/editing scripts
Sorry Ruthven, Here is the script that I need to add the correct sounds to
As you can see the messages are already there and what I need is a specific sound (which I already have) to be played when a specific message is displayed.
list messages = [
"%N touches %V 's nipples and they stiffen.",
"%N rubs %V 's nipple, making %V moan.",
"%N pinches %V 's nipple, making %V whimper.",
"%N tugs on %V 's nipple, making %V 's nipple throb.",
"Rubbing in small circles %N stimulates %V 's nipples.",
"Pulling on %V 's nipples makes %V 's squirm."
];
//Extract just the first name (first word) from a string
string extractFirst( string wholeName )
{
list tokens = llParseString2List(wholeName, [" "],[]);
return llList2String(tokens, 0);
}
// Searches through string "src" for a pattern "pattern" and replaces it
// with string "value"
string replace_token(string src, string value, string pattern)
{
list tokens = llParseString2List(src, [" "],[]);
integer length = llGetListLength(tokens);
string new = "";
integer i=0;
string token = "";
for(i = 0; i < length; i++)
{
token = llList2String(tokens, i);
if(token == pattern) token = value;
if(i > 0)
new = new + " " + token;
else
new = token;
}
return new;
}
string next_template(list strings)
{
return llList2String(llListRandomize(strings, 1), 0);
}
//Build a random message from the list of messages.
string random_message(list templates)
{
string name = extractFirst(llDetectedName(0));
string victim = extractFirst(llKey2Name(llGetOwner()));
string message = replace_token(replace_token(next_template(templates), name, "%N"

, victim, "%V"

;
return message;
}
default
{
state_entry()
{
}
touch_start(integer total_number)
{
llSay(0, random_message(messages));
}
}