Could sure use some help, brain imploding, ok ,ok, got to have a brain first , I know.. lol.
I once cut & pasted the newbie greeter script , eliminated the newbie part and had a working greeter that wouldn't give a landmark to the same person (till after 24 others got one
) . Unfortunately, when I redid my yard I deleted it
. Now, I find myself braindead not able to repeat what I once did lol, anyway here's what I got and some of the llowner say's are there just to see if the script was running to that part and not neccesary;string landmark_name = "";
// how long to wait for the dataserver before giving up
integer DATASERVER_TIMEOUT = 30;
// length of FIFO list of people to remember you already gave to.
integer NAG_LIST_LENGTH = 25;
// channel to communicate to other same objects to let them know you already gave.
integer MULTI_CONTROL_CHANNEL = 861562;
key gDataserveKey = NULL_KEY;
integer gLastCollisionTime = 0;
string gDetectedName;
string gDetectedKey;
list recentlyNagged;
// Add someone to our short-term do-not-nag list
addRecentlyNagged(string name){
if(!wasRecentlyNagged(name)){
recentlyNagged+=name;
if(llGetListLength(recentlyNagged) > NAG_LIST_LENGTH){
recentlyNagged = llDeleteSubList(recentlyNagged,0,0);
}
}
}
// Check if someone is already on our do-not-nag list
integer wasRecentlyNagged(string name){
if(llListFindList(recentlyNagged,[name]) > -1){
return TRUE;
}
return FALSE;
}
default{
state_entry(){
gDataserveKey = NULL_KEY;
gLastCollisionTime = 0;
llListen(MULTI_CONTROL_CHANNEL,llGetObjectName(),"",""
;llOwnerSay ("hello"
;}
listen(integer ch, string name, key id, string msg)
{
llOwnerSay ("hello"
;addRecentlyNagged(msg);
}
collision_start(integer cnt){
integer i;
for(i=0;i<cnt;i++){
string name = llDetectedName(i);
if(!wasRecentlyNagged(name)){
// check if already making a request, or if the request has timed out
if(gDataserveKey == NULL_KEY || (gLastCollisionTime + DATASERVER_TIMEOUT < llGetTime())){
gDetectedName = name;
gDetectedKey = llDetectedKey(0);
addRecentlyNagged(name);
llSay(MULTI_CONTROL_CHANNEL,gDetectedName); // pass the message on not to nag
llOwnerSay ("hello"
;}
}
}
}
dataserver(key req, string data){
if(req == gDataserveKey){
{
llGiveInventory(gDetectedKey,landmark_name);
}
}
gDataserveKey = NULL_KEY; // clear so a new request can be made
}
}

