function mini_create ()
  init_mini(1);
  create_mini(2,5,5,131072,0,"",137,132,117,116,95,96);
  -- create_mini(8128);
end;

function gameinput (sender,id,attachedID)

if sender==30 then
  setcurentleaf("barton_zal",5,1);
    flags.nohints=false;
  if flags.minicomplete4 then  
    collaps_obj(113,0,0,10,0); --получаем квитанцию
    playeffect("20");

    savegame(SaveLevel());
  return;end;    
return;end;
  if sender==10 then
      SetAlfaValue(132,0);
    SetAlfaValue(133,0);
    SetAlfaValue(134,0);
    SetAlfaValue(135,0);
    SetAlfaValue(136,0);
    set_visible_object(5000,false);
    set_visible_object(5001,false);
    set_visible_object(5100,false);
    speciale_action(2,6000,true);
  speciale_action(2,112,true);
  speciale_action(2,116,true);
  speciale_action(2,114,true);
  speciale_action(2,113,true);
  speciale_action(2,115,true);
  speciale_action(2,137,true);
  speciale_action(2,138,true);
  speciale_action(2,139,true);
  speciale_action(2,140,true);
  speciale_action(2,141,true);
  speciale_action(2,117,true);
  speciale_action(2,118,true);
  speciale_action(2,119,true);
  speciale_action(2,120,true);
  speciale_action(2,121,true);
  speciale_action(2,122,true);
  speciale_action(2,123,true);
  speciale_action(2,124,true);
  speciale_action(2,125,true);
  speciale_action(2,127,true);
  --speciale_action(2,131);
  speciale_action(2,129,true);
  speciale_action(2,108,true);
  speciale_action(2,151,true);----
  speciale_action(2,150,true);----
  speciale_action(2,110,true);
  speciale_action(2,111,true);


  return; end;
  if sender==26 then
  if id==100 then
  set_visible_object(5001,true)
  end;
    if id==1 then
    flags.loc2 = true

      clear_satelite_leaf("barton_zal");
    return;end;
  return; end;

  if sender==37 then
     skipping=true;
  return;end;
  
    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==6 then
    if helpbtn then

       CreateWindow(200,200,"2",100,"messageinfo",30,50)
      playeffect("11");  
      helpbtn=false;

    end;
    if flags.krasn then
      speciale_action(2,108);
      flags.krasn= false;  
    return; end;
  return;end;  
  if sender==100 then
    if not help then
        if not flags.proideno then
      CreateWindow(200,200,"2",100,"messageinfo",30,50)
      --playeffect("01");  
      help=true;
          end;
    end;
  return;end;
  if sender==1 then
    if id==6000 then
        helpbtn=true;
    return;end
    if id==130 then
        CreateWindow(200,250,"43",1,"m&i",63,107,"kvitan",246,13);
            flags.minicomplete4=true;
      --playeffect("01");
    return; end;
    if id==108 then
      check_mini_game_zamok(137,0,4);  
        playeffect("chik");  
speciale_action(2,108);
flags.krasn= true;      
    return; end;
    if id == 117 then  
      check_mini_game_zamok(137,0,2);
      playeffect(16);
    elseif  id == 118 then
      check_mini_game_zamok(137,0,1);
      playeffect(16);
    ---//кнопка 2
    elseif id == 119 then
      check_mini_game_zamok(138,1,2);
      playeffect(16);
    elseif  id == 120 then
      check_mini_game_zamok(138,1,1);
      playeffect(16);    
    ---//кнопка 3
    elseif id == 121 then
      check_mini_game_zamok(139,2,2);
      playeffect(16);
    elseif id == 122 then
      check_mini_game_zamok(139,2,1);
      playeffect(16);
    elseif id == 123 then
      check_mini_game_zamok(140,3,2);
      playeffect(16);
    elseif id == 124 then
      check_mini_game_zamok(140,3,1);
      playeffect(16);
    elseif id == 125 then
      check_mini_game_zamok(141,4,2);
      playeffect(16);
    elseif id == 127 then
      check_mini_game_zamok(141,4,1);
      playeffect(16);
    end;
    if id==5000 and skipping then
      if not flags.minicomplete4 then
        finish_mini_game(true);
        -- flags.minicomplete4=true;
      return;end;  
    return;end;
    if id == 106 then
           playeffect("17");  
      if not flags.minicomplete4 then
        finish_mini_game(false);      
        DeleteResource("m4_close");
        DeleteResource("m4_fon2");  
        DeleteResource("m4_globus2");
        DeleteResource("m4_podsvetka");
        DeleteResource("m4_lenta");
        DeleteResource("glob");
        DeleteResource("kvitan");
        clear_satelite_leaf("barton_zal");        
      return; end;
    end;
  return; end;      
end;
function mini_delete ()

end;