--local maslo = false;

function Buttons_T(sender,obj_id)
    ButtonTreatment(obj_id,10001,10002,10003,CloseBtnX,CloseBtnY,34,34,sender,"parom_main",false)   
end; 

function gameinput (sender,obj_id,attachedID)
Buttons_T(sender,obj_id)    
CursorTreatment(obj_id,sender,attachedID);    
  if sender == 30 then
      DeleteResource("conteiner2");
      DeleteResource("conteiner");   
      DeleteResource("conteiner5");
      DeleteResource("conteiner7");     
      DeleteResource("bk");  
      DeleteResource("maslenka");              
    setcurentleaf("parom_main",10,0);    
    DarkScreen(false);
    if flags.maslo and not flags.masloM then
      flags.masloM=true;
      speciale_action(2,3);
    end;    
    Block_Show_Cur(false);
    if flags.conteiner then
      StopEmiter("conteiner");
        if not flags.masloM then
          flags.masloM=true;
          speciale_action(2,3);
        end;      
      ActivateObject(4,false);
      Set_Anim_Cur(4,3);
    end;
  return;end;
  
  if sender == 1 then

    if obj_id == 4 then
      if not flags.maslo then
        if obj.maslen ~= nil and attachedID == obj.maslen.id then
          RemObjFromMouse()
          Set_Anim_Cur(4,3)
           UnStoreObj(obj.maslen.id);
          speciale_action(2,13,true,2)
          flags.maslo = true;      
          Block_Show_Cur(true)
        return; end;
          if attachedID~=-1 and ((obj.kislot~=nil and attachedID ~= obj.kislot.id) or (obj.kislot==nil ))  then
            RemObjFromMouse()
            CreatePlashechka(900000,"1000")
          return;end;    
            CreatePlashechka(900000,"298")          
      return; end;
    return; end;
    if obj_id == obj.balkye.id then
      RemObjFromMouse()
      flags.conteiner = true;
      StoreObj(obj.balkey.id,obj_id,"65",335,350,"bk",210,229)
    return; end;
  return ;end;
  
  if sender==50 then
        Block_Show_Cur(true);
      StartTimer(8882,1);
  return;end;
  
  if sender == 16 then
       if obj_id==13 then
            speciale_action(2,13,true,2)
            speciale_action(2,12,true,2)
            speciale_action(2,10,true,2)
       return;end;
       if obj_id==10 then
        if mnext==1 then
            playeffect("maslo")
            speciale_action(2,10,true,2)
            speciale_action(2,11,true,2)
            speciale_action(2,14,true,2.2)
        return;end;    
        if mnext==2 then
            mnext=3        
            playeffect("maslo")
            speciale_action(2,10,true,2)
            speciale_action(2,11,true,2)    
            speciale_action(2,14,true,2)
            speciale_action(2,15,true,2)                
        return;end;        
       return;end;
       

       if obj_id==14 then
          speciale_action(2,10,true,2)
        speciale_action(2,11,true,1.9)    
        mnext=2
       return;end;       
       
    if obj_id == 15 then
        speciale_action(2,15,true,2);
        speciale_action(2,11,true,2);
        speciale_action(2,12,true,2.2);
        playeffect("zadvig")
    return; end;
  return; end;
  
  
  if sender==15 then
    if obj_id==12 then
          speciale_action(2,4,true,2.2);
    return;end
    if obj_id==4 then
        speciale_action(2,5,true,2);
    return;end;
      if obj_id==5 then
      Set_Anim_Cur(obj.balkye.id,4);
      Block_Show_Cur(false);         
    return;end;
  return;end;

  
  if sender == 36 then

    if obj_id == 8882 then
      Block_Show_Cur(false);
      
      clear_satelite_leaf("parom_main");
    return; end;

  return; end;

  
end
function SheetSwitched(nCount)
end;