The AI NPC Memory System LSL Script is an advanced interactive non-player character system designed for creators, landowners, and business operators in Second Life who want their environments to feel alive, intelligent, and responsive. This script transforms any object into a smart AI-powered NPC that detects nearby avatars, greets them automatically, remembers past interactions, tracks visitor behavior, and responds differently depending on its personality mode. Instead of a simple greeting script that repeats the same message over and over, this system introduces a true memory-based interaction model. When a new visitor enters the area, the NPC recognizes them as a first-time guest and delivers a welcoming message tailored to its personality. When the same avatar returns later, the NPC recognizes them and greets them as a returning visitor, creating the illusion of a persistent intelligent character that actually remembers people. This kind of interaction dramatically increases immersion and engagement in social spaces, roleplay environments, stores, clubs, and public areas. The script continuously scans for avatars within a configurable radius and automatically manages visitor detection using an efficient sensor system that minimizes lag while maintaining reliable performance. Each detected avatar is stored in the NPC’s internal memory database, which records their unique UUID, avatar name, last seen timestamp, number of interactions, friendship level, greeting history, and the last time they were greeted. Over time the NPC develops a relationship score with visitors, allowing the system to simulate growing familiarity between the NPC and the people who interact with it. This creates a dynamic environment where returning visitors feel recognized instead of ignored by static objects. The script includes three built-in personality modes that allow the NPC’s behavior to change depending on the desired atmosphere of the location. Friendly mode makes the NPC warm, welcoming, and socially engaging, ideal for clubs, communities, and social hubs where new visitors should feel comfortable immediately. Neutral mode provides a balanced, professional tone suitable for help desks, information kiosks, and customer support NPCs. Sarcastic mode adds humor and attitude, perfect for roleplay characters, comedy NPCs, or themed environments where the character’s personality adds entertainment value. Switching personalities is simple using the owner control menu, meaning the same NPC can easily adapt to different scenarios or events without editing the script. The owner control panel also provides powerful administrative tools that allow the object owner to review stored visitor memory and reset the database whenever needed. With a single touch, the owner can access a dialog menu showing the current personality mode, the number of known avatars in memory, and options to display stored visitor information or clear the entire memory system. When the memory summary is displayed, the script prints detailed records of each visitor directly to owner chat, including their name, UUID, conversation count, friendship level, and last time they were seen by the NPC. This makes the system useful not only as an interactive character but also as a lightweight visitor analytics tool for monitoring engagement in busy locations. To prevent spam and maintain natural interaction flow, the script includes a greeting cooldown system that ensures avatars are not repeatedly greeted if they remain nearby. Once a greeting occurs, the NPC waits a configurable amount of time before greeting that avatar again, which prevents chat flooding while still recognizing visitors who return later. The script is optimized for efficiency and reliability, using a structured list-based memory database that stores avatar records in a compact format while remaining easy to expand for advanced customization. Because the system relies on the built-in LSL sensor functions, it operates smoothly in most environments and does not require external servers or complex configuration. Installation is extremely simple: just drop the script into any object and the NPC becomes active immediately. Creators can place it inside robots, holograms, information terminals, statues, reception desks, or fully designed character avatars to create a believable AI presence anywhere on their land. This flexibility makes it a powerful building block for immersive world design. Store owners can use it as an intelligent shop assistant that greets customers when they walk in. Club owners can create a digital host that welcomes guests and recognizes returning regulars. Roleplay regions can deploy NPC guards, bartenders, or town characters who remember players. Event venues can use it to create greeters that interact with attendees as they arrive.
- • Smart avatar detection and automatic greeting system
- • Persistent memory database that remembers visitors and tracks interactions
- • Three personality modes (Friendly, Neutral, Sarcastic)
- • Owner control menu to view or reset visitor memory
- • Returning visitor recognition with dynamic greetings






