JVA Auto Group Inviter
Revision as of 15:14, 24 January 2015 by ObviousAltIsObvious Resident (talk | contribs) (<lsl> tag to <source>)
A Simple Auto Group Inviting Script for users who own the JVA Bot
//////////////////////////////////////////////////////////////////////////////////////////////
// //
// JVA Bot Auto Group Invite System //
// by Holger Gilruth //
// Copyright (c) 2008 by Holger Gilruth //
// All Rights Reserved //
// //
// Permission to Use and Redistribute //
// //
// Permission to use and redistribute the code, with or //
// without modifications, is granted under the following conditions: //
// //
// + All redistributions must include this copyright notice and license. //
// + All redistributions must allow the next user to view, modify, and //
// redistribute this code, containing this copyright notice and license. //
// + All redistributions must give credit to the author, by SL name (Holger Gilruth). //
// If distributed in a modified form, credit must still be given to Holger Gilruth //
// as the original author. //
// //
//////////////////////////////////////////////////////////////////////////////////////////////
// Your custom Security Key, get this from the advanced preferences page
string securitykey = "";
// Your BOT Avatar's UUID key, get this from the advanced preferences page
key bot = "";
// Next edit only group on end of script
sendtobot(string message)
{
llInstantMessage(bot,message+"^"+llMD5String("Copyright Jonash Vanalten jva-products.com "+message+securitykey,0));
}
list recent_avatars;
add_avatar(string name) {
if(!seen(name)) {
recent_avatars += name;
if (llGetListLength(recent_avatars) > 25) {
recent_avatars = llDeleteSubList(recent_avatars,0,0);
}
}
}
integer seen(string name) {
if(llListFindList(recent_avatars,[name]) > -1) { return TRUE; }
return FALSE;
}
default
{
state_entry() {
llSensorRepeat("", NULL_KEY, AGENT, 20, PI, 5);
}
sensor(integer total_number) {
if(!seen(llDetectedName(0))) {
// EDIT HERE YOUR GROUP NAME CASE SENSITIVE
sendtobot("JOINSPECIFICGROUP:"+(string)llDetectedKey(0)+"|"+"YOUR GROUP NAME"+"|"+"Everyone");
add_avatar(llDetectedName(0));
}
}
}