playeffect("bedroom",true)

if not flags.firstloc10 then
  flags.firstloc10=true
  CreatePlashechka("560")
end;

speciale_action(2,125)
speciale_action(2,125,true,3)
speciale_action(2,124,true,2.9)
speciale_action(2,127)
speciale_action(2,127,true,6)
speciale_action(2,126,true,5.9)


setCursor(obj.door_KoridorMuzeya_10_0.id,6);
setCursor(obj.door_DetskayaHidden_10_0.id,2);
setCursor(obj.mini_Muz_10_0.id,2);
setCursor(obj.mini_DetskayaStul_10_0.id,2);
setCursor(obj.mini_DetskayaChasy_10_0.id,2);

function SelectRandom()
  if not neighbors.DetskayaHidden.lock then
    giveMeHint(obj.door_DetskayaHidden_10_0.id);
  return end
  if not neighbors.Muz.lock
  and obj.pruzhyna_10_11 and obj.pruzhyna_10_11.is_collapsed
  and obj.ruchka_11_10 and obj.ruchka_11_10.is_collapsed
  and obj.baraban_10_12 and obj.baraban_10_12.is_collapsed then
    giveMeHint(obj.mini_Muz_10_0.id);
  return end
  if obj.nozh_7_1 and obj.nozh_7_1.is_collapsed
  and not neighbors.DetskayaStul.lock then
    giveMeHint(obj.mini_DetskayaStul_10_0.id);
  return end
  if not neighbors.DetskayaChasy.lock
  and obj.strelka1_6_1 and obj.strelka1_6_1.is_collapsed
  and obj.strelka2_11_0 and obj.strelka2_11_0.is_collapsed then
    giveMeHint(obj.mini_DetskayaChasy_10_0.id);
  return end
  CreatePlashechka("10001")
end;

if flags.DetskayaHidden2 then
neighbors.DetskayaHidden.lock=false
end;

if neighbors.DetskayaHidden.lock then
  set_visible_object(obj.door_DetskayaHidden_10_0.id,false)
else
  set_visible_object(obj.door_DetskayaHidden_10_0.id,true)
end

if neighbors.DetskayaStul.lock then
  set_visible_object(obj.mini_DetskayaStul_10_0.id,false)
end
if neighbors.Muz.lock then
  set_visible_object(obj.mini_Muz_10_0.id,false)
end
if neighbors.DetskayaChasy.lock then
  set_visible_object(obj.mini_DetskayaChasy_10_0.id,false)
end
if flags.chasyvdetskoy then
  set_visible_object(obj.chasy_sdvinuty_10_0.id,true)
else
  set_visible_object(obj.chasy_sdvinuty_10_0.id,false)
end


function gameinput (sender,obj_id,attachedID)
  sendersProcessing(sender,obj_id,attachedID)
  if sender==36 then
    if obj_id==3111 then
      StartTravel(211,2,nil,nil,flySp,flySp1);
      StartTimer(3111,15)
    return;end;
    if obj_id==3121 then
      StartTravel(212,2,nil,nil,flySp2,flySp1);
      StartTimer(3121,17)
    return;end;    
    if obj_id==3131 then
      StartTravel(213,2,nil,nil,flySp3,flySp1);
      StartTimer(3131,9)
    return;end;    
    if obj_id==3141 then
      StartTravel(214,2,nil,nil,flySp4,flySp1);
      StartTimer(3141,21)
    return;end;        
  return;end;    
  if sender==16 then
    if obj_id==124 then
      speciale_action(2,125,true,3)
      speciale_action(2,124,true,2.9)    
    return;end;
    if obj_id==125 then
      speciale_action(2,124,true,3)
      speciale_action(2,125,true,2.9)    
    return;end;    
    if obj_id==126 then
      speciale_action(2,127,true,6)
      speciale_action(2,126,true,5.9)    
    return;end;
    if obj_id==127 then
      speciale_action(2,126,true,6)
      speciale_action(2,127,true,5.9)    
    return;end;        
    
  return;end;    
  
  if sender==1 then
    if obj_id == obj.door_KoridorMuzeya_10_0.id then
      jump("KoridorMuzeya");
    end;
    if obj_id == obj.door_DetskayaHidden_10_0.id then
      flags.is_hidden_loc = true;
      jump("DetskayaHidden");
    end;
    if obj_id == obj.mini_Muz_10_0.id then
      CreateSatelite("Muz");
      playeffect("sat")
    end;
    if obj_id == obj.mini_DetskayaStul_10_0.id then
      CreateSatelite("DetskayaStul");
      playeffect("sat")
    end;
    if obj_id == obj.mini_DetskayaChasy_10_0.id then
      CreateSatelite("DetskayaChasy");
      playeffect("sat")
    end;
    -- if obj_id == obj.mini_comics11_10_0.id then
      -- CreateSatelite("comics11");
    -- end;
  end
end

