Drinking Script

Written by: Headmaster
string anim ="drink";
string anim2 ="hold_R_handgun";

default
{
    attach(key victim)
    {
    if(victim == NULL_KEY)
    {
          llStopAnimation(anim);
          llStopAnimation(anim2);
          llSetTimerEvent(0);
          
        }
        else
        {
         llRequestPermissions(victim,PERMISSION_TRIGGER_ANIMATION);
    }
}

   run_time_permissions(integer permissions)
    {
        if (PERMISSION_TRIGGER_ANIMATION & permissions)
        {
        llStartAnimation(anim);
        llStartAnimation(anim2);
        llWhisper(0,"Tea Time!!");
        llSetTimerEvent(90);
        }
    }

   timer()
   {
    llStartAnimation(anim2);
    llStartAnimation(anim);
    }

}

 

Category: