Jump to content

Group/Rank Item Giver


Guest
 Share

You are about to reply to a thread that has been inactive for 2152 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

So I added a Rank(Speical Person) Item giver as well with old Group giver. So both are most the same, the only differents is with the Rank giver you need to add player Names you wish to give items to.

 

Group Giver:

 

//Make sure to set the objects Group to same as below.. It's under General Object Options!

string item = "Object"; // The item you would like to give out
string group_name = "Linden Lab"; // The group you would like to give the item to
default
{
    on_rez ( integer start )
    {
        llResetScript(); // Resets the script on rez
    }

    touch_start(integer total_number)
    {
        integer group = llSameGroup(llDetectedKey(0)); // checks to see if the person clicking on the object has the same active group as the object, returns TRUE or FALSE
        if ( group == TRUE )
        {
            llGiveInventory(llDetectedKey(0), item); // gives the item to the person who clicked on the object
            llSay(0, "Thank You");
        }
        else if ( group == FALSE )
        {
            llSay(0, "Only members of the group " + group_name + " may receive the inclosed item. If you are a member of the group " + group_name + " please put on your gourp tag try again.");
            // Tell who ever click on it that they don't have their tag on or they are not apart of group!
        }
    }
}

 

 

Rank Giver:

With this script make sure add the player name in list! Remember to add the old account name of player and not new display one. Also you could change it so it checks if player in the group and on list but I figured that take more time to send out items. Cause they are already on list O.o

 

string item = "Object"; // The item you would like to give out
list Names = ["Mulligan Silversmith","Mulligan Linden","Mulligan Pimp"]; // The names of people you want give items too
/*
For the name you need type it how it is on their profile with Caps and lower Cases
*/
default
{
    on_rez ( integer start )
    {
        llResetScript(); // Resets the script on rez
    }

    touch_start(integer total_number)
    {
        integer who; // Who is touching me!
        integer Index;
        Index = llListFindList(Names, [llDetectedName(who)]);
            if (Index > -1)
            {
                llGiveInventory(llDetectedKey(0), item); // gives the item to the person who clicked on the object
                llSay(0, "Thank You");
            }
            else
                llInstantMessage(llDetectedKey(who), "Sorry, your name is not on the list."); // Let them know their name not on the list!
        }
}

 

 

Please Report Bugs/Problems!

 

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

you might want to check out the following site as well since I see you added a license statement...

http://creativecommons.org/licenses/

I personally use the CC-BY license (which is equivalent to what you have above)

/*//--                           License Text                           --//*//*//  Free to copy, use, modify, distribute, or sell, with attribution.   //*//*//    ©2011 (CC-BY) [ http://creativecommons.org/licenses/by/3.0/ ]   //*//*//   Void Singer [ https://wiki.secondlife.com/wiki/User:Void_Singer ]  //*//*//  All usages must contain a plain text copy of the previous 2 lines.  //*//*//--                                                                  --//*/

and CC0 license (for when something is to general, or I don't care about credit)

/*//--                       Anti-License Text                         --//*//*//     Contributed Freely to the Public Domain without limitation.     //*//*//   2011 (CC0) [ http://creativecommons.org/publicdomain/zero/1.0/ ]  //*//*//  Void Singer [ https://wiki.secondlife.com/wiki/User:Void_Singer ]  //*//*//--                                                                 --//*/

 

obviously they have others, but the liscenses are very easy to understand for layman, and pretty well written.

 

  • Like 1
Link to comment
Share on other sites

  • 6 years later...

I realize this is a very old script but I've been using it to this day. 

I'm curious as to the fact that is it possible to have the object set to a specific group for example a land group and have it only give items to for example a military group that is not part of the land group.

Link to comment
Share on other sites

1 hour ago, Darktoorper Amat said:

is it possible to have the object set to a specific group for example a land group and have it only give items to for example a military group that is not part of the land group.

No.  A script cannot detect what groups you belong to.  It can only detect what group you have set currently as your active group -- that is, the one that shows in the tag over your head.  When you use llSameGroup or llDetectedGroup, the script matches your active group with its own.  That will usually be the group that the land it's on has been set to.

There is a sort of hack that you can get away with sometimes.  Basically, it involves putting your script into two separate prims -- one set to the land group and one set to another group -- and then linking them (or you can put one script in the root prim and then use llDetectedLinkNumber to tell which one a visitor touches).  If you do that, a visitor can touch one prim and be recognized by the land group and touch the other one and be recognized by the other group.  That trick will only work as long as you don't take the linkset back to inventory and re-rez it, and it can fail spontaneously for other reasons.

Link to comment
Share on other sites

  • 10 months later...
You are about to reply to a thread that has been inactive for 2152 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...