function mini_create()
  init_mini(true);
  create_mini(2,10,8,2147000000,0,"25011924",33,456789123,28,22,0,0);
end

function ClickArrow(arrow_id,number_id,pl_id,direction)
  playeffect("switch")  
  check_mini_game_zamok(number_id,pl_id,direction);
  flags.press=true;    
  iArrowObj = arrow_id;
  speciale_action(2,arrow_id);
  speciale_action(2,arrow_id+1);
  checkMini()
  -- check_mini_game_zamok(33,0,4);
end;

function checkMini()
  check_mini_game_zamok(33,0,4);
end;

function gameinput (sender,obj_id,attached_id)
  MiniInterfaceHandler(sender, obj_id);
  sendersProcessing(sender, obj_id, attachedID);
  
  if sender==30 then
    if flags.sundukopen and not flags.sundukopenM then
      flags.sundukopenM=true;
      setCursor(1,3)
      speciale_action(2,1)
      speciale_action(2,2)  
      setCursor(2,2)  
      AddEmiter(2,"Standart_15_4",true);
      StartEmiter("Standart_15_4");        
    end;
    if flags.Sundukfinish then
      setCursor(2,3)
      ActivateObject(2,false)  
      StopEmiter("Standart_15_4");
    end;
  return;end;
  if sender==100 then
    if start then
      start=false
      if flags.videlKodNaKartine then
        miniCreate()
      end;
    end;
  return;end;
    if sender == 6 then
    if flags.press then
      speciale_action(2,iArrowObj);
      speciale_action(2,iArrowObj+1);
      flags.press=false;
    return; end;
    return; end;  
  if sender==10 then
    flags.sundukopen=true;
    deleteMiniOutfit()
    
    playeffect("sunduk_open")  
    speciale_action(2,obj.fomka_15_13.id,true)
    speciale_action(2,obj.open_15_13.id,true)
    setCursor(obj.fomka_15_13.id,4)
  end;  
  
  if sender==26 then
    --CloseSatelite()
  end;
  if sender==1 then
  
    if flags.sundukopen then
      if obj_id==obj.fomka_15_13.id then
          flags.Sundukfinish=true;
        StoreObj(obj.fomka_15_13.id)
      end;
    end;
  
    if not flags.sundukopen then
      if flags.videlKodNaKartine then
      --- up-----
        
        if obj_id == 1 then   
          ClickArrow(obj_id,33,0,2)
        return; end;
        if obj_id == 3 then
          ClickArrow(obj_id,34,1,2)
        return; end;
        if obj_id == 5 then
          ClickArrow(obj_id,35,2,2)
        return; end;
        if obj_id == 7 then
          ClickArrow(obj_id,36,3,2)
        return; end;
        if obj_id == 9 then
          ClickArrow(obj_id,37,4,2)
        return; end;
        if obj_id == 11 then
          ClickArrow(obj_id,38,5,2)
        return; end;
        if obj_id == 13 then
          ClickArrow(obj_id,39,6,2)
        return; end;
        if obj_id == 15 then
          ClickArrow(obj_id,40,7,2)
        return; end;
      ------------
        --- down-----
        if obj_id == 17 then   
          ClickArrow(obj_id,33,0,1)
        return; end;
        if obj_id == 19 then
          ClickArrow(obj_id,34,1,1)
        return; end;
        if obj_id == 21 then
          ClickArrow(obj_id,35,2,1)
        return; end;
        if obj_id == 23 then
          ClickArrow(obj_id,36,3,1)
        return; end;
        if obj_id == 25 then
          ClickArrow(obj_id,37,4,1)
        return; end;
        if obj_id == 27 then
          ClickArrow(obj_id,38,5,1)
        return; end;
        if obj_id == 29 then
          ClickArrow(obj_id,39,6,1)
        return; end;
        if obj_id == 31 then
          ClickArrow(obj_id,40,7,1)
        return; end;
        return;end;

      CreatePlashechka("20014")
    return; end;
      
    --end;
  end
end