-- if flags.maslo then
  -- speciale_action(2,5)
-- end
if flags.shlem then
  SetObjectPosition(2,233,45)
  speciale_action(2,1)
  speciale_action(2,2)
  speciale_action(2,obj.serdce_18_11.id)
  set_visible_object(6,false)
end

function gameinput (sender,obj_id,attachedID)
  MiniInterfaceHandler(sender, obj_id,attachedID);
  sendersProcessing(sender,obj_id,attachedID)
  if wrongItemWarning(sender, obj_id, attachedID, "masl_cor","screwdriver_14_12") then
    return
  end
  if sender==100 then
    if flags.zona1 and flags.zona2 then
      flags.shlem=true
      SetObjectPosition(2,233,45)
      speciale_action(2,2,true,0.5)
      speciale_action(2,3,true,0.5)
      speciale_action(2,obj.serdce_18_11.id,true,0.5)
      StartTimer(6898,0.6,"unBlock_Show_Cur")    
    return;end;
    Block_Show_Cur(false)
  return;end;
  if sender==15 then
    if obj_id==14 then
      Block_Show_Cur(false)
    return;end;
    if obj_id==17 then
      Block_Show_Cur(false)
    return;end;    
  return;end;
  if sender==16 then
    if obj_id==13 then
      speciale_action(2,13,true,0.8)
      speciale_action(2,14,true,1)
    return;end;
    if obj_id==14 then
      playeffect("kap")
      speciale_action(2,15,true,1)
    return;end;    
    if obj_id==15 then
      speciale_action(2,14,true,1)
    return;end;    
    if obj_id==16 then
      speciale_action(2,16,true,0.8)
      speciale_action(2,17,true,1)
    return;end;
    if obj_id==17 then
      playeffect("kap")
      speciale_action(2,18,true,1)
    return;end;    
    if obj_id==18 then
      speciale_action(2,17,true,1)
    return;end;  
    if obj_id==22 then
        playeffect("screw")
      speciale_action(2,22,true,0.8)
      speciale_action(2,23,true,1)      
      speciale_action(2,10,true,0.8)
      speciale_action(2,11,true,1)        
    return;end;
    if obj_id==24 then
      playeffect("screw")
      speciale_action(2,24,true,0.8)
      speciale_action(2,25,true,1)      
      speciale_action(2,19,true,0.8)
      speciale_action(2,20,true,1)        
    return;end;    
    if obj_id==23 then
    
      speciale_action(2,23,true,0.8)    
      speciale_action(2,11,true,0.8)
      speciale_action(2,12,true,1)        
    return;end;  
    if obj_id==25 then
      speciale_action(2,25,true,0.8)    
      speciale_action(2,20,true,0.8)
      speciale_action(2,21,true,1)        
    return;end;  
    if obj_id==12 then

      WaitRender()
    return;end;
    if obj_id==21 then

      WaitRender()
    return;end;      
  return;end;
  if sender==1 then
    if obj_id==30 and not flags.zona1 then
      if obj.masl_cor and attachedID == obj.masl_cor.id and not flags.maslo1 then
        
        
        if flags.maslo2 then
        removeFromMouse(attachedID)
        UnStoreObj(attachedID)
        end;
        flags.maslo1 = true      
        speciale_action(2,13,true,1)
        Block_Show_Cur(true)
      elseif obj.screwdriver_14_12 and attachedID == obj.screwdriver_14_12.id and not flags.bolt1 then
        if flags.maslo1 then
          
          removeFromMouse(attachedID)
          if flags.bolt2 then
          removeFromMouse(attachedID)
          UnStoreObj(attachedID)
          end;
          setCursor(30,3)
          flags.bolt1 = true
          flags.zona1 = true
          speciale_action(2,22,true,1)
          Block_Show_Cur(true)
        else
          CreatePlashechka("589","he")
        end
      else
        if flags.maslo1 then
          CreatePlashechka("590","he")
        else
          CreatePlashechka("588","he")
        end
      end    
    return;end;
    if obj_id==31 and not flags.zona2 then
      if obj.masl_cor and attachedID == obj.masl_cor.id and not flags.maslo2 then
  
        if flags.maslo1 then
        removeFromMouse(attachedID)
          UnStoreObj(attachedID)
        end;
        flags.maslo2 = true      
        speciale_action(2,16,true,1)
        Block_Show_Cur(true)
      elseif obj.screwdriver_14_12 and attachedID == obj.screwdriver_14_12.id and not flags.bolt2 then
        if flags.maslo2 then
          
  
          if flags.bolt1 then
          removeFromMouse(attachedID)
          UnStoreObj(attachedID)
          end;
          setCursor(31,3)
          flags.bolt2 = true
          flags.zona2 = true
          speciale_action(2,24,true,1)
          Block_Show_Cur(true)
        else
          CreatePlashechka("589","he")
        end
      else
        if flags.maslo2 then
          CreatePlashechka("590","he")
        else
          CreatePlashechka("588","he")
        end
      end    
    return;end;  

    if obj_id == obj.serdce_18_11.id then
      StoreObj(obj.serdce_18_11.id);
      speciale_action(2,1)
      neighbors.OlderShlem.lock = true
      -- StartTimer(6898,1,"CloseSatelite")
    end;
  end
  if sender == 26 then
  --  CloseSatelite()
  end
end

function frame1()
  speciale_action(2,4,true,0.5)
  speciale_action(2,5,true,1)
  StartTimer(6898,1,"unBlock_Show_Cur")
end

function frame2()
  speciale_action(2,1,true,0.5)
  speciale_action(2,2,true,0.5)
  speciale_action(2,3,true,0.5)
  speciale_action(2,obj.serdce_18_11.id,true,0.5)
  StartTimer(6898,0.6,"unBlock_Show_Cur")
end


