function mini_create ()
  init_mini(1);
  create_mini(2,6,6,131072,0,"",0016,0022,108,103,108,106);
end;
function gameinput (sender,id,attachedID)

if sender==30 then
    setcurentleaf("rouk_room",25,2);
      flags.nohints=false;
    if flags.minicomplete3 then  
      collaps_obj(115,0,0,10,0);
      playeffect("20");

    speciale_action(2,38)
    speciale_action(2,37)
    savegame(SaveLevel());
    return;end;
return;end;
  if sender==26 then
    if id==1 then
      clear_satelite_leaf("rouk_room");
    return;end;
  if id==100 then
  set_visible_object(5001,true)
  end;
  return; end;
  if sender==6 then
  if helpbtn then
      CreateWindow(200,200,"5",100,"messageinfo",30,50)
    playeffect("11");
    helpbtn=false;
  end;
    if najali then
    speciale_action(2,0004)
    najali=false;
    return;end;
  return; end;

  if sender==10 then
  flags.proideno= true
  set_visible_object(5000,false);
  set_visible_object(5001,false);
  set_visible_object(5100,false);
  speciale_action(2,6000,true);----
  speciale_action(2,0004,true);---
  -- speciale_action(2,0005,true);
  speciale_action(2,0015,true);
  -- speciale_action(2,0007,true);
  -- speciale_action(2,0008,true);
  -- speciale_action(2,0009,true);
  -- speciale_action(2,0010,true);
  -- speciale_action(2,0011,true);
  -- speciale_action(2,0012,true);
  -- speciale_action(2,0014,true);
  -- speciale_action(2,0100,true);
  for i=0016,0021,1 do
    speciale_action(2,i,true);
  end;
  for i=0022,0027,1 do
    SetAlfaValue(i,0);
  end;
  return; end;
  if sender==37 then
     skipping=true;
  return;end;  
  if sender==100 then
    if not help then
    if not flags.proideno then
      CreateWindow(200,200,"5",100,"messageinfo",30,50)
      help=true;
    end;
    end;
  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==1 then
    if id==6000 then
      helpbtn=true;
    return;end
    if id==0013 then
    CreateWindow(200,250,"50",1,"m&i",63,107,"key121",246,13);
        flags.minicomplete3=true;

      playeffect("key");
    return; end;
    if id==0004 then
      check_mini_game_zamok(0016,0,4);  
        speciale_action(2,0004)
        najali= true;
  playeffect("chpok");      
    return; end;
    if id == 0016 then  
      check_mini_game_zamok(0016,0,2);
      playeffect(16);
    elseif  id == 0017 then
      check_mini_game_zamok(0017,1,2);
      playeffect(16);
    ---------//кнопка 2
    elseif id == 0018 then
      check_mini_game_zamok(0018,2,2);
      playeffect(16);
    elseif  id == 0019 then
      check_mini_game_zamok(0019,3,2);
      playeffect(16);    
    -------//кнопка 3
    elseif id == 0020 then
      check_mini_game_zamok(0020,4,2);
      playeffect(16);
    elseif id == 0021 then
      check_mini_game_zamok(0021,5,2);
      playeffect(16);
    end;
    if id==5000 and skipping then
      if not flags.minicomplete3 then
        finish_mini_game(true);
      return;end;  
    return;end;
    if id == 0001 then
           playeffect("17");  
      if not flags.minicomplete3 then
        finish_mini_game(false);      
        DeleteResource("m3_close");
        DeleteResource("m3_fon2");  
        DeleteResource("m3_fon");  
        DeleteResource("m3_klyu4i");
        DeleteResource("m3_podsvetka");
        DeleteResource("m3_lenta");
        DeleteResource("key121");
        clear_satelite_leaf("rouk_room");        
      return; end;
    end;
  return; end;      
end;
function mini_delete ()

end;