Needs a menu script to work.
// This script keeps a list of messages. // The owner can play the messages back and erase them. // Retrieved from Free SL Scripts: http://www.gendersquare.org/sl // Global variables list message_list; integer listen_id = -1; // Lets us turn off listening when we need to string current_speaker_name = ""; // Who is currently recording a message readList() { integer i; integer count = llGetListLength( message_list ); llSay( 0, "You have " + (string) count + " messages:" ); for( i = 0; i, key= , " // Convert comma-separated-values into a list list msg_list = llCSV2List( message ); if( llList2String( msg_list, 0) == "Button Message" ) { string sender_name = llList2String( msg_list, 1); key user_key = llList2Key( msg_list, 2); string user_name = llList2String( msg_list, 3); if( sender_name == "leave_message_btn" ) { current_speaker_name = user_name; if( listen_id != -1 ) { llListenRemove( listen_id ); } listen_id = llListen( 0, user_name, "", "" ); llSay(0, "Leave a one-line message after the beep...BEEP!" ); } else if( sender_name == "play_messages_btn" ) { if( user_key == llGetOwner() ) { readList(); } } else if( sender_name == "erase_messages_btn" ) { if( user_key == llGetOwner() ) { resetList(); } } } } } >