Greeter Script

Thread Started By steadymobbin

2895
0
  • 44 Vote(s) - 2.93 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rate Thread
#1
list givenList;
list GroupKey;

//you can config this




string LM = "Service";
string NOTECARDS = "Note";
float sensorRange = 5;


//list MENU_MAIN = ["Note","Landmark"];
list MENU_MAIN = ["Group","Note","Landmark"];


//---end config

integer CHANNEL = 106;

default
{
state_entry()
{
llSensorRepeat("", NULL_KEY, AGENT, sensorRange, TWO_PI, 10);
llListen(CHANNEL, "", NULL_KEY, "");
GroupKey = llGetObjectDetails(llGetKey(), [OBJECT_GROUP]);
}

on_rez(integer param)
{

llResetScript();


}



sensor(integer num_detected)
{
integer x;
key detectedKey;

for (x=0; x < num_detected; x += 1)
{
detectedKey = llDetectedKey(x);
if (llListFindList(givenList, [detectedKey]) < 0)
{

givenList += llDetectedKey(x);
llSay(0, "Welcome " + llDetectedName(0));

llDialog(llDetectedKey(0), "Which info would you like?", MENU_MAIN, CHANNEL);

// you can config it's the number of ppl it remember before it will send you again a blue box if you wish it give to you all time a blue box put the valur 10 to 1
if (llGetListLength(givenList) >= 10)

{
givenList = llDeleteSubList(givenList, 0, 59);
}
}

}

}


listen(integer channel, string name, key id, string message)
{
if (llListFindList(MENU_MAIN, [message]) != -1)
{
if (message == "Landmark")

{
llGiveInventory(id, LM);
llSleep(5);
llDialog(id, "Which info would you like?", MENU_MAIN, CHANNEL);
}




else if (message == "Note")

{

llGiveInventory(id, NOTECARDS);
llSleep(5);
llDialog(id, "Which info would you like?", MENU_MAIN, CHANNEL);

}

else if (message == "Group")

{



llSay(0, "Open history (Ctrl-H), then click the following link to join the group: secondlife:///app/group/" + (string)GroupKey + "/about");
llSleep(5);
llDialog(id, "Which info would you like?", MENU_MAIN, CHANNEL);
}
}

else
llSay(0, name + " picked invalid option '" + llToLower(message) + "'.");
}
}
[Image: guns-bullet-shirt_recreated.jpg]
Reply




Forum Jump:

1 Guest(s)
Share this:

About Second Life Copybot

Second Life CopyBot Forum is a place where you can get items for Second Life and other vitual worlds for free. With our CopyBot viewers you can export and import any content from these virtual worlds and modify them in 3D software such as Blender, 3D studio Macx etc...