playeffect("old",true)

setCursor(obj.vstavka_18_0.id,4);
setCursor(obj.mini_OlderShkaf_18_0.id,2);
setCursor(obj.door_KoridorBratyev_18_0.id,6);
setCursor(obj.door_OlderHidden_18_0.id,2);
setCursor(obj.mini_OlderShlem_18_0.id,2);
setCursor(obj.kod_18_0.id,2);
setCursor(obj.Zapiska_18_0.id,2);

function SelectRandom()
  if not neighbors.OlderHidden.lock then
    giveMeHint(obj.door_OlderHidden_18_0.id)
  return end
  if not obj.vstavka_18_0.is_collapsed then
    giveMeHint(obj.vstavka_18_0.id)
  return end
  if obj.card_16_11 and obj.card_16_11.is_collapsed
  and obj.kniga_14_1 and obj.kniga_14_1.is_collapsed
  and flags.podKovromVTajnike and not neighbors.OlderShkaf.lock then
    giveMeHint(obj.mini_OlderShkaf_18_0.id)
  return end
  if obj.magnific_14_11 and obj.magnific_14_11.is_stored then
    giveMeHint(obj.kod_18_0.id)
  return end
  if obj.masl_cor and obj.masl_cor.is_collapsed
  and obj.screwdriver_14_12 and obj.screwdriver_14_12.is_collapsed
  and not neighbors.OlderShlem.lock then
    giveMeHint(obj.mini_OlderShlem_18_0.id)
  return end
  if not neighbors.Zapiska.lock then
    giveMeHint(obj.Zapiska_18_0.id)
  return end
  CreatePlashechka("10001")
end;

if flags.OlderHidden2 then
  neighbors.OlderHidden.lock=false
end;

if neighbors.OlderHidden.lock then
  set_visible_object(obj.door_OlderHidden_18_0.id,false)
else
  set_visible_object(obj.door_OlderHidden_18_0.id,true)
end
if neighbors.OlderShlem.lock then
  set_visible_object(obj.mini_OlderShlem_18_0.id,false)
end
if neighbors.OlderShkaf.lock then
  set_visible_object(obj.mini_OlderShkaf_18_0.id,false)
end
if flags.shlem then
  set_visible_object(obj.otkrytoe_zabralo_18_0.id,true)
else
  set_visible_object(obj.otkrytoe_zabralo_18_0.id,false)
end
if flags.pravaya and flags.levaya then
  set_visible_object(obj.shkaf_priotkrytyj_18_0.id,true)
else
  set_visible_object(obj.shkaf_priotkrytyj_18_0.id,false)
end
if neighbors.Kod.lock then
  set_visible_object(obj.kod_18_0.id,false)
end
if flags.otkrylDvercy then
  set_visible_object(obj.shkaf_priotkrytyj_18_0.id,true)
else
  set_visible_object(obj.shkaf_priotkrytyj_18_0.id,false)
end
if neighbors.Zapiska.lock then
  set_visible_object(obj.Zapiska_18_0.id,false)
else
  set_visible_object(obj.Zapiska_18_0.id,true)
  AddEmiter(obj.Zapiska_18_0.id,"Standart_18_4");
StartEmiter("Standart_18_4");
end

function gameinput (sender,obj_id,attachedID)
  sendersProcessing(sender,obj_id,attachedID)
  if sender==1 then
    if obj_id == obj.vstavka_18_0.id then
      StoreObj(obj.vstavka_18_0.id)
      StopEmiter("Inv_18_1");
    end;
    if obj_id == obj.door_KoridorBratyev_18_0.id then
      jump("KoridorBratyev");
    end;
    if obj_id == obj.door_OlderHidden_18_0.id then
      flags.is_hidden_loc = true;
      jump("OlderHidden");
    end;
    if obj_id == obj.mini_OlderShlem_18_0.id then
      CreateSatelite("OlderShlem");
      playeffect("sat")
    end;
    if obj_id == obj.mini_OlderShkaf_18_0.id then
      CreateSatelite("OlderShkaf");
      playeffect("sat")
    end;
    if obj_id == obj.kod_18_0.id then
      CreateSatelite("Kod");
      playeffect("sat")
    end;
    if obj_id == obj.Zapiska_18_0.id then
      CreateSatelite("Zapiska");
      playeffect("sat")
    end;
  end
  -- if sender == 8 then
    -- dofile("./data/18/0/comics.lua")
  -- end
end


