function mini_create ()
    show_help_wnd=true;
    init_mini(1);
    create_mini(19,64,1,230,49,782,593,1006,2,5,0,-1);
    if fromShit then
    fromShit=false
    SetAlfa(777879,1,0,0.5)    
    end;
    StartTimer(88821,0.5)    
end;

function SkipActions()
    SkipMini()
        HideSkip()
        HideHelp()
    for i=1006,1069,1 do
        Set_Anim_Cur(i,3)
    end;            
      Block_Show_Cur(true);
      playeffect("electro")
      speciale_action(2,1072,true);
end;
function Buttons_T(sender,id)
   ButtonTreatment(id,10001,10002,10003,CloseBtnX,CloseBtnY,CloseWidth,CloseHeight,sender,"electro",true)
   ButtonTreatment(id,10021,10022,10023,HelpBtnX,HelpBtnY,HelpWidth,HelpHeight,sender,"electro",true,563,200,150)
   if skip then
    ButtonTreatment(id,10011,10012,10013,SkipBtnX,SkipBtnY,111,31,sender,"electro",true)
   end;  
end;
function gameinput (sender,id,attachedID)
CursorTreatment(id,sender,attachedID);
Buttons_T(sender,id)
   
    if sender == 30 then 
        DeleteResource("shitok_set_05");
        DeleteResource("shitok_set_43");
        DeleteResource("shitok_set_46");
        DeleteResource("shitok_set_mega");    
        setcurentleaf("electro",19,0);     
      -- flags.Is_Satellite = false;     
      -- DarkScreen(false); 
      Block_Show_Cur(false);
      if flags.shitok_set then
        StopEmiter("shitok");
        ActivateObject(3,false);
        Set_Anim_Cur(3,3);
        ActivateObject(15,true);
        Set_Anim_Cur(15,2);
        AddParticleToObject(15,"postbox",40,181);
        MoveEmiter("postbox",40,181);
        StartEmiter("postbox");        
        speciale_action(2,10);
        CreatePlashechka(900000,"602")
      end;
    return; end;
    
    if sender == 10 then
        HideSkip()
        HideHelp()
    for i=1006,1069,1 do
        Set_Anim_Cur(i,3)
    end;        
      Block_Show_Cur(true);
      playeffect("electro")
      speciale_action(2,1072,true);
    return; end;

    if sender==37 then
      skip = true;
    return;end;

    if sender == 100 then
      StartTimer(88811,0.3);
    return; end;
    
    if sender == 36 then  
    if id == 88821 then
      
    return; end;      
      if id == 88811 then
        Block_Show_Cur(false);
        CreatePlashechka(900000,"563")
      return; end;
      if id == 88850 then    
        Block_Show_Cur(false);
        flags.shitok_set = true;
        clear_satelite_leaf("electro");
        finish_mini_game(true);
      return; end;
    return; end;
    
    if sender == 1 then
      if attachedID ~= -1 then
        RemObjFromMouse()
      end;    
      playeffect("btn1")
      check_mini_game_puzzle(id,7);
    return; end;
    
    if sender == 16 then
      if id == 1072 then
        StartTimer(88850,1.5);
      return; end;
    return; end;
    

end;
