if flags.gravyura1 then
  setCursor(4,3)
  SetAlfaValue(4,1)
end
if flags.gravyura2 then
  setCursor(6,3)
  SetAlfaValue(6,1)
end
if flags.gravyura1 and flags.gravyura2 then
  setCursor(100,3)
  set_visible_object(100,false)
  set_visible_object(3,true)
  set_visible_object(4,false)
  set_visible_object(5,false)
--  speciale_action(4,obj.kuskiMedveda_3_14.id)
  setCursor(obj.kuskiMedveda_3_14.id,4)
end

function gameinput (sender,obj_id,attachedID)
  MiniInterfaceHandler(sender, obj_id);
  sendersProcessing(sender, obj_id, attachedID);
  if wrongItemWarning(sender, obj_id, attachedID, "gravyura_7_1", "gravyura_9_1") then
    return
  end
  out(sender.."\n")
  if sender==1 then
    if obj_id == obj.kuskiMedveda_3_14.id then
      StoreObj(obj.kuskiMedveda_3_14.id)
      neighbors.OzeroPlita.lock = true
    end  
    if not (flags.gravyura1 and flags.gravyura2) then
      if obj_id==100 then
        if obj.gravyura_7_1 and attachedID == obj.gravyura_7_1.id then
          removeFromMouse()
          UnStoreObj(obj.gravyura_7_1.id)
          -- SetAlfaValue(4,1)
          Block_Show_Cur(true)
          SetAlfa(4,0.01,1,1,"frame3")
        --  setCursor(4,3)
          playeffect("grav")
          flags.gravyura1 = true  
        return;end;
        if obj.gravyura_9_1 and attachedID == obj.gravyura_9_1.id then
          removeFromMouse()
          UnStoreObj(obj.gravyura_9_1.id)
          -- SetAlfaValue(6,1)
          Block_Show_Cur(true)
          playeffect("grav")
          SetAlfa(6,0.01,1,1,"frame3")
          flags.gravyura2 = true
        --  setCursor(6,3)
        return;end;  
          CreatePlashechka("612")
      return;end;
    end;  
  
    -- if obj_id == 4 then
      -- if obj.gravyura_7_1 and attachedID == obj.gravyura_7_1.id then
        -- removeFromMouse()
        -- UnStoreObj(obj.gravyura_7_1.id)
        -- Block_Show_Cur(true)
        -- SetAlfa(4,0.01,1,1,"frame3")
        -- setCursor(4,3)
        -- playeffect("grav")
        -- flags.gravyura1 = true
        -- return
      -- else
        -- if not flags.gravyura1 then
          -- CreatePlashechka("612")
        -- end
      -- end
    -- end
    -- if obj_id == 6 then
      -- if obj.gravyura_9_1 and attachedID == obj.gravyura_9_1.id then
        -- removeFromMouse()
        -- UnStoreObj(obj.gravyura_9_1.id)
        -- Block_Show_Cur(true)
        -- playeffect("grav")
        -- SetAlfa(6,0.01,1,1,"frame3")
        -- flags.gravyura2 = true
        -- setCursor(6,3)
        -- return
      -- else
        -- if not flags.gravyura2 then
          -- CreatePlashechka("612")
        -- end
      -- end
    -- end


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

function frame3()
  if flags.gravyura1  and flags.gravyura2 then
    flags.hiidenOzero2=true
    neighbors.OzeroHidden.lock = false
    -- Block_Show_Cur(true)
    speciale_action(2,4,true,1)
    speciale_action(2,5,true,1)
    speciale_action(2,1,true,1)
    
    StartTimer(timerID,1.1,"frame1")
  else
    Block_Show_Cur(false)
    setCursor(100,13)
    sendersProcessing(35)    
  end
end

function frame1()
  setCursor(obj.kuskiMedveda_3_14.id,4)
  speciale_action(2,2,true,1)
  speciale_action(2,1,true,1)
  playeffect("move_b")
  StartTimer(timerID,1.01,"frame2")
end

function frame2()
  speciale_action(2,2,true,1)
  speciale_action(2,3,true,1)
  setCursor(100,3)
  set_visible_object(100,false)

  setCursor(obj.kuskiMedveda_3_14.id,4)  
  StartTimer(timerID,1.01,"unBlock_Show_Cur")
end