This might get you started.
I needed a break from my regular work so I quickly wrote this. I have not tested in-world, but it will compile and it *looks* like it will work

What this does (is supposed to do) is sense people around and then asks somone if they want to sign the guest book. The script uses llDialog to ask the first person it senses.
If the sensed person answers Yes, then they are invited to sign the guest book by saying a message on a configured channel. The script tells the user what channel it uses and gives an example of how to say the message.
Once the user says the message, the script emails the person's name and message to a configured address.
The script, by default, listens for 30 seconds and scans for people every 10 seconds.
It sould not ask someone again if they just signed the guest book, but it rembers only the last person who signed - so if the person who signed first is still in the area after another person signs, then the first person will be asked again. Easy enough to change.
You can configure:
* the channel the script uses
* How long the script listens for a message
* The sensor's range (in meters)
* Seconds between each sensor sweep
Note: The sensor scans in a circle, with the object the script is in at the center of the circle.
This script can contribute to lag due to the sensor - changing it to respond to a touch event is simple and is left as an excercise for you

// Configured values:
integer listenChannel=222;
float listenTimeout=30.0;
float scanRange=10.0;
float scanDelay=10.0;
string ownerAddress="someone@example.com";
string guestBookSubject="Guest Book Message From";
// Cross this line at your own risk
integer listenHandle=0;
key personWhoJustSigned=NULL_KEY;
setListen(integer onOff)
{
if(listenHandle)
{
llListenRemove(listenHandle);
listenHandle=0;
}
if(onOff)
listenHandle=llListen(listenChannel,"",NULL_KEY,"");
}
default
{
state_entry()
{
llSensorRepeat("",NULL_KEY,AGENT,scanRange,PI,scanDelay);
llSetTimerEvent(listenTimeout);
}
sensor(integer numDetected)
{
if(numDetected>1)
{
llSay(0,"Cannot deal with more than one person at a time. I am picking the first person I detected.");
}
if(llDetectedKey(0)==personWhoJustSigned)
return;
setListen(TRUE);
llDialog(llDetectedKey(0),"Would you like to sign the Guest Book?",["Yes","No"],listenChannel);
}
timer()
{
setListen(FALSE);
}
listen(integer channel,string name, key id,string message)
{
if(message=="Yes")
{
llSay(0,"Say / " + (string)listenChannel + " <your message>...");
llSay(0,"Replace <your message> with a message you want to appear in the Guest Book");
return;
}
else if(message=="No")
{
setListen(FALSE);
return;
}
personWhoJustSigned=id;
string guestName=llKey2Name(id);
llSay(0,"Thank you! " + llKey2Name(llGetOwner()) + " is glad that you took time to sign the guest book!");
llEmail(ownerAddress,guestBookSubject + ":" + guestName,message);
guestName="";
}
}
-2fast