The AI NPC Memory System LSL Script v2.0 is a powerful and intelligent avatar interaction system designed for creators, landowners, store managers, and roleplay developers inside Second Life who want to add a realistic, responsive, and memory-based non-player character to their environments. This advanced script transforms any object into a smart NPC that automatically detects nearby avatars, greets visitors, remembers previous interactions, and adapts its responses based on personality settings and relationship history. Instead of the usual static greeter objects that repeat the same line over and over, this system creates a dynamic experience where the NPC recognizes returning visitors and treats them differently from first-time guests. The script continuously scans the surrounding area for avatars within a configurable detection range and triggers greetings only when someone enters the area, preventing chat spam and maintaining a natural interaction flow. When a new avatar enters the NPC’s range for the first time, the system automatically generates a friendly introduction greeting that includes the avatar’s name, creating an immediate sense of immersion. Once the avatar has been stored in memory, the system begins tracking interaction history, visit counts, friendship level, and timestamps of previous encounters. Returning avatars are recognized instantly, and instead of hearing the same welcome line every time, they receive one of many personalized “welcome back” messages selected from a built-in greeting library, making the NPC feel more alive and responsive. The script also contains a structured internal memory database that stores each avatar’s UUID, name, last seen time, interaction count, friendship level, conversation history, and greeting records, allowing the NPC to build long-term relationships with visitors. Over time, frequent visitors naturally accumulate higher friendship levels, which makes the system ideal for social spaces where regular guests return often. Another major feature of this system is the built-in personality engine, which allows the owner to change how the NPC behaves. The script includes three different personality modes: Friendly, Neutral, and Sarcastic. Friendly mode produces warm and enthusiastic greetings designed for welcoming social venues such as clubs, communities, and public hangouts. Neutral mode provides simple professional greetings perfect for stores, information desks, or business environments. Sarcastic mode introduces a playful tone with dry humor, making the NPC ideal for themed environments, entertainment venues, or roleplay characters. Switching between personalities is extremely easy through the owner control menu. By simply touching the object, the owner can open an interactive dialog panel that allows instant switching between personality types, viewing stored memory records, or resetting the memory database entirely. The memory viewer tool allows the owner to review stored avatar information directly in local chat, including avatar names, unique IDs, last visit timestamps, conversation counts, and relationship levels, which can be useful for tracking returning customers, roleplay participants, or community members. The system is also carefully optimized for performance and reliability within the scripting limitations of Second Life. The scanning system runs on a controlled sensor interval, ensuring low script lag while still maintaining responsive detection of nearby avatars. Greeting logic is designed to avoid repetitive spam by limiting greetings to one message per avatar per day, meaning returning visitors will be recognized but not repeatedly greeted every few seconds. The script also includes automatic history trimming to prevent excessive memory usage, ensuring long-term stability even in busy locations with frequent visitor traffic. Because the system uses an efficient stride-based data structure for memory storage, it maintains good performance while managing many avatar records simultaneously. Another advantage of this product is that it is sold with full permissions, making it extremely valuable for creators and developers who want to integrate intelligent NPC behavior into their own products. Builders can include the script inside NPC characters, greeter bots, robots, customer assistants, security guards, store clerks, reception desks, or interactive exhibits. Roleplay regions can use the system to create characters that remember players and respond differently each time they visit, greatly improving immersion and storytelling potential. Store owners can deploy the NPC as a customer greeter that recognizes returning shoppers and welcomes them back, helping create a memorable shopping experience. Club owners and event venues can use the NPC to greet guests at entrances and build familiarity with regular visitors.
- • Smart avatar recognition and automatic greetings
- • Memory system that tracks visitors and interaction history
- • Three personality modes: Friendly, Neutral, Sarcastic
- • Owner control menu with memory viewer and reset option
- • Fully open-source Full Permission LSL script








