hey, im trying to make a script to check ages of people coming into my hangout, (rl ages not sl) but when i script LLaddtobanlist it doesnt, i can eject people but not add them to ban list, i was wondering if anyone could help as i also wanted to expand it to only ask people once,any sugestions?
the script goes as followed
string name;
string detectedName;
string dialogInfo = "\nWelcome to the little things hangout please answer the following questions and read the rules.
are you ages 18 or over in real life?";
key id;
integer dialogChannel;
integer listenHandle;
id = llDetectedKey(0);
name = llKey2Name(id);
llListenRemove(listenHandle);
listenHandle = llListen(dialogChannel, "", id, "");
llDialog(id, dialogInfo, buttons, dialogChannel);
llSetTimerEvent(180.0); // Here we set a time limit for responses
llListenRemove(listenHandle);
// stop timer since the menu was clicked
llSetTimerEvent(0);
if (message == "yes")
{
llSay(0, "Thank you please use the teleporter to explore the hangout.");
}
else if (message == "no")
{
llSay(0, "I'm sorry this hangout is for over 18 years old only, you will now be teleported home any issue with this please contact the hangout staff.");
llAddToLandBanList(id,0.0);
llEjectFromLand(id);
}
else
{
llSay(0, "I'm afraid we need to know the answer to this question to allow acess you will now be ejected feel free to return to answer this question again.");
llAddToLandBanList(id,0.1);
llEjectFromLand(id);
}
}
timer()
{
// stop timer
llSetTimerEvent(0);
llListenRemove(listenHandle);
llSay(0, "Sorry, we need a answer to this question we understand that you may have been afk at the time, unfortunatly you will be temp banned for one hour, any issue please contact [secondlife:///app/agent/47f37397-9596-41cb-8713-96c36ea2b685/about sophie]- with any issues. ");
llAddToLandBanList(id,0.1);
}
}
Question
sophy7777
hey, im trying to make a script to check ages of people coming into my hangout, (rl ages not sl) but when i script LLaddtobanlist it doesnt, i can eject people but not add them to ban list, i was wondering if anyone could help as i also wanted to expand it to only ask people once,any sugestions?
the script goes as followed
string name;
string detectedName;
string dialogInfo = "\nWelcome to the little things hangout please answer the following questions and read the rules.
are you ages 18 or over in real life?";
key id;
integer dialogChannel;
integer listenHandle;
list buttons = ["-", "yes", "no", "no comment"];
default
{
state_entry()
{
dialogChannel = -1 - (integer)("0x" + llGetSubString( (string)llGetKey(), -7, -1) );
}
collision_start(integer num_detected)
{
id = llDetectedKey(0);
name = llKey2Name(id);
llListenRemove(listenHandle);
listenHandle = llListen(dialogChannel, "", id, "");
llDialog(id, dialogInfo, buttons, dialogChannel);
llSetTimerEvent(180.0); // Here we set a time limit for responses
detectedName = llDetectedName(0);
dialogChannel = -1 - (integer)("0x" + llGetSubString( (string)llGetKey(), -7, -1) );
}
listen(integer channel, string name, key id, string message)
{
if (message == "-")
{
llDialog(id, dialogInfo, buttons, dialogChannel);
return;
}
llListenRemove(listenHandle);
// stop timer since the menu was clicked
llSetTimerEvent(0);
if (message == "yes")
{
llSay(0, "Thank you please use the teleporter to explore the hangout.");
}
else if (message == "no")
{
llSay(0, "I'm sorry this hangout is for over 18 years old only, you will now be teleported home any issue with this please contact the hangout staff.");
llAddToLandBanList(id,0.0);
llEjectFromLand(id);
}
else
{
llSay(0, "I'm afraid we need to know the answer to this question to allow acess you will now be ejected feel free to return to answer this question again.");
llAddToLandBanList(id,0.1);
llEjectFromLand(id);
}
}
timer()
{
// stop timer
llSetTimerEvent(0);
llListenRemove(listenHandle);
llSay(0, "Sorry, we need a answer to this question we understand that you may have been afk at the time, unfortunatly you will be temp banned for one hour, any issue please contact [secondlife:///app/agent/47f37397-9596-41cb-8713-96c36ea2b685/about sophie]- with any issues. ");
llAddToLandBanList(id,0.1);
}
}
Link to comment
Share on other sites
10 answers to this question
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now