Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

join a group

Erik Hugo
Registered User
Join date: 26 Feb 2007
Posts: 30
05-09-2007 07:55
Can someone help me with a script which can be placed into an object, which gives the user the option to enroll in an open group?

I've been looking around here and in the wiki, but wasn't able to find it :)
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
05-09-2007 07:58
That's because the option to do so does not exist :) Would be nice though.
_____________________
--AeonVox--

Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
05-09-2007 08:00
From: Erik Hugo
Can someone help me with a script which can be placed into an object, which gives the user the option to enroll in an open group?

I've been looking around here and in the wiki, but wasn't able to find it :)


It cant be done.
The best a script can do is display a dialog that when the user says yes IM's a member of that group to allow them to add them.
_____________________
I'm back......
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
05-09-2007 08:06
or, it could rack up a list of names who touched the device, and email those names to an officer of the group once a day or so.

That's how Go-Go Mini-Racing's "join our group" sign works.
_____________________

● Inworld Store: http://slurl.eclectic-randomness.com
● Website: http://www.eclectic-randomness.com
● Twitter: @WinterVentura
Erik Hugo
Registered User
Join date: 26 Feb 2007
Posts: 30
05-10-2007 04:34
Thanks for your reply's!

From: Winter Ventura
or, it could rack up a list of names who touched the device, and email those names to an officer of the group once a day or so.

That's how Go-Go Mini-Racing's "join our group" sign works.


This sounds good! Do you know how to do this, or do you have a link to a script which can do this?
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
05-10-2007 05:14
Something like this should do the basic's

CODE

// Script to Add To Group Via Email
// written in responce to post by Erik Hugo
//
// Constants
float TimePeriod = 86400.0; // Time between auto clearing of teh list in seconds (86400 = )1 day
integer MaxListLength = 50; // or when list reaches 50 avatars
string EmailAddress = "someone@somewhere.net"; // Where to email the data
string GroupName = "My Group";

// Variables
string AddToGroup= ""; // Records the names of the avatars being added
integer ListLength = 0; // Records how many


default
{
state_entry()
{
ListLength = 0;
AddToGroup= "";
llSetText("Touch me to be added to \n\"" + GroupName + "\"",<1.,1.,1.>,1.);
llSetTimerEvent(TimePeriod);
}

touch_start(integer number)
{
while(--number >= 0)
{
string name = llDetectedName(number);
integer index = llSubStringIndex(AddToGroup,name);
// is it in the list already?
if(index >= 0)
{
llSay(0,"Sorry " + name + ", but your add request is still pending.");
}
else
{
AddToGroup = (AddToGroup = "") + AddToGroup + name + "\n";
llSay(0,"Thank you " + name + ", your request has been noted.");
++ListLength;

if(ListLength >= MaxListLength)
{
llSetTimerEvent(0.);
state Email;
}
}
}
}

timer()
{
// Auto timer
llSetTimerEvent(0.);
state Email;
}
}
//
// Email State
//
state Email
{
state_entry()
{
llSetText("Updating System. Please wait.",<1.,0.,0.>,1.);
if(ListLength > 0) llEmail(EmailAddress,"Add to " + GroupName,AddToGroup);
state default;
}
}


it could obviously be improved / enhanced to add Owner controls for setting up the required data via a notecard.
_____________________
I'm back......
Erik Hugo
Registered User
Join date: 26 Feb 2007
Posts: 30
05-10-2007 05:42
Thanks!! Going to check it out right away!!!
Natalia Sawley
Registered User
Join date: 23 Mar 2007
Posts: 22
05-10-2007 07:07
Thank you, I was looking a long time!!! :p
_____________________
***Natalia Sawley***

*nat* Store - http://slurl.com/secondlife/Boracay%20Island/11/157/22
*SLBoutique - http://www.slboutique.com/index.php?p=buy&user_avatar_id=32761&nh=1
* SLExchange - http://www.slexchange.com/modules.php?name=Marketplace&MerchantID=49344
*nat* Store Blog
- http://natstore.blogspot.com/