function mini_create ()
  --show_help_wnd=true;
  init_mini(1);
  create_mini(2,4,4,131072,0,"",218,210,42,66,70,77);
end;

function gameinput (sender,id,attachedID)

if sender==30 then
    setcurentleaf("oranjereya",15,2);
      flags.nohints=false;
    if flags.minicomplete6 then  
    CreateWindow(150,250,"399",nil,nil,250,20);  
    --playeffect("01");
    Set_Cursor(12,3);
      collaps_obj(123,0,0,10,0);

    savegame(SaveLevel());
        endlevel=true;
    flags.loc3 = true;
    return;end;
return;end;
  if sender==26 then
    if id==100 then
  set_visible_object(5001,true)
  end;
    if id==1 then
      clear_satelite_leaf("oranjereya");
    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);
    for i=110,113,1 do
    SetAlfaValue(i,0);
    end
  speciale_action(2,223,true);
  speciale_action(2,214,true);
  speciale_action(2,215,true);
  speciale_action(2,216,true);
  speciale_action(2,217,true);
  speciale_action(2,210,true);
  speciale_action(2,213,true);
  speciale_action(2,211,true);
  speciale_action(2,212,true);
  speciale_action(2,218,true);
  speciale_action(2,219,true);
  speciale_action(2,220,true);
  speciale_action(2,221,true);
    speciale_action(2,206,true);
    speciale_action(2,230,true);
    speciale_action(2,237,true);
    speciale_action(2,239,true);
    speciale_action(2,232,true);
    speciale_action(2,234,true);
    speciale_action(2,224,true);
    speciale_action(2,226,true);
    speciale_action(2,236,true);
  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)
      --playeffect("01");
      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==6 then
    if helpbtn then
       CreateWindow(200,200,"5",100,"messageinfo",30,50)
        playeffect("11");  
      helpbtn=false;
    end;
  if flags.object then
    speciale_action(2,206);  
    flags.object= false;
  return; end;
    if flags.object1 then
    speciale_action(2,230);  
    flags.object1= false;
  return; end;
      if flags.kloc then
    speciale_action(2,236);  
    flags.kloc= false;
  return; end;
return; end;
  if sender==1 then
    if id==6000 then
    helpbtn=true;
  
    return;end;
    if id==203 then
      CreateWindow(200,250,"43",1,"m&i",63,107,"slepok",246,13);  
    flags.minicomplete6=true;      
    return; end;
    
    if id==236 then  
      check_mini_game_zamok(218,0,4);
playeffect("chik");      
      speciale_action(2,236);
      flags.kloc= true;      
    return; end;
    if id == 206 then  
      check_mini_game_zamok(218,0,2);
      playeffect("chpok");
    elseif  id == 230 then
      check_mini_game_zamok(218,0,1);
      playeffect("chpok");
    --//кнопка 2
    elseif id == 232 then
      check_mini_game_zamok(219,1,2);
      playeffect("chpok");
    elseif  id == 234 then
      check_mini_game_zamok(219,1,1);
      playeffect("chpok");    
    --//кнопка 3
    elseif id == 237 then
      check_mini_game_zamok(220,2,2);
      playeffect("chpok");
    elseif id == 239 then
      check_mini_game_zamok(220,2,1);
      playeffect("chpok");
    elseif id == 224 then
      check_mini_game_zamok(221,3,2);
      playeffect("chpok");
    elseif id == 226 then
      check_mini_game_zamok(221,3,1);
      playeffect("chpok");
    end;
    if id==5000 and skipping then
      if not flags.minicomplete6 then
        finish_mini_game(true);
      return;end;  
    return;end;
    if id == 201 then
        playeffect("17");  
      if not flags.minicomplete6 then
        finish_mini_game(false);      
        DeleteResource(      "m6_close"  );
        DeleteResource(      "m6_fon2"  );
        DeleteResource(        "m6_fon"  );  
        DeleteResource(        "m6_lenta"  );
        DeleteResource(    "slepok"    );
        DeleteResource(    "m6_podsvetka"    );
        DeleteResource(    "keis2"    );
        clear_satelite_leaf("oranjereya");        
      return; end;
    end;
  return; end;      
end;
function mini_delete ()

end;