rebattle=false
jumpfromanw=false
flags.blockrender=true
flags.GlobalHint =true
SetActivLeaf("another_world");

SetCurrentRM("menu");
addactivobjecttogame(7700001,"",3000 ,3000,"",""); --переключалка
AddSheet(7700001,"re","",3000,3000,207,79,"spisok",141,629,576,139,72,60,5,0,0,0,7000034,5);
SetCurrentRM("main");
empty={
0,0,
1,0,
1,1,
0,1
}
addstaticobjecttogame(100,"another_world_00",5,5,"",960,960,64,64); --курсор

addstaticobjecttogame( 1,"another_world_00",0  ,-215,"",0,0,907,215); --меню мачехи
NewObj("praska","another_world",453,532,"568",229,1,124,88); --утюг
NewObj("pisved","another_world",903,482,"139",133,93,107,163); --подсвечник
set_pixel_check(obj.pisved.id,false)
NewObj("rokja","another_world",0  ,440,"590",0,93,133,227); --якорь--------
NewObj("ogoreg","another_world",404,545,"47",795,158,90,82); --нож--------------
NewObj("pokra","another_world",147,563,"349",379,367,60,72); --подкова
set_pixel_check(obj.pokra.id,false)
addstaticobjecttogame( 7,"another_world",331,406,"",840,11,42,68); --замок
NewObj("rugal","another_world",281,376,"566",553,296,222,193); --рога
set_pixel_check(obj.rugal.id,false)
CreatePolygon(52,4,"empty")
CreatePolygon(153,4,"empty")
CreatePolygon(54,4,"empty")
CreatePolygon(55,4,"empty")
addstaticobjecttogame( 9,"another_world_00",0  ,317,"",0,370,1024,415); --чаны
--addstaticobjecttogame(10,"another_world_09",750,569,""); --бокал
NewObj("lezok","another_world",603,482,"588",785,468,155,133); --голова козла------------
NewObj("miksa","another_world",548,508,"63",488,860,109,91); --маска
set_pixel_check(obj.miksa.id,false)
NewObj("kletz","another_world",563,337,"262",784,245,151,205); --клетка
set_pixel_check(obj.kletz.id,false)
NewObj("tsok","another_world",388,469,"500",583,231,155,59); --кость-----------
addstaticobjecttogame(15,"another_world",409,459,"",190,712,131,85); --кандалы
NewObj("kampe","another_world",409,412,"232",528,228,50,54); --компас
NewObj("ronaf","another_world",475,398,"72",640,135,152,91); --фонарь---------
addstaticobjecttogame(18,"another_world",336,356,"",1,730,175,90); --покрышка
NewObj("lzeg","another_world",392,346,"91",325,697,435,160); --жезл-------------------
set_pixel_check(obj.lzeg.id,false)
NewObj("koleko","another_world",494,308,"206",201,338,163,90); --колесо
set_pixel_check(obj.koleko.id,false)
NewObj("akip","another_world",692,152,"502",859,616,157,404); --пика------
set_pixel_check(obj.akip.id,false)
addstaticobjecttogame(22,"another_world",657,238,"",180,450,136,257); --змей    
NewObj("niveb","another_world",714,266,"227",640,79,189,52); --бивень----------
set_pixel_check(obj.niveb.id,false)
NewObj("woodoo","another_world",899,8  ,"589",256,245,70,75); --пентаграмма--------
set_pixel_check(obj.woodoo.id,false)
NewObj("bubuk","another_world",609,282,"551",225,849,96,71); --бубен-------------
set_pixel_check(obj.bubuk.id,false)
addstaticobjecttogame(26,"another_world",0  ,245,"",324,860,161,161); --гаргуля
addstaticobjecttogame(27,"another_world",270,133,"",525,77,112,144); --стрела
NewObj("xosop","another_world",833,175,"526",334,129,190,195); --посох----------
NewObj("bebebe","another_world",300,424,"348",755,1,67,75); --чайник
addstaticobjecttogame(30,"another_world",230,386,"",948,465,73,91); --ботинок
addstaticobjecttogame(31,"another_world",228,360,"",524,1,225,72); --булава
NewObj("paperf","another_world",239,495,"415",188,924,134,97); --свиток
NewObj("streba","another_world",940,146,"83",937,240,84,225); --лук----------
set_pixel_check(obj.streba.id,false)
addstaticobjecttogame(34,"another_world",465,287,"",148,263,101,67); --миска
NewObj("trezub","another_world",513,195,"583",146,337,53,108); --трезубец--------------
NewObj("repab","another_world",281,318,"67",241,164,60,70); --череп
addstaticobjecttogame(37,"another_world",300,270,"",2,867,184,153); --цепь
addstaticobjecttogame(38,"another_world",167,104,"",0,448,175,27); --конь
NewObj("zaruba","another_world",306,191,"89",0,322,143,126); --топор-------------
NewObj("konano","another_world",627,138,"574",885,1,38,154); --меч
set_pixel_check(obj.konano.id,false)
addstaticobjecttogame(41,"another_world",817,93 ,"",923,0,99,238); --коряга

NewObj("sraln","another_world",511,265,"573",242,93,89,67); --глиняный горшок
NewObj("pisuk","another_world",543,129,"559",356,0,165,127); --корабль
set_pixel_check(obj.pisuk.id,false)
NewObj("sedec","another_world",692,195,"581",88,0,141,94); --стул-----------
set_pixel_check(obj.sedec.id,false)
NewObj("jachy","another_world",352,164,"575",0,0,86,82); --ящерица



CreatePolygon(50,4,"empty")
CreatePolygon(51,4,"empty")

addstaticobjecttogame(46,"another_world_45",0  ,0  ,""); --бг

AddParticleToObject(50,"main",652,96);
MoveEmiter("main",652,96);
StartEmiter("main");

AddParticleToObject(51,"bol",25,97);
MoveEmiter("bol",25,97);
StartEmiter("bol");

AddParticleToObject(52,"4an1",202,434);
MoveEmiter("4an1",202,434);
StartEmiter("4an1");

AddParticleToObject(153,"4an2",838,434);
MoveEmiter("4an2",838,434);
StartEmiter("4an2");

AddParticleToObject(54,"kipit",124,402);
MoveEmiter("kipit",124,402);
StartEmiter("kipit");

AddParticleToObject(55,"kipit1",884,402);
MoveEmiter("kipit1",884,402);
StartEmiter("kipit1");

addtexttogame(1000,-100,-100,"");

addfade(501,0);

ActObj = {};
ActObj["232"] = obj.kampe.id;
ActObj["566"] = obj.rugal.id;
ActObj["206"] = obj.koleko.id;
ActObj["568"] = obj.praska.id;
ActObj["67"] = obj.repab.id;
ActObj["262"] = obj.kletz.id;
ActObj["415"] = obj.paperf.id;
ActObj["139"] = obj.pisved.id;
ActObj["573"] = obj.sraln.id;
ActObj["574"] = obj.konano.id;
ActObj["575"] = obj.jachy.id;
ActObj["63"] = obj.miksa.id;
ActObj["349"] = obj.pokra.id;
ActObj["559"] = obj.pisuk.id;
ActObj["348"] = obj.bebebe.id;
ActObj["89"] = obj.zaruba.id;
ActObj["581"] = obj.sedec.id;
ActObj["227"] = obj.niveb.id;
ActObj["583"] = obj.trezub.id;
ActObj["83"] = obj.streba.id;
ActObj["526"] = obj.xosop.id;
ActObj["91"] = obj.lzeg.id;
ActObj["502"] = obj.akip.id;
ActObj["588"] = obj.lezok.id;
ActObj["589"] = obj.woodoo.id;
ActObj["590"] = obj.rokja.id;
ActObj["47"] = obj.ogoreg.id;
ActObj["500"] = obj.tsok.id;
ActObj["551"] = obj.bubuk.id;
ActObj["72"] = obj.ronaf.id;

object_name = {"kampe", "rugal", "koleko", "praska", "repab", "kletz", "paperf", "pisved", "sraln", "konano", "jachy", "miksa", "pokra", "pisuk", "bebebe", "zaruba", "sedec", "niveb", "trezub", "streba", "xosop", "lzeg", "akip", "lezok", "woodoo", "rokja", "ogoreg", "tsok", "bubuk", "ronaf"}

CPU_objects = {}
ok = 0;
while ok < 15 do
  for i, v in pairs(ActObj) do
    if ok ~= 15 then
      if math.random(0,os.clock()) == 1 then
        CPU_objects[i] = v;
        set_pixel_check(v, true);
        ActObj[i] = nil;
        ok = ok + 1;
      end;
    end;
  end;
end;

for i, v in pairs(ActObj) do
  AddElement("re",v);
end;

Block_Show_Cur(true);
        
if flags.comics11 then
ShowMenu(true)
MoveObjectY(1,-215,0,1);
end;