dofile("script\\gamemenu.lua");
dofile("script\\lib.lua");
set_inpun_fun("gameinput");
location={}
location["antikvar"] = true
location["antikvar"] = {}
location["antikvar"]["id"] = 9
location["antikvar"]["sub_id"] = 0
function LevelComplete()
  if not flags.numbers then
    AddElement("gr",116);
    MoveObjectToTree(116);
    flags.numbers=true;
    LevelComplete();
  return;end;
  if not flags.coin then
    AddElement("gr",117);
    MoveObjectToTree(117);
    flags.coin=true;
    LevelComplete();
  return;end;
  DeleteElement("gr",114);
  DeleteElement("gr",22);
  DeleteElement("gr",32);
  DeleteElement("gr",31);
  DeleteElement("gr",39);
  ----speciale_action(2,500);
  flags.levelcomplete=true;
    whole_darkness=false;
  DarkScreen(true);
  ShowMenu(false)
end;
function LoadingLevel(param)
if flags.levelcomplete then
  delete_tree_leaf("Root","antikvar");-- Добавляет лист в дерево 
  setnextlavel(10);
  loadlavel();
return; end;
SetAlfaValue(503,0);
     SLevel=param;
return;end;
flags={};
flags["comx"]=false;
flags["comx1"]=false;
flags["HintCount"]=5;
flags["all9"]=false;
flags["minicomplete"]=false;
flags["minicomplete1"]=false;
flags["parrot"]=false;
flags["parrot1"]=false;
flags["buyer"]=false;
flags["numbers"]=false;
flags["coin"]=false;
flags["levelcomplete"]= false;
flags["nohints"]=false;
skip= false;

add_tree_leaf("Root","antikvar",9,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");
-- CreateWindow(150,250,"206",19,nil,250,30); 
setcurentleaf("antikvar",9,0);
dofile("./data/9/0/res.lua");
WaitRender()
flags.comx= true
    ShowMenu(false);
    loadresource("data\\photoaparat.png","photoaparat",2000029);
loadresource("data\\animationMENU3.png","menuAn",2000030);
AddImgToBook("photoaparat",821,637);
AddHints()

playfile(".\\sound\\game_theme2.ogg",true,true);
function StartLevel()
  AddParticleToObject(25,"kletka",892,399);
  MoveEmiter("kletka",892,399);
  AddParticleToObject(116,"list",819,314);
  MoveEmiter("list",819,314);
  AddParticleToObject(117,"coin",883,596);
  MoveEmiter("coin",883,596);
  if not flags.parrot then
    StartEmiter("kletka");
  end;
  if flags.buyer then  
  if not flags.numbers then
    StartEmiter("list");
  end;
  if not flags.coin then
    StartEmiter("coin");
  end;
  end;
  DarkScreen(false);
  SetCurrentRM("menu");    
    AddImgToBook("photoaparat",821,637);
    AddHints()
  SetCurrentRM("main");
    ShowMenu(true);
end