playeffect("birds_sing",true)

if not flags.BookCompl then
setCursor(12,2)
end;
if not flags.ShkatCompl then
setCursor(13,2)
end;
setCursor(17,2)
if flags.comics_1_51 then
set_visible_object(542,true)
end;
setCursor(542,6)

if not flags.plashechka_1_0 then

  flags.plashechka_1_0 = true
  firstzapis=true
  CreatePlashechka("662")
end

if flags.comics_1_51 and not flags.medmessage then
  flags.medmessage=true
  
  CreatePlashechka("673")
end

function SelectRandom()
  -- if not neighbors.GirlRoomMirror.lock then
    -- giveMeHint(obj.mini_GirlRoomMirror_1_0.id)
  -- return  end
  -- if not neighbors.GirlsRoomHidden.lock then
    -- giveMeHint(obj.door_GirlsRoomHidden_1_0.id)
  -- return  end
  -- if not neighbors.comics3.lock then
    -- giveMeHint(obj.door_GirlsHouse_1_0.id,"ARROW_DOWN")
  -- end
  -- giveMeHint(obj.mini_GirlsRoomEngraving_1_0.id)
end

if obj.amul_d_l and obj.amul_d_l.is_stored then
  UnStoreObj(obj.amul_d_l.id)  
  jump("comics2")
end;


function gameinput (sender,obj_id,attachedID)
  sendersProcessing(sender,obj_id,attachedID)
  Write("sender = "..sender.."\n")
  if sender==154 then
    if flags.ShowTutorial then
      nexttutorial=true
      WaitRender()
    end;
  end;
  
  if sender==121 then
    if firstzapis then
    firstzapis=false
      Journal:addText(1,"9001",166,91,330)
  Journal:addPicture(1,"page1",534,69,0,0,414,460)
  Journal:addPicture(1,"page1",163,289,414,0,355,273);
    end;
  end;
  if sender==100 then
    if nexttutorial then
      if flags.mes_tutorial==1 then
        CreateTutorial("10009",200,300,1)
        nexttutorial=false
        flags.mes_tutorial=2;
        return
      end;  
      if flags.mes_tutorial==2 then
        CreateTutorial("10006",252,85,0)
        nexttutorial=false
        flags.mes_tutorial=3;
      end;      
    end;
    -- if to_museum then
      -- to_museum=false
      -- UnStoreObj(obj.amul_d_l.id)  
      -- jump("comics2")
    -- end;
  end;

  if sender==1 then
    if obj_id==17 then
    playeffect("sat")
      CreateSatelite("Note");
    end;
    
    if obj_id==12 then
    playeffect("sat")
      CreateSatelite("Book");
    end;
    
    if obj_id==13 then
    playeffect("sat")
      CreateSatelite("Shkat");
    end;
    if obj_id == 542 then
      jump("Street");
    end;
      
  end
  -- if sender == 8 then
    -- jump("comics2")
  -- end
  -- if sender == 8 then
    -- flags.ShkatCompl = true
    -- NewObj("pila_11_1","bg_1_0",913,376,"2150",0,0,0,0,89,74);
    -- StoreObj(obj.pila_11_1.id)
  -- end
  -- if sender == 26 then
    -- jump("VorotaKardonisy")
  -- end
  if sender == 121 then
    if flags.comics_1_51 then
       
      return
    end
    if flags.startgame then
      flags.startgame=false;
      if flags.StandartMode then
      flags.mes_tutorial=1;
      InvitationTutorial()
      end;
    end;
  end
end


