if flags.kover then
  set_visible_object(6,false)
  set_visible_object(4,true)
  speciale_action(2,5)
end
if flags.podkovrom then
  speciale_action(2,1)
  speciale_action(2,2)
  speciale_action(2,3)
  set_visible_object(4,false)
end
if flags.podKovromVTajnike then
  speciale_action(2,7)
  speciale_action(2,1)
end

function gameinput (sender,obj_id,attachedID)
  MiniInterfaceHandler(sender, obj_id,attachedID);
  sendersProcessing(sender,obj_id,attachedID)
  if wrongItemWarning(sender, obj_id, attachedID, "fomka_15_13") then
    return
  end
  if sender==1 then
    if obj_id == 6 then
      flags.kover = true
      playeffect("carpet")
      set_visible_object(6,false)
      set_visible_object(4,true)
      speciale_action(2,5,true,0.5)
      setCursor(6,3)
    end
    if obj_id == 4 then
      if obj.fomka_15_13 and attachedID == obj.fomka_15_13.id then
        flags.podkovrom = true
        playeffect("fomka")
        removeFromMouse(attachedID)
        UnStoreObj(attachedID)
        set_visible_object(4,false)
        speciale_action(2,3,true,0.5)
        setCursor(4,3)
        StartTimer(2340,1,"frame1")
      else
        CreatePlashechka("591","he")
      end
    end
    if obj_id == 1 then
      Block_Show_Cur(true)
      speciale_action(2,1,true,1.5)
      speciale_action(2,7,true,1.5)
      flags.podKovromVTajnike = true
      
      neighbors.YoungerKover.lock = true
      
  
      
      StartTimer(timerID,1.6,"frame2")
    end
    if obj_id == 7 then
      CreatePlashechka("670")
    end
  end
end

function frame1()
  speciale_action(2,1,true,0.5)
  speciale_action(2,2,true,0.5)
  speciale_action(2,3,true,0.5)
end


function frame2()
    Journal:addText(15,"9029",562,426,330)
      Journal:addPicture(15,"page15",521,71,0,0,446,483);
  Block_Show_Cur(false)
  CreatePlashechka("670")
end