dofile("script\\gamemenu.lua");
dofile("script\\lib.lua");
set_inpun_fun("gameinput");
location={}
location["hotel"] = true
location["hotel"] = {}
location["hotel"]["id"] = 13
location["hotel"]["sub_id"] = 0
location["number9"] = true
location["number9"] = {}
location["number9"]["id"] = 13
location["number9"]["sub_id"] = 1
function LevelComplete()
  DeleteElement("gr",41);
  setcurentleaf("number9",13,1);
  AddElement("gr",225);
  MoveObjectToTree(225); 
    flags.levelcomplete=true;
  whole_darkness=false;
  DarkScreen(true);
  ShowMenu(false)
end;
function LoadNextLevel()
  delete_tree_leaf("Root","hotel");-- Добавляет лист в дерево 
  delete_tree_leaf("Root","number9");-- Добавляет лист в дерево 
  setnextlavel(14);
  loadlavel();
end;
function LoadingLevel(param)
if flags.levelcomplete then
  delete_tree_leaf("Root","hotel");-- Добавляет лист в дерево 
  delete_tree_leaf("Root","number9");-- Добавляет лист в дерево 
  setnextlavel(14);
  loadlavel();
return; end;
SetAlfaValue(503,0);
     SLevel=param;
return;end;

flags={};
flags["comx"]=false;
flags["comx1"]=false;
flags["HintCount"]=5;
flags["minicomplete"]=false;
flags["minicomplete1"]=false;
flags["minicomplete2"]=false;
flags["minicomplete3"]=false;
flags["loc1"] = false;
flags["firstloc1"] = true;
flags["loc2"]= false;
flags.soobw = true;
flags["access"]=false;
flags["konec"]=false;
flags["nohints"]=false;
flags["levelcomplete"]= false;
flags["proideno"]=false;
skip= false;

add_tree_leaf("Root","hotel",13,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");
  ShowMenu(true);
loadresource("data\\photoaparat.png","photoaparat",2000029);
loadresource("data\\animationMENU3.png","menuAn",2000030);
AddImgToBook("photoaparat",821,637);
AddHints()
dofile("./data/13/0/res.lua");
 UpdateStack();
add_tree_leaf("Root","number9",13,1);
  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/13/1/res.lua");
 UpdateStack();
setcurentleaf("hotel",13,0);
WaitRender()
flags.comx= true

    ShowMenu(false);
function StartLevel()
DarkScreen(false);

  SetCurrentRM("menu");    
    AddImgToBook("photoaparat",821,637);
    AddHints()
  SetCurrentRM("main");
  ShowMenu(true);
setcurentleaf("hotel",13,0);
  AddParticleToObject(40,"evak",62,300);
  MoveEmiter("evak",62,300);
  if (not flags.minicomplete2) then
    StartEmiter("evak");
  end;
setcurentleaf("number9",13,1);
  AddParticleToObject(20,"Svet1",100,663);
  MoveEmiter("Svet1",100,663);
  if (not flags.minicomplete7)  then
    StartEmiter("Svet1");
  end;

end
playfile(".\\sound\\game_theme2.ogg",true,true);