string groupuuid="4730561d-45e9-4c11-279a-1064d6050c4c";
string sound="d8d8e238-ac17-130b-33f1-01fa4186b4f5";
integer tcount;
key av;
string AV;
default
{
state_entry()
{
tcount=0;
}
touch_start(integer total_number)
{
llPreloadSound(sound);
av = llDetectedKey(0);
AV = llKey2Name(llDetectedKey(0));
if (av==llGetOwner())llOwnerSay("Used: "+(string)tcount+" times till now.");
else tcount++;
if (llSameGroup(av))
{
string cmonth = llGetSubString(llGetDate(),5,6);
string cday = llGetSubString(llGetDate(),8,9);
integer iday = (integer)cday;
if (cmonth!="12") llRegionSayTo(av, 0, AV+", too early my impatient friend...but nice try!");
else if (iday > 24) llRegionSayTo(av, 0, AV+", bad news...you missed Christmas :-(");
else
{
llTriggerSound(sound,1.0);
llGiveInventory(av,llGetInventoryName(INVENTORY_OBJECT,iday-1));
llRegionSayTo(av, 0, "\n♥ Yeah "+AV+", here comes your gift for today "+llGetDate()+".");
}
}
else
{
llRegionSayTo(av, 0, "\nSorry "+AV+", wrong group! Try again with the correct group activated!\nClick the link to join our group: "+ "secondlife:///app/group/" + groupuuid + "/about\n");
llDialog(av,"\n♥ Yeah "+AV+", please be so kind to join our group to use me:\n\n secondlife:///app/group/" + groupuuid + "/about\n",["↑"],2);
}
}
}