playeffect("back",true)

setCursor(obj.window_back_yard.id ,13);
setCursor(obj.door_BackyardHidden_13_0.id,2);
setCursor(obj.tomaineneter_back_yard.id,8);
setCursor(obj.tobesedka_back_yard.id,6);
setCursor(obj.dver_13_0.id,2);


function SelectRandom()
  if not neighbors.BackyardHidden.lock then
    giveMeHint(obj.door_BackyardHidden_13_0.id);
  return; end
  if obj.verevka_14_1 and obj.verevka_14_1.is_stored then
    giveMeHint(obj.window_back_yard.id);
  return end
  if not (flags.spearin and flags.swordin) and obj.kope_15_1 and obj.kope_15_1.is_collapsed and  obj.mech_20_0 and obj.mech_20_0.is_collapsed then
    giveMeHint(obj.statsword_back_yard.id);
  return end  
    if not flags.Statuefinish and flags.swordin and flags.spearin then
    giveMeHint(obj.hole_back_yard.id);
  return end
  CreatePlashechka("10001")
end

if not flags.swordin then
  setCursor(obj.statsword_back_yard.id,2)
end;
if not flags.spearin then
  setCursor(obj.statpik_back_yard.id,2)
end;
if  flags.swordin and flags.spearin then

  set_visible_object(obj.hole_back_yard.id,true)
  if not flags.Statuefinish then
  AddEmiter(obj.hole_back_yard.id,"Standart_13_4");
  StartEmiter("Standart_13_4");  
    setCursor(obj.hole_back_yard.id,2)
  else
  setCursor(obj.hole_back_yard.id,3)
  end;
end;
-- if flags.holeM then
  -- setCursor(obj.hole_back_yard.id,2)
-- end;
if neighbors.BackyardHidden.lock then
  set_visible_object(obj.door_BackyardHidden_13_0.id,false)
end

if flags.verevka then
  set_visible_object(obj.rope_back_yard.id,true)
  setCursor(obj.window_back_yard.id,5);
else
  AddEmiter(obj.window_back_yard.id,"Standart_13_2",true,626,90);
  StartEmiter("Standart_13_2");
  set_visible_object(obj.rope_back_yard.id,false)
end

function gameinput (sender,obj_id,attachedID)
  sendersProcessing(sender,obj_id,attachedID)
  if sender==1 then
    if obj_id == obj.door_BackyardHidden_13_0.id then
      flags.is_hidden_loc = true;
      jump("BackyardHidden");
    end;
    if (obj_id==obj.statsword_back_yard.id or obj_id==obj.statpik_back_yard.id )and not flags.Statuefinish then
      CreateSatelite("Statue");
      playeffect("sat")
    return;end;    
    if obj_id==obj.hole_back_yard.id and not flags.Statuefinish then
    playeffect("sat")
      CreateSatelite("Statue");
    return;end;      
    if obj_id==obj.window_back_yard.id  then
      if flags.verevka then
        jump("Younger");
      else
        if obj.verevka_14_1 and attachedID == obj.verevka_14_1.id then
          Journal:addText(13,"9025",549,126,330)
          Journal:addPicture(13,"page13",517,137,339,0,409,443);
          Block_Show_Cur(true)
          flags.verevka = true
          removeFromMouse(attachedID)
          playeffect("verevka")
          UnStoreObj(attachedID)
          setCursor(obj.window_back_yard.id,5);
          speciale_action(2,obj.rope_back_yard.id,true,0.5)
          StartTimer(3232,0.6,"unBlock_Show_Cur")
          CreatePlashechka("489")
        else
          if attachedID ~= -1 then
            CreatePlashechka("10000")
          else
            CreatePlashechka("564")
          end
        end
      end
    end;      
    if obj_id==obj.tobesedka_back_yard.id  then
      jump("VorotaKardonisy")
    end;
    if obj_id==obj.tomaineneter_back_yard.id  then
      jump("VhodKBratam")
    end;  
    if obj_id==obj.dver_13_0.id  then
      CreatePlashechka("538")
    end;    
  end
end


