Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Looking For a Subscriber Script: Please help ASAP =(

Isabella Moran
Registered User
Join date: 29 Jun 2006
Posts: 6
02-06-2009 22:30
Okay, So i am starting to stress out! I can not find this script anywhere, i have tried to make it but it is no use, so if somebody could help me that would rock!


What i need:
I am looking for a subscription script, I have two prims one that is "Subscribe" and one that is 'UnSubscribe" When they click the "Subscribe" Prim i want to receive an email with there username so i can add it to a notecard, If they click unsubscribe i want it to be basically the same thing, where it sends me a message with there username telling me the unsubscribe.

If somebody could help me out, that would rock.

P.S. It would also be pretty cool if they would be able to send me all the names at once in one big email, but i know that is probably impossible =(


Pleaseee help!
Very Keynes
LSL is a Virus
Join date: 6 May 2006
Posts: 484
02-06-2009 23:57
This should do what you want, or get you well on your way to creating it.
I have not tested it in world, but am reasonably confident it will work :)

rather than 2 prims, it uses one prim and a menu, you could change that.
It will keep a list of subscribers and email you every Hour with any new subscriptions or unsubscriptions, if any are pending.

CODE

//Very Keynes - 2006 - 2009

string my_email = "address@my.domain";

list subscribed;
list pending_add;
list pending_del;

integer DlgCh = -57669786134;

default
{
state_entry()
{
llSetTimerEvent(60.0);
}

touch_start(integer total_number)
{
llListen(DlgCh, "", "", "");
llDialog(llDetectedKey(0), "Welcome to the Subscription Service", ["Subscrbe", "Unsubscribe"], DlgCh);
}

listen(integer channel, string name, key id, string message)
{
integer x = llListFindList(subscribed, [name]);
if("Subscrbe" == message)
{
if(~x)
{
llInstantMessage(id, "You are Currently Subscribed");
}
else
{
pending_add += name;
subscribed += name;
llInstantMessage(id, "Thnak you, you have been added to the Subscription list");
}
}
if("Unsubscribe" == message)
{
if(~x)
{
pending_del += name;
subscribed = llDeleteSubList(subscribed, x, x + 1);
llInstantMessage(id, "You have been removed from the Subscription list");
}
else
{
llInstantMessage(id, "You are Not Currently Subscribed");
}
}
}

timer()
{
string current = llGetTimestamp();
if((integer)llGetSubString(current, 14, 15) == 0)
{
if(llGetListLength(pending_add) || llGetListLength(pending_del))
{
llEmail(my_email, "Subscriptions Pending",
"Subscribe\n"+llList2CSV(pending_add)+"\nUnsubscribe\n"+llList2CSV(pending_del));
pending_add = pending_del = [];
}
}
}
}

Isabella Moran
Registered User
Join date: 29 Jun 2006
Posts: 6
thanks!
02-07-2009 00:41
thanks so much! ^^ life saverrrr