function mini_create ()
  show_help_wnd=true;
  init_mini(1);
  -- create_mini(19,5,30,106,82,816,475,656,1,7,0,-1);
  create_mini(8128);
  -- finish_mini_game(true);
end;
--function mini_msg_proc (id)
function gameinput (sender,id,attachedID)

  if sender==30 then
  BlockCursor(false);
    setcurentleaf("keys",16,0);
      flags.nohints=false;
    if flags.minicomplete18 then
      playeffect("29");
      DeleteElement("gr",115);  
      Set_Cursor(18,3);
      StopEmiter("slepok");
      frame=0;
      add_free_leaf("comics1",16,51);
      set_satelite_leaf("keys");
      DoFile(16,51)
      ShowMenu(false);
    return; end;
  return; end;
    if sender==26 then
  if id==100 then
  set_visible_object(5001,true)
  end;
  return;end;
  if sender==10 then
    flags.minicomplete18=true;
      StartTimer(2100,1)
      BlockCursor(true);
  return; end;
  if sender==37 then
     skipping=true;
  return;end;  
  if sender==36 and id==2100 then
    clear_satelite_leaf("keys");
  return;end;  
  if sender==100 then
    if not help then
      CreateWindow(200,200,"1",100,"messageinfo",30,50)
      --playeffect("01");
      help=true;
    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==5000 and skipping then
      if not flags.minicomplete18 then
        finish_mini_game(true);
      return;end;  
    return;end;
    if id==650 then
      playeffect("17");  
      finish_mini_game(false);
      clear_satelite_leaf("keys");
      DeleteResource(    "m18_close"           );
      DeleteResource(    "m18_fon"             );
      DeleteResource(    "m18_lenta_klyu4"       );
      DeleteResource(    "m18_lenta_ottisk"         );
      DeleteResource(    "m18_lenta_napole"         );

    return;end;
    if id>=652 and id<=667 then
      add_to_mouse(id);
      mousepresed=true;
      objectid=id;
    return;end;
  return; end;  
  if sender == 8129 --Отпустили левую кнопку мышки
  then    
      if helpbtn then
       CreateWindow(200,200,"1",100,"messageinfo",30,50)
           playeffect("11");
      helpbtn=false;
    end;
    if mousepresed==true
    then

     playeffect("knock");

      RemoveFromMouse(objectid);
      mousepresed=false;
      if id>=x1[objectid] and id<=x2[objectid] and attachedID>=y1[objectid] and attachedID<=y2[objectid] then
        speciale_action(2,objectid)
        speciale_action(2,objectid+32)
        key_ok[objectid]=true;
        error_game=false;
        for i=652,667,1 do
          if key_ok[i]==false then 
          error_game=true; 
          end;
        end;
        if not error_game then finish_mini_game(true); end;
      end;
      objectid=0;
    end
  return; end;  
end;
function mini_delete ()

end;