Jump to content
  • 0
Sign in to follow this  
Jada Tammas

How can I set a gift for one group?

Question

  • 0

if it's for a group you could also sending it in a groups notice...

If you want it in a object at your land, you need a script.

Share this post


Link to post
Share on other sites

9 answers to this question

Recommended Posts

  • 0

if it's for a group you could also sending it in a groups notice...

If you want it in a object at your land, you need a script.

Share this post


Link to post
Share on other sites
  • 0

I used this sctipt on my land.

// Group gift / join script released into public domain by Qie Niangao, 2009.key GROUP_KEY = "GROUP_KEY";// Get the GROUP_KEY from its web page, found with// Search / All or from// http://search.secondlife.com/web/search/groups/?q="Group Name"// At the bottom of the group's web page is its URL,// the end of the URL is the group's key.string GIVING_MSG = "Thanks for your interest, and please enjoy your gift!";string JOIN_MSG = "You need to be a member of the group to get the gift.  If you're not a member, type Control-H to get the chat history, and click on the following blue-highlighted text, then Join.  ";string NOT_ACTIVE_MSG = "Or perhaps you're already a member and just don't have this group active at the moment; if so, click on the following text, choose the group from the list, and Activate.  ";string FOLDER_NAME = "Gift from Group Name";// ____________________________________________// END OF STUFF MOST USERS WOULD WANT TO CHANGE// --------------------------------------------string GROUP_URI = "secondlife:///app/group/";list giftContents;default{    state_entry()    {        // In lieu of other specs, we'll just give everything in the object's inventory except this script        // in a new folder named FOLDER_NAME.        integer invIdx = llGetInventoryNumber(INVENTORY_ALL) - 1;        string scriptName = llGetScriptName();        for (; invIdx >= 0; invIdx--)        {            string invItemName = llGetInventoryName(INVENTORY_ALL, invIdx);            if (invItemName != scriptName)                giftContents += invItemName;        }        if ([] == giftContents)            state no_contents;        else            llWhisper(0, "Will give folder named \"" + FOLDER_NAME + "\" containing these items: "                + llDumpList2String(giftContents, ", "));    }    changed(integer change)    {        if (CHANGED_INVENTORY & change)            llResetScript();    }    touch_start(integer total_number)    {        key toucher = llDetectedKey(0);        if (llSameGroup(toucher))        {            llInstantMessage(toucher, GIVING_MSG);            llGiveInventoryList(toucher, FOLDER_NAME, giftContents);            return;        }        llInstantMessage(toucher, JOIN_MSG + GROUP_URI + (string)GROUP_KEY + "/about\n"            + NOT_ACTIVE_MSG + GROUP_URI + "list/show");    }}state no_contents{    state_entry()    {        llWhisper(DEBUG_CHANNEL, "Nothing to give; please add one or more gift items.");    }    changed(integer change)    {        if (CHANGED_INVENTORY & change)            llResetScript();    }}

Share this post


Link to post
Share on other sites
  • 0
On 20/08/2016 at 9:25 PM, Jules1979 said:

I used this sctipt on my land.


// Group gift / join script released into public domain by Qie Niangao, 2009.key GROUP_KEY = "GROUP_KEY";// Get the GROUP_KEY from its web page, found with// Search / All or from// http://search.secondlife.com/web/search/groups/?q="Group Name"// At the bottom of the group's web page is its URL,// the end of the URL is the group's key.string GIVING_MSG = "Thanks for your interest, and please enjoy your gift!";string JOIN_MSG = "You need to be a member of the group to get the gift.  If you're not a member, type Control-H to get the chat history, and click on the following blue-highlighted text, then Join.  ";string NOT_ACTIVE_MSG = "Or perhaps you're already a member and just don't have this group active at the moment; if so, click on the following text, choose the group from the list, and Activate.  ";string FOLDER_NAME = "Gift from Group Name";// ____________________________________________// END OF STUFF MOST USERS WOULD WANT TO CHANGE// --------------------------------------------string GROUP_URI = "secondlife:///app/group/";list giftContents;default{    state_entry()    {        // In lieu of other specs, we'll just give everything in the object's inventory except this script        // in a new folder named FOLDER_NAME.        integer invIdx = llGetInventoryNumber(INVENTORY_ALL) - 1;        string scriptName = llGetScriptName();        for (; invIdx >= 0; invIdx--)        {            string invItemName = llGetInventoryName(INVENTORY_ALL, invIdx);            if (invItemName != scriptName)                giftContents += invItemName;        }        if ([] == giftContents)            state no_contents;        else            llWhisper(0, "Will give folder named \"" + FOLDER_NAME + "\" containing these items: "                + llDumpList2String(giftContents, ", "));    }    changed(integer change)    {        if (CHANGED_INVENTORY & change)            llResetScript();    }    touch_start(integer total_number)    {        key toucher = llDetectedKey(0);        if (llSameGroup(toucher))        {            llInstantMessage(toucher, GIVING_MSG);            llGiveInventoryList(toucher, FOLDER_NAME, giftContents);            return;        }        llInstantMessage(toucher, JOIN_MSG + GROUP_URI + (string)GROUP_KEY + "/about\n"            + NOT_ACTIVE_MSG + GROUP_URI + "list/show");    }}state no_contents{    state_entry()    {        llWhisper(DEBUG_CHANNEL, "Nothing to give; please add one or more gift items.");    }    changed(integer change)    {        if (CHANGED_INVENTORY & change)            llResetScript();    }}

Hi, I'm trying to make group gifts with no luck, I found this post but the text for this script pastes as one line when I put it into a SL new script! , is there anyway I can get this script set out for SL scripts,  thanks :) 

Share this post


Link to post
Share on other sites
  • 0
43 minutes ago, PixiPretty said:

Hi, I'm trying to make group gifts with no luck, I found this post but the text for this script pastes as one line when I put it into a SL new script! , is there anyway I can get this script set out for SL scripts,  thanks :) 

Likely you can find that script through Google search in a more usable form. 

 

Note that if you are renting or using group land not of the group that you want the gift to go to you may  have issues. You gift vendor then needs to be set to the LAND group in order to stay on the land :D and you need to set the vendor to another group.  So with some land settings that will not work. I am guessing that there might be SOME gift vendors on the marketplace that would fix this issue. 

 

Share this post


Link to post
Share on other sites
  • 0
On 8/4/2018 at 9:39 AM, PixiPretty said:

Hi, I'm trying to make group gifts with no luck, I found this post but the text for this script pastes as one line when I put it into a SL new script! , is there anyway I can get this script set out for SL scripts,  thanks :) 

IM me, I will send you several free ones that do that.

Share this post


Link to post
Share on other sites
  • 0
On 04/08/2018 at 9:39 AM, PixiPretty said:

Hi, I'm trying to make group gifts with no luck, I found this post but the text for this script pastes as one line when I put it into a SL new script! , is there anyway I can get this script set out for SL scripts,  thanks :) 

Yipes. I guess the migration to new Forums software wiped out code formatting in posts. For completeness, I'll just dump here the script I found in my Inventory that appears to be what the post was about originally:

// Group gift / join script released into public domain by Qie Niangao, 2009.

key GROUP_KEY = "ba66f4d4-1473-11b4-c804-f8acf3aa4141";
// Get the GROUP_KEY from its web page, found with
// Search / All or from
// http://search.secondlife.com/web/search/groups/?q="Group Name"
// At the bottom of the group's web page is its URL,
// the end of the URL is the group's key.

string GIVING_MSG = "Thanks for your interest, and please enjoy your gift!";

string JOIN_MSG = "You need to be a member of the group to get the gift.  If you're not a member, type Control-H to get the chat history, and click on the following blue-highlighted text, then Join.  ";

string NOT_ACTIVE_MSG = "Or perhaps you're already a member and just don't have this group active at the moment; if so, click on the following text, choose the group from the list, and Activate.  ";

string FOLDER_NAME = "Gift from Group Name";

// ____________________________________________
// END OF STUFF MOST USERS WOULD WANT TO CHANGE
// --------------------------------------------

string GROUP_URI = "secondlife:///app/group/";
list giftContents;

default
{
    state_entry()
    {
        // In lieu of other specs, we'll just give everything in the object's inventory except this script
        // in a new folder named FOLDER_NAME.
        integer invIdx = llGetInventoryNumber(INVENTORY_ALL) - 1;
        string scriptName = llGetScriptName();
        for (; invIdx >= 0; invIdx--)
        {
            string invItemName = llGetInventoryName(INVENTORY_ALL, invIdx);
            if (invItemName != scriptName)
                giftContents += invItemName;
        }
        if ([] == giftContents)
            state no_contents;
        else
            llWhisper(0, "Will give folder named \"" + FOLDER_NAME + "\" containing these items: "
                + llDumpList2String(giftContents, ", "));
    }
    changed(integer change)
    {
        if (CHANGED_INVENTORY & change)
            llResetScript();
    }
    touch_start(integer total_number)
    {
        key toucher = llDetectedKey(0);
        if (llSameGroup(toucher))
        {
            llInstantMessage(toucher, GIVING_MSG);
            llGiveInventoryList(toucher, FOLDER_NAME, giftContents);
            return;
        }
        llInstantMessage(toucher, JOIN_MSG + GROUP_URI + (string)GROUP_KEY + "/about\n"
            + NOT_ACTIVE_MSG + GROUP_URI + "list/show");
    }
}

state no_contents
{
    state_entry()
    {
        llWhisper(DEBUG_CHANNEL, "Nothing to give; please add one or more gift items.");
    }
    changed(integer change)
    {
        if (CHANGED_INVENTORY & change)
            llResetScript();
    }
}

Probably I'd do it all differently now, but at least it may be useful for somebody.

  • Thanks 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...