function gameinput (sender,obj_id,attachedID)
  if pause_state then
    if sender==1 or sender==6 or sender==14 then
      pause_state=false;
      --set_visible_object(11111,false);
    end;  
  return;end;
-----------------------------------------------------------------------------------------------------------------------
  if sender==30 then
    setcurentleaf("kabinet",26,0);
    savegame(SaveLevel());
      flags.nohints=false;
    whole_darkness=false;
    DarkScreen(true);
    SetAlfa(503,0,1,1);
    speciale_action(4,503)
  return;end;

  if sender==15 then
    if obj_id==26 then
      SetAlfa(-30,1,0,2)
      todark=false;
    return;end;
  return;end;

  if sender==33 then
    if obj_id==-30 then
      if todark then
        speciale_action(2,26,true)  
      return;end;
      
    return;end;
  return;end;

  if sender==28 then
    if obj_id==1 then
      if skip then
        clear_satelite_leaf("kabinet");
      return;end;
      if frame==0 then
        speciale_action(2,11,true);    
    MoveObjectX(3,1024,600,2);   
    MoveObjectX(2,-300,76,2);
      return;end;


      if frame==7 then
        clear_satelite_leaf("kabinet");
      return;end;
    return;end;

    if obj_id==3 then
      if frame==0 then
        ScaleObject(3,1,1.1)
        setcolor(2,0.6,0.6,0.6,1); 
      return;end;  
    return;end;

    if obj_id==25 then
      speciale_action(2,25,true);
      speciale_action(2,23,true);
      speciale_action(2,24,true);
      ScaleObject(26,1,1.2);
      addfade(-30,0);
      SetAlfa(-30,0,1,2)  
      todark=true;
    return;end;
  return;end;  

  if sender==29 then
    if obj_id==3 then
      if frame==0 then
        -- speciale_action(2,11,true);
        Blocking= false;
        setcolor(1100,1,1,1,1,1);  
        speciale_action(2,16);
      return; end;
    return;end;
  return;end;

  if sender == 1 then --кликнули левой кнопкой мыши на активный объект
    if obj_id==11 then
    skiptext()
      if frame==0 or frame==1  or frame==5  or frame==6   then
        MoveObjectY(1,-200,-385,2);
        MoveObjectY(12,610,768,2);
        MoveObjectX(3,600,1024,1.5);   
        MoveObjectX(2,76,-350,1.5);
        SetAlfa(16,1,0,0.01)
        SetAlfa(14,1,0,0.01)  
  
      return; end;  
      if frame==2   then
        MoveObjectY(1,-200,-385,2);
        MoveObjectY(12,610,768,2);
        MoveObjectX(4,600,1024,1.5);   
        MoveObjectX(2,76,-350,1.5);
        SetAlfa(16,1,0,0.1)
        SetAlfa(14,1,0,0.1)  

      return; end;
      if frame==4 or frame==3   then
        MoveObjectY(1,-200,-385,2);
        MoveObjectY(12,610,768,2);
        MoveObjectX(4,600,1024,1.5);   
        MoveObjectX(5,76,-350,1.5);
        SetAlfa(6,1,0,0.1)
        SetAlfa(27,1,0,0.1)  
        SetAlfa(16,1,0,0.1)

      return; end;  
    return;end;    
  return;end;

  if sender==6 and (not Blocking) then
  frame=frame+1;
    if frame==1 then 
      ScaleObject(3,1.1,1)
      setcolor(3,0.6,0.6,0.6,1);
      ScaleObject(2,1,1.1)
      setcolor(2,1,1,1,1); 
      speciale_action(2,14);
      speciale_action(2,16);      
      set_text(1100,"211");
    return; end;
    if frame==2 then 
      ScaleObject(2,1.1,1)
      setcolor(2,0.6,0.6,0.6,1);
      ScaleObject(4,1,1.1)
      setcolor(4,1,1,1,1); 
      speciale_action(2,14);
      speciale_action(2,16);
      speciale_action(2,3);        
      speciale_action(2,4);
      set_text(1100,"214");
    return; end;
    if frame==3 then 
      speciale_action(2,2);
      speciale_action(2,4);
      speciale_action(2,5);
      speciale_action(2,6);    
      ScaleObject(4,1.1,1)
      setcolor(4,0.6,0.6,0.6,1);
      ScaleObject(5,1,1.1)
      setcolor(5,1,1,1,1);
      speciale_action(2,16);
      speciale_action(2,4);   
      speciale_action(2,27);           
      set_text(1100,"215");    
    return; end;
    if frame==4 then
      ScaleObject(5,1.1,1)
      setcolor(5,0.6,0.6,0.6,1);
      ScaleObject(4,1,1.1)
      setcolor(4,1,1,1,1); 
      speciale_action(2,27);
      speciale_action(2,16);
      set_text(1100,"216");
    return; end;
    if frame==5 then 
      speciale_action(2,3);
      speciale_action(2,4);
      speciale_action(2,6);
      speciale_action(2,5);
      speciale_action(2,2);      
      ScaleObject(2,1,1.1)
      setcolor(2,1,1,1,1);
      ScaleObject(3,1.1,1)
      setcolor(3,0.6,0.6,0.6,1);   
      speciale_action(2,14);  
      speciale_action(2,16);        
      set_text(1100,"221");
    return;end;
    if frame==6 then
      ScaleObject(3,1,1.1)
      setcolor(3,1,1,1,1);
      ScaleObject(2,1.1,1)
      setcolor(2,0.6,0.6,0.6,1);   
      speciale_action(2,14);
      speciale_action(2,16);        
      set_text(1100,"222");
    return;end;
    if frame==7 then 
      MoveObjectY(1,-200,-385,2);
      MoveObjectY(12,610,768,2);
      -- speciale_action(2,11);
      speciale_action(2,2);
      speciale_action(2,3);
      speciale_action(2,16);
      skiptext()  
    return;end;
  return;end;
end
function skiptext()
  addfade(-33,0);
  speciale_action(4,-33);
  SetAlfa(-33,0,1,1.5)
  speciale_action(2,11);
  speciale_action(2,1100);  
  skip=true;
end;
