playeffect("bedroom",true)
if not flags.firstloc9 then
  flags.firstloc9=true
  CreatePlashechka("549")
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,3)
speciale_action(2,126,true,2.9)

setCursor(obj.mini_BedroomKrugi_9_0.id,2);
setCursor(obj.door_KoridorMuzeya_9_0.id,6);
setCursor(obj.door_BedroomHidden_9_0.id,2);
setCursor(obj.mini_Kartina_9_0.id,2);
setCursor(obj.mini_BedroomKamin_9_0.id,2);
setCursor(obj.holst_9_0.id,2);

function SelectRandom()
  if not neighbors.BedroomHidden.lock then
    giveMeHint(obj.door_BedroomHidden_9_0.id);
  return end
  if not flags.videlNoty then
    giveMeHint(obj.mini_Kartina_9_0.id);
  return end
  if obj.palitra_12_1 and obj.palitra_12_1.is_collapsed
  and obj.kist_4_10 and obj.kist_4_10.is_collapsed and flags.videlKartinu
  and not(obj.kartina_9_16 and obj.kartina_9_16.is_collapsed) then
    giveMeHint(obj.holst_9_0.id);
  return end
  if obj.gerb_7_14 and obj.gerb_7_14.is_collapsed and not flags.fotoBaleriny then
    giveMeHint(obj.mini_BedroomKamin_9_0.id);
  return end
  if obj.krug_s_otmetinami_11_1 and obj.krug_s_otmetinami_11_1.is_collapsed and not neighbors.BedroomKrugi.lock then
    giveMeHint(obj.mini_BedroomKrugi_9_0.id);
  return end
  CreatePlashechka("10001")
end;


if neighbors.BedroomHidden.lock then
  set_visible_object(obj.door_BedroomHidden_9_0.id,false)
else
  set_visible_object(obj.door_BedroomHidden_9_0.id,true)
end

if neighbors.Molbert.lock then
  set_visible_object(obj.holst_9_0.id,false)
end

if neighbors.Kartina.lock then
  set_visible_object(obj.mini_Kartina_9_0.id,false)
end

if neighbors.BedroomKaminGame.lock then
  set_visible_object(obj.mini_BedroomKamin_9_0.id,false)
end

if flags.kladka then
  set_visible_object(324,false)
else
  set_visible_object(324,true)
end;

if neighbors.BedroomKrugi.lock then
  set_visible_object(obj.mini_BedroomKrugi_9_0.id,false)
  set_visible_object(obj.tumbochka_otkrytaya_9_0.id,true)
else
  set_visible_object(obj.tumbochka_otkrytaya_9_0.id,false)
end

function gameinput (sender,obj_id,attachedID)
  sendersProcessing(sender,obj_id,attachedID)
  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,3)
      speciale_action(2,126,true,2.9)    
    return;end;
    if obj_id==127 then
      speciale_action(2,126,true,3)
      speciale_action(2,127,true,2.9)    
    return;end;      
  return;end;    
  if sender==36 then
    if obj_id==2111 then
      StartTravel(211,2,nil,nil,flySp,flySp1);
      StartTimer(2111,15)
    return;end;
    if obj_id==2121 then
      StartTravel(212,2,nil,nil,flySp2,flySp1);
      StartTimer(2121,17)
    return;end;    
    if obj_id==2131 then
      StartTravel(213,2,nil,nil,flySp3,flySp1);
      StartTimer(2131,17)
    return;end;    
    if obj_id==2141 then
      StartTravel(214,2,nil,nil,flySp4,flySp1);
      StartTimer(2141,21)
    return;end;        
  return;end;    
  
  if sender==1 then
    if obj_id == obj.door_KoridorMuzeya_9_0.id then
      jump("KoridorMuzeya");
    end;
    if obj_id == obj.door_BedroomHidden_9_0.id then
      flags.is_hidden_loc = true;
      jump("BedroomHidden");
    end;
    if obj_id == obj.mini_Kartina_9_0.id then
      CreateSatelite("Kartina");
      playeffect("sat")
    end;
    if obj_id == obj.holst_9_0.id then
      CreateSatelite("Molbert");
      playeffect("sat")
    end;
    if obj_id == obj.mini_BedroomKamin_9_0.id then
      CreateSatelite("BedroomKaminGame");
      playeffect("sat")
    end;
    if obj_id == obj.mini_BedroomKrugi_9_0.id then
      CreateSatelite("BedroomKrugi");
      playeffect("sat")
    end;
  end
  -- if sender == 8 then
    -- dofile("./data/9/0/comics.lua")
  -- end
end


