dofile("script\\gamemenu.lua");
dofile("script\\lib.lua");
set_inpun_fun("gameinput");
-- CreateConsole()
function LevelComplete()
  if not flags.case then
    SetCurrentRM("menu");
    loadresource("data\\buttons_sheets.png","buttons_sheets",0000000000000);
    addstaticobjecttogame(777777777,"buttons_sheets",75,698,"",0,0,61,61);        
    AddSheet(1001,"gr","green_b",108,705,34,37,"green",185,675,650,60,11,11,15,13,1,48,777777777,10,"buttonsX");
    SetCurrentRM("main");
  end;
  if not flags.card then 
      SetCurrentRM("menu");
    AddImgToBook("photoaparat",821,637);
    AddHints()
    SetCurrentRM("main");
    flags.card=true;
  end;
  AddElement("gr",102);
  MoveObjectToTree(102);
  DeleteElement("gr",7);
  DeleteElement("gr",35);
  flags.levelcomplete=true;
  DarkScreen(true);
  ShowMenu(false)
end;
function LoadingLevel(param)
if flags.levelcomplete then
  delete_tree_leaf("Root","kabinet");-- Добавляет лист в дерево 
  setnextlavel(1);
  loadlavel();
return; end;
SetAlfaValue(503,0);
     SLevel=param;
return;end;
location={}
location["kabinet"] = true
location["kabinet"] = {}
location["kabinet"]["id"] = 26
location["kabinet"]["sub_id"] = 0
frame=0;
flags={};
flags["minicomplete"]=false;
flags["doorisopen"]=false;
flags["case"]=false;
flags["card"]=false;
flags["seif"]=false;
flags["comx1"]=false;
flags["object"]=false;
flags["kyky"]=false;
flags["key"]=false;
flags["case2"]=false;
flags["dalee"]=false;
flags["dalee2"]=false;
flags["podskazka"]=false;
flags["levelcomplete"]=false;
flags["card1"]=false;

flags["strelka1"]=false;
flags["strelka2"]=false;
flags["strelka3"]=false;
flags["strelka4"]=false;
flags["comend"]=false;
flags["proideno"]=false;
flags["nohints"]=false;
flags["comx"]=false;
flags["photo"]=false;
flags["ru4ka"]=false;
flags["o4ki"]=false;
flags["firstpluw"]=true;
-- WriteToConsole("comx1init = ".." "..tostring(flags.comx1).."\n")
flags["HintCount"]=5;
  add_tree_leaf("Root","kabinet",26,0);-- Добавляет лист в дерево 
  addstaticobjecttogame(877777777,"buttons",114,625,"",60,0,61,61);
  SetCurrentRM("menu");
  AddSheet(1002,"re","red_b",103,656,37,41,"",99,657,650,80,92,21,5,5,0,59,877777777,nil,"buttonsY");
  SetCurrentRM("main");
  dofile("./data/26/0/res.lua");
ShowMenu(false);
setcurentleaf("kabinet",26,0)
WaitRender()
flags.comx= true;
-- dofile("./data/0/0/res.lua");
-- dofile("./data/0/0/level.lua");
    -- add_free_leaf("gorod",0,50);
    -- set_satelite_leaf("kabinet");
    -- DoFile(0,50)
playfile(".\\sound\\game_theme2.ogg",true,true);
function StartLevel()
SwitchToSheet("re");
    StartAnimation(105);
    StartAnimation(106);
    StartAnimation(107);
    StartAnimation(108);
    AddParticleToObject(59,"zvezd",952,50);
    MoveEmiter("zvezd",952,50);
    AddParticleToObject(65,"Svet",355,379);
    MoveEmiter("Svet",355,379);
      StartEmiter("zvezd"); 
    if not flags.minicomplete then
      StartEmiter("Svet"); 
    end;
    if  flags.card then 
    SetCurrentRM("menu");
    AddImgToBook("photoaparat",821,637);
    AddHints()
  SetCurrentRM("main");
  flags.card= true;
  end;
    ShowMenu(true);
        
end
