Giver Script


Here's a handy script that implements a giver for any of my AI bots - good for a host at a club!


// this script implements a new controller function      giveinv inventory-object-name
// an SRD that will give inventory looks like
//    giverstim|ctrl giveinv name
// when the stimulus giverstim is received, inventory "name" will be given to the speaker
// if coupled to the sensor, the sensed av will be the recipient
// for example code for the ai nc for a giver at a club might look like
//    sensornew|Hello there!  Welcome to Club X and here is a notecard and a landmark! goto %give1
//    give1|ctrl giveinv club-x-notecard goto %give2
//    give2|ctrl giveinv club-x-landmark
// the inventory to be given should be in the ai prim along with this script
      
default
{
    state_entry()
    {
    }
    link_message(integer l, integer n, string t, key id)
    {   if(n != -2000) return;
        if(llSubStringIndex(t,"giveinv ") == 0)
        {   llGiveInventory(id, llStringTrim(llGetSubString(t,7,-1),STRING_TRIM));
        }
    }
}











Comments

Popular posts from this blog

Play With The Bots Over At The West Mill Store!

Welcome to the AI Animesh Sexbot Party @ Sunset Forest!

TTS2 - New Text to Audio Speech System! Hear What You Type In Media Audio!