Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Sounds Easy, But I am lazy...

Frank Beckett
Junior Member
Join date: 26 Jun 2004
Posts: 3
07-20-2004 19:06
I would like a quick and dirty script that will give away an inventory/content Item from a box based on voice command. For Example "Give me a Beer". Beer being the content item in the box. I am filling the box with drinks and want people to be able to request their own drink (auto bartender).

Thanks in advance for everyone's help!

Frank
Jade Bard
Registered User
Join date: 7 Jul 2004
Posts: 106
07-20-2004 21:06
pretty simple

just make a list of all of the drinks

list drinks ["i'm lazy", "bored", "I love jade"];

Then in

default
{
state_entry()
{
llListen( 0, "", NULL_KEY, "" );
}
listen(blah, blah, blah, blah)
//just do a for loop searching the list for the string.
//give the inventory item if found
//else maybe IM them the list of drinks

I don't care to do actual code, since i'm too lazy my self.
Ama Omega
Lost Wanderer
Join date: 11 Dec 2002
Posts: 1,770
07-20-2004 21:52
CODE
default
{
state_entry()
{
listen(0,"","","");
}

listen(integer chan, string name, key id, string mes)
{
llGiveInventory(id, llGetInventoryKey(llGetSubString(mes,10,-1);
}
}
That might work.
_____________________
--
010000010110110101100001001000000100111101101101011001010110011101100001
--