function mini_create ()
  show_help_wnd=true;
  init_mini(1);
  create_mini(19,5,50,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("rouk_enter",25,1);
      flags.nohints=false;
    if flags.minicomplete17 then 
      playeffect("29");
      DeleteElement("gr",174);
      Set_Cursor(46,4);
      flags.door=true;
      StopEmiter("pu4ok");
      flags.address=true;
      flags.addressdlyapodskazki=true;

      AddParticleToObject(40,"dog",528,376);
      MoveEmiter("dog",528,376);
      StartEmiter("dog")
      CreateWindow(150,250,"261",nil,nil,250,30);
      --playeffect("01");
      Set_Cursor(2,3);
      savegame(SaveLevel());
    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.minicomplete17=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("rouk_enter");
  return;end;  
  if sender==100 then
    if not help then
      CreateWindow(200,200,"3",100,"messageinfo",30,50)
      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.minicomplete17 then
        finish_mini_game(true);
      return;end;  
    return;end;
  if id==650 then
   playeffect("17");  
    finish_mini_game(false);
    clear_satelite_leaf("rouk_enter");
    DeleteResource(    "m17_close"       );
    DeleteResource(    "m17_fon"     );
    DeleteResource(    "m17_zelen"       );
    DeleteResource(    "m17_3"       );
    DeleteResource(    "m17_lenta"       );


  return;end;
      if not flags.minicomplete17 then      
        if id>=656 and id<=660 then --нажимаем на часть телеграммы
          add_to_mouse(id);
          mousepresed=true;
          objectid=id;
        return 0; end  
      return;end;
  return; end;
  if sender == 6 --Отпустили левую кнопку мышки
  then    
    if helpbtn then
     playeffect("11");  
       CreateWindow(200,200,"3",100,"messageinfo",30,50)  
      helpbtn=false;
    end;
    if not ok then
    if mousepresed==true
    then
        playeffect("gorwok");
      RemoveFromMouse(objectid);
      check_mini_game_puzzle(objectid);
      mousepresed=false;
      objectid=0;
    end
    return; end;
  return; end;  
end;
function mini_delete ()

end;