playeffect("holl_b",true)

setCursor(obj.door_KoridorBratyev_14_0.id,5);
setCursor(obj.door_ZalBratyevHidden_14_0.id,2);
setCursor(obj.door_VhodKBratam_14_0.id,6);

if not flags.vaze_broke then
  setCursor(2,4);
else  
  if not flags.Vazafinsh then
    setCursor(1,2);
  end;
end;
if not   flags.Fonarfinish then
  setCursor(obj.mini_ZalBratyevFonar_14_0.id,2);
end;

setCursor(obj.mini_ZalBratyevOlen_14_0.id,2);

function SelectRandom()
  if not neighbors.ZalBratyevHidden.lock then
    giveMeHint(obj.door_ZalBratyevHidden_14_0.id)
  return end
  if obj.fitil_16_1 and obj.fitil_16_1.is_collapsed
  and obj.masl_cor and obj.masl_cor.is_collapsed
  and obj.zazhigalka_19_1 and obj.zazhigalka_19_1.is_collapsed and not flags.Fonarfinish then
    giveMeHint(obj.mini_ZalBratyevFonar_14_0.id)
  return end
  if not flags.olen
  and obj.olenij_rog_17_1 and obj.olenij_rog_17_1.is_collapsed then
    giveMeHint(obj.mini_ZalBratyevOlen_14_0.id)
  return end
  if not flags.vaze_broke then
    giveMeHint(2)
  return end
  if flags.vaze_broke and not flags.Vazafinsh then
    giveMeHint(1)
  return end
  CreatePlashechka("10001")
end;

if flags.ZalBratyevHidden2 then
  neighbors.ZalBratyevHidden.lock=false
end;

if neighbors.ZalBratyevHidden.lock then
  set_visible_object(obj.door_ZalBratyevHidden_14_0.id,false)
else
  set_visible_object(obj.door_ZalBratyevHidden_14_0.id,true)
end
if neighbors.ZalBratyevOlen.lock then
  set_visible_object(obj.mini_ZalBratyevOlen_14_0.id,false)
end
if flags.firein then
  set_visible_object(obj.mini_ZalBratyevFonar_14_0.id,false)
  set_visible_object(obj.fonar_gorit_14_0.id,true)
else
  set_visible_object(obj.fonar_gorit_14_0.id,false)
end

if flags.olen then
  set_visible_object(obj.chuchelo_sdvinutoe_14_0.id,true)
  set_visible_object(obj.ZalBratyevOlen_14_0.id,false)
else
  set_visible_object(obj.chuchelo_sdvinutoe_14_0.id,false)
end

function frame3()
--  StopEmiter("lev_2_0",true)
  Block_Show_Cur(false)
  setCursor(2,3);
  setCursor(1,2);
  flags.vaze_broke=true  
  CreatePlashechka("485")    
  AddEmiter(1,"Standart_14_2");
  StartEmiter("Standart_14_2");  
end

function gameinput (sender,obj_id,attachedID)
  sendersProcessing(sender,obj_id,attachedID)
  if sender==36 then
    if obj_id==5111 then
      StartTravel(211,2,nil,nil,flySp,flySp1);
      StartTimer(5111,20)
    return;end;
    if obj_id==5121 then
      StartTravel(212,2,nil,nil,flySp2,flySp1);
      StartTimer(5121,23)
    return;end;  
    if obj_id==5131 then
      StartTravel(213,2,nil,nil,flySp3,flySp1);
      StartTimer(5131,30)
    return;end;        
  return;end;      
  if sender==16 then
    if  obj_id==3 then
    
      speciale_action(2,3,true,0.6)
      speciale_action(2,4,true,0.7)
    end;
    if obj_id==4 then
      playeffect("vase_br")
      speciale_action(2,4,true,0.6)
      speciale_action(2,1,true,0.7)
      -- AddEmiter(1,"lev_2_0")
      -- StartEmiter("lev_2_0")
      StartTimer(timerID,0.11,"frame3")            
    end;
    Block_Show_Cur(false)
  end;
  if sender==1 then
    if obj_id == obj.door_KoridorBratyev_14_0.id then
      jump("KoridorBratyev");
    end;

    if obj_id == obj.door_ZalBratyevHidden_14_0.id then
      flags.is_hidden_loc = true;
      jump("ZalBratyevHidden");
    end;
    if obj_id==2 then
      Block_Show_Cur(true)
      speciale_action(2,2,true,0.5)
      speciale_action(2,3,true,0.6)
      StopEmiter("Standart_14_6");
    end;
    if obj_id==1 then
      if not flags.Vazafinsh then
        CreateSatelite("Vaza");
        playeffect("sat")
      end;
    end;
    if obj_id == obj.door_VhodKBratam_14_0.id then
      jump("VhodKBratam");
    end;
    if obj_id == obj.mini_ZalBratyevOlen_14_0.id then
      CreateSatelite("ZalBratyevOlen");
      playeffect("sat")
    end;
    if obj_id == obj.mini_ZalBratyevFonar_14_0.id then
      CreateSatelite("ZalBratyevFonar");
      playeffect("sat")
    end;
  end
end


