Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
1.1 kB
4
Indexable
Never
list admins = ["7405e11e-67d8-4ac7-ad98-e9e90316e2e4", "559f590e-7016-4273-ba0d-6d8b6b7c0516", "ba2e1323-4dae-4076-8762-d7bc2317e2f6"]; //Paradox, Iskorka, ObiAi 

integer click;
integer take_counter;

default
{
    state_entry()
    {        
        llSetTimerEvent(0.05);
        take_counter = (integer) llGetObjectDesc();
    }
    touch_start(integer total_number)
    {
        integer isAdmin = (llListFindList(admins, [(string) llDetectedKey(0)]) != -1);        
        if (isAdmin == TRUE)
        {
            llSay (0, "The gift was taken " + (string) take_counter + " times.");
            
            click += 1;
            if (click < 30)
            {
                llGiveInventory(llDetectedKey(0), "Gift from Slavia");  
            }
        }
        else
        {
            llGiveInventory(llDetectedKey(0), "Gift from Slavia");
            take_counter += 1;
        }
    }
    timer()
    {
        if (click < 30)
        {
            click += 1;    
        }
        if (click == 31)
        {
            click = 0;    
        }        
    }
}
Leave a Comment