if flags.otkrylLyva then
  set_visible_object(3,true)
  set_visible_object(4,false)
  set_visible_object(9,true)
end

if flags.videlBryuliki then
  set_visible_object(1,true)
  set_visible_object(8,true)
  set_visible_object(9,false)
end

function gameinput (sender,obj_id,attachedID)
  MiniInterfaceHandler(sender, obj_id);
  sendersProcessing(sender, obj_id, attachedID);
  if wrongItemWarning(sender, obj_id, attachedID,"shpilka_12_14","vilka_2_1") then
    return
  end
  if sender == 1 then
    if obj_id == 4 then
      if obj.vilka_2_1 and attachedID == obj.vilka_2_1.id then
        CreatePlashechka("20015")
      return;end;
      if obj.shpilka_12_14 and attachedID == obj.shpilka_12_14.id then
        Block_Show_Cur(true)
        flags.otkrylLyva = true
        removeFromMouse()
        UnStoreObj(obj.shpilka_12_14.id)
        setCursor(4,3)
        playeffect("otmich")
        speciale_action(2,7,true,0.5)
        StartTimer(timerID,0.55,"frame1")
      else
        CreatePlashechka("613")
      end
    end
    if obj_id == 9 then
      Block_Show_Cur(true)
      Journal:addText(6,"9010",180,489,330)
      Journal:addPicture(6,"page6",130,60,0,0,428,453);
      flags.videlBryuliki = true
      neighbors.HollMuzeyaHidden.lock = false
      neighbors.VnutriLeva.lock = true
      speciale_action(2,2,true,1)
      speciale_action(2,8,true,1)
      speciale_action(2,9,true,1)
      StartTimer(timerID,1.05,"frame4")
    end
    if obj_id == 1 then
      CreatePlashechka("617")
    end
  end
end

function frame1()
  playeffect("mini_box")
  speciale_action(2,7,true,0.5)
  speciale_action(2,6,true,0.5)
  StartTimer(timerID,0.55,"frame2")
end

function frame2()
  speciale_action(2,5,true,0.5)
  speciale_action(2,6,true,0.5)
  StartTimer(timerID,0.55,"frame3")
end

function frame3()
  speciale_action(2,5,true,0.5)
  speciale_action(2,3,true,0.5)
  speciale_action(2,9,true,0.5)
  StartTimer(timerID,0.55,"unBlock_Show_Cur")
end

function frame4()
  speciale_action(2,2,true,0.5)
  speciale_action(2,1,true,0.5)
  StartTimer(timerID,0.55,"unBlock_Show_Cur")
end