Second Life hoy en un solo lugar Regalos y freebies actualizados cada hora 7 idiomas Gratis publicar tu tienda
12:49 SLT Publica tu evento+ Publicar
Problema en el grid
  • Programado: Scheduled Billing Maintenance, lun, 16 nov 09:30–10:30 SLT
  • Estado del grid: Unscheduled Group Chat Maintenance (investigating)
  • Ahora: Servicio sabático Unitarian Universalist en UUtopia
  • Ahora: The Dharma of Community: Sociedad budista y el householder
  • Ahora: Harvest Fest de SLCS: juegos, música y diversión
  • 14:00 SLT: NAD GOUGH en vivo en Moondance en Cascadia, 14:00 SLT
  • Noticias: REZZ MALL: marcas de Second Life en un centro comercial web
  • Viewer: Second Life Viewer 26.5 moderniza el chat
  • Programado: Scheduled Billing Maintenance, lun, 16 nov 09:30–10:30 SLT
  • Estado del grid: Unscheduled Group Chat Maintenance (investigating)
  • Ahora: Servicio sabático Unitarian Universalist en UUtopia
  • Ahora: The Dharma of Community: Sociedad budista y el householder
  • Ahora: Harvest Fest de SLCS: juegos, música y diversión
  • 14:00 SLT: NAD GOUGH en vivo en Moondance en Cascadia, 14:00 SLT
  • Noticias: REZZ MALL: marcas de Second Life en un centro comercial web
  • Viewer: Second Life Viewer 26.5 moderniza el chat
Script LSL

Script LSL de bienvenida: mensaje para visitantes

Script LSL gratuito de bienvenida para tiendas y clubes de Second Life: un mensaje privado al día para cada visitante que llega, sin spam en el chat local.

59 líneas ·

Saluda a cada visitante sin estar conectado. Este script de bienvenida detecta a los avatares que se acercan y envía a cada uno un mensaje de bienvenida privado, una vez al día. Solo lo ve el visitante, así que el chat local se mantiene en silencio, y el dueño nunca recibe el saludo.

lsl-greeter-script.lsl · 59 líneas Comprobar este script
// Visitor Greeter - free LSL script from WhatSL (https://whatsl.com/scripts/lsl-greeter-script)
// Free to use, change and put in your own creations, also ones you sell.
//
// Sends a private welcome message to each visitor who comes near, once a day.
// Only the visitor sees it, so it does not spam local chat. The owner is never greeted.

string  WELCOME_TEXT  = "Welcome, %name%! Have a look around and grab the free gift at the entrance.";
float   RANGE_METRES  = 20.0;  // how close a visitor must come (up to 96.0)
float   SCAN_SECONDS  = 10.0;  // how often to look for new visitors
integer MAX_REMEMBER  = 300;   // visitors remembered per day

list    gSeen = [];
integer gDay;

string fillName(string s, string name)
{
    integer i = llSubStringIndex(s, "%name%");
    if (i == -1) return s;
    return llInsertString(llDeleteSubString(s, i, i + 5), i, name);
}

default
{
    state_entry()
    {
        gDay = llGetUnixTime() / 86400;
        llSensorRepeat("", NULL_KEY, AGENT, RANGE_METRES, PI, SCAN_SECONDS);
    }

    on_rez(integer param)
    {
        llResetScript();
    }

    sensor(integer total)
    {
        integer today = llGetUnixTime() / 86400;
        if (today != gDay)
        {
            gDay = today;
            gSeen = [];
        }
        key owner = llGetOwner();
        integer i;
        for (i = 0; i < total; ++i)
        {
            key av = llDetectedKey(i);
            if (av != owner)
            {
                if (llListFindList(gSeen, [av]) == -1)
                {
                    llRegionSayTo(av, 0, fillName(WELCOME_TEXT, llGetDisplayName(av)));
                    gSeen += [av];
                    if (llGetListLength(gSeen) > MAX_REMEMBER) gSeen = llDeleteSubList(gSeen, 0, 0);
                }
            }
        }
    }
}

Libre para usar, cambiar e incluir en tus creaciones, también en las que vendes.

Cómo configurarlo

  1. Coloca el script en un objeto pequeño cerca de tu punto de llegada, como un cartel o un prim invisible.
  2. Escribe tu mensaje en WELCOME_TEXT. %name% se convierte en el nombre a mostrar del visitante.
  3. Guarda. Aléjate, vuelve con otro avatar o pídele a un amigo que lo pruebe.

Ajustes

  • WELCOME_TEXT: el mensaje de bienvenida. Menciona qué hay de nuevo, dónde está el regalo o tu grupo.
  • RANGE_METRES: qué tan cerca debe llegar un visitante, hasta 96 metros.
  • SCAN_SECONDS: cada cuánto busca el saludador nuevos visitantes. 10 segundos es un buen equilibrio.
  • MAX_REMEMBER: cuántos visitantes recuerda por día antes de empezar a olvidar a los más antiguos.

Consejos

  • Mantén el mensaje corto y amable; una o dos frases.
  • Coloca un solo saludador cerca del punto de llegada en lugar de varios alrededor de la tienda, para que los visitantes reciban un único mensaje.

Preguntas frecuentes

¿Los visitantes reciben el mensaje cada vez que vienen?

No. Cada visitante recibe el saludo una vez al día (según la fecha UTC del servidor).

¿El saludador guarda quién ha visitado?

Solo mantiene en memoria las claves de los visitantes de hoy para no saludar dos veces, y las olvida al día siguiente o cuando el script se reinicia.

¿El saludador causa lag?

Un sensor cada 10 segundos es ligero. Evita escanear cada segundo o usar muchos saludadores en una misma región.

Comprueba tu propio script: Comprobador de sintaxis LSL →

Más scriptsTodos los scripts
Script LSL · 55 líneas

Script de puerta en LSL: se abre al tocar y se cierra sola

Script de puerta gratuito en LSL para Second Life. Tócala para abrirla y cerrarla; la puerta gira sobre sus bisagras y se cierra sola tras unos segundos. Sonidos opcionales.

Script LSL · 69 líneas

LSL sit and pose script for chairs and pose balls

Free LSL sit script for Second Life chairs, benches and pose balls: sit and play your own animation, set the sit position, hide the ball while in use.

Script LSL · 96 líneas

LSL tip jar script with thank-you message and total

Free LSL tip jar script for Second Life clubs, DJs, hosts and stores: quick pay buttons, a thank-you message, the total and last tipper in floating text.