// Float text server // Put this in a prim and put a notecard in the prim. The first line of // the notecard will be sent out to all registered clients whenever it // changes. You'll need to rez this and get its key to put into the // client script before you put out the client objects. // Ordinal Malaprop // 2006-10-23 string gText = ""; list gClients = []; string PASSWORD = "sdkahsdsd"; get_text() { llGetNotecardLine(llGetInventoryName(INVENTORY_NOTECARD, 0), 0); } send_update(string address) { llEmail(address, PASSWORD, gText); } update_all() { if (gClients == []) { llOwnerSay("No clients registered, not updating"); return; } integer clients = llGetListLength(gClients); integer f = 0; do { llOwnerSay("Updating client " + (string)(f + 1) + " of " + (string)clients + "..."); send_update(llList2String(gClients, f) + "@lsl.secondlife.com"); } while (++f < clients); llOwnerSay("Done."); } default { state_entry() { llSetTimerEvent(300.0); get_text(); } dataserver(key queryid, string data) { if (data != gText) { gText = data; update_all(); } } changed(integer change) { if (change & CHANGED_INVENTORY) { get_text(); } } timer() { llGetNextEmail("", PASSWORD); } email(string time, string address, string subj, string message, integer num_left) { string sender = llGetSubString(address, 0, 35); gClients += sender; if (num_left > 0) llGetNextEmail("", PASSWORD); } }