function mini_create()
  init_mini(true)
  create_mini(8128);
end

if flags.strelka1 then
  speciale_action(2,3)
end

if flags.strelka2 then
  speciale_action(2,4)
end

if flags.strelka1 and flags.strelka2 then
  -- set_visible_object(5,false)
  if not flags.chasyvdetskoy then
    -- setCursor(3,4)
    -- setCursor(4,4)
  end
  if flags.zerkaloChisto then
    if flags.chasyvdetskoy then
      speciale_action(2,obj.baraban_10_12.id)
      speciale_action(2,2)    
      for i=1,segs do
        set_visible_object(i+10,false)
      end
    else
      for i=1,segs do
        setCursor(i+10,4)
      end
      miniCreate()
    end
  end
end
-- angle1,angle2 = 0,0
local strelka1 = 5
RotateObject(3,(strelka1-2)*360/segs,(strelka1-1)*360/segs,0)
local strelka2 = 8
RotateObject(4,(strelka2-2)*360/segs,(strelka2-1)*360/segs,0)
-- local strelki = 0

function gameinput (sender,obj_id,attachedID)
  MiniInterfaceHandler(sender, obj_id,attachedID);
  sendersProcessing(sender,obj_id,attachedID)
  -- Write("sender="..sender.."; obj_id="..obj_id.."; attachedID=" ..attachedID.."\n")
  if wrongItemWarning(sender, obj_id, attachedID, "strelka1_6_1", "strelka2_11_0") then
    return
  end
  if sender==1 then
    if obj_id >= 11 and obj_id <= 10+segs then
      if flags.strelka1 and flags.strelka2 then
        
        if strelka2 == (obj_id-10) then
          Block_Show_Cur(true)
          playeffect("arr_rot")
          RotateObject(4,(strelka2-1)*360/segs,strelka2*360/segs,1)
          strelka2 = strelka2 + 1
          if strelka2 == 13 then
            strelka2 = 1
          end
        else 
          if strelka1 == (obj_id-10) then
            Block_Show_Cur(true)
            playeffect("arr_rot")
            RotateObject(3,(strelka1-1)*360/segs,strelka1*360/segs,1)
            strelka1 = strelka1 + 1
            if strelka1 == 13 then
              strelka1 = 1
            end
          end
        end
      else
        if (obj.strelka1_6_1 and attachedID == obj.strelka1_6_1.id) or (obj.strelka2_11_0 and attachedID == obj.strelka2_11_0.id) then
          if obj.strelka2_11_0 and attachedID == obj.strelka2_11_0.id then
            removeFromMouse()
            UnStoreObj(obj.strelka2_11_0.id)
            Block_Show_Cur(true)
            playeffect("arr_in")
            StartTimer(timerID,0.6,"unBlock_Show_Cur")
            speciale_action(2,3,true,0.5)
            flags.strelka1 = true
          elseif obj.strelka1_6_1 and attachedID == obj.strelka1_6_1.id then
            removeFromMouse()
            UnStoreObj(obj.strelka1_6_1.id)
            Block_Show_Cur(true)
            playeffect("arr_in")
            StartTimer(timerID,0.6,"unBlock_Show_Cur")
            speciale_action(2,4,true,0.5)
            flags.strelka2 = true
          end
        else
          CreatePlashechka("629")
        end
        if flags.strelka1 and flags.strelka2 then
          Block_Show_Cur(true)
          --out("["..tostring(strelka1)..","..tostring(strelka2).."]\n")
          for i=1,segs do
            setCursor(i+10,4)
          end
          StartTimer(timerID,0.2,"unBlock_Show_Cur")
          miniCreate()
        end
      end      
    end
    if obj_id == obj.baraban_10_12.id then
      neighbors.DetskayaChasy.lock = true
      StoreObj(obj.baraban_10_12.id);
    end;
  end
  if sender == 7 then
    Block_Show_Cur(false)
    if openclock then
      openclock=false
      speciale_action(2,2,true,1.5)
      playeffect("arr_open")
      speciale_action(2,obj.baraban_10_12.id,true,1.5)
      for i=1,segs do
        setCursor(i+10,3)
        set_visible_object(i+10,false)
      end      
    return;end;
    if strelka1 == 1 and strelka2 == 3 then
      finish_mini_game(true)    
    end
  end
  if sender == 10 then
    flags.chasyvdetskoy = true
    Block_Show_Cur(true)
    RotateObject(4,(strelka2-1)*360/segs,2*360/segs,1)
    RotateObject(3,(strelka1-1)*360/segs,12*360/segs,1)
    openclock=true

  end
  if sender == 26 then
    --CloseSatelite()
  end
end
