------Emitters-------------------
AddParticleToObject(201,"fakel1");
MoveEmiter("fakel1",242,150);
StartEmiter("fakel1");

AddParticleToObject(202,"fakel2");
MoveEmiter("fakel2",785,150);
StartEmiter("fakel2");

AddParticleToObject(203,"fakel3");
MoveEmiter("fakel3",510,525);
StartEmiter("fakel3");

AddParticleToObject(204,"fakel4");
MoveEmiter("fakel4",685,305);
StartEmiter("fakel4");

AddParticleToObject(205,"fakel5");
MoveEmiter("fakel5",567,322);
StartEmiter("fakel5");

AddParticleToObject(206,"fakel6");
MoveEmiter("fakel6",465,322);
StartEmiter("fakel6");

AddParticleToObject(207,"fakel7");
MoveEmiter("fakel7",285,395);
StartEmiter("fakel7");

AddParticleToObject(59,"Highlight_door3");
MoveEmiter("Highlight_door3",838,463);
StartEmiter("Highlight_door3");

StartAnimation(obj.bat.id);


local speed = 1;
nice_19_level = true;

WaitRender();

Set_Cursor(59,1);

function gameinput( sender,obj_id,attachedID )
	if SLevel==1.0 then return; end;
	 if (sender == 1  or sender==5) and not isTimes  and imagetex~=-1 then
			set_visible_object(obj.plashechka.id,false)
			set_visible_object(obj[imagetex].id,false)
			del_object_from_game(5654547)		
			gameinput(26,imageid)			
			del_object_from_game(5654547)
				del_object_from_game(5654547)
				del_object_from_game(5654547)
				del_object_from_game(5654547)
				del_object_from_game(5654547)
				del_object_from_game(5654547)	
	end
	if sender == 6 then
		if flags.first_time_load then
			flags.first_time_load = false;
			
		end;
	end;	
	
	if sender ==41 then	
	RotateHandler(obj_id);	
if obj_id ==obj.dragonfly.id then	
	StartAnimation( 5555555555,1,5 );
	return;end;	
	return;end
	if sender==777 then
			if  flags.comics then			
			
			StartTimer(43342,0.5,"conv21")
			function conv21()
				CreatePlashechka(799,"302","goodgirl")		
			end		
			ShowMenu(true)
			SwitchToSheet("re")
			flags.comics=false;
			return;end
	if top_plush_id then		
		ShowMenu(true)
		end	
	if flags.finish then
	
		
			LevelComplete()
				
			ShowMenu(false)			
	return; end;
	end

	
	
	if sender == 33 then	
		 
		if flags.finish then
			ShowMenu(false);
		else
			ShowMenu(true);
		end;
	return;end;
	
	if sender == 2 then
		RemoveFromMouse(object);
		MessageProc(sender,obj_id);
	return;end;	
	
	if sender == 100002 then
		CreatePlashechka(4,"301","goodgirl")
	end;
	
	if sender == 100 then
		if  not flags.kluch  then
			flags.kluch= true;
			AddElement(sheet,obj.kluch23.id);
			MoveObjectToTree(obj.kluch23.id);		
			obj.kluch23.is_stored = true;			
		end	
		
		if flags.first_time_load then
			flags.first_time_load=false
			set_visible_object(obj.intro.id,true);
			speciale_action(4,obj.intro.id);
			-- StartEmiter("Level");
		return; end;
		
		
		
		if flags.dver2 and not flags.mini1 then
			ClosePlushes()
			HideGlove()
			HideScaner()
			flags.finish=true;
		return;end;
		

		-- Starting Opening Plushes --
		if flags.start_draw then
			-- OpenPlushes();
			flags.start_draw = false;
			-- WaitRender();
		return;
		-- else
			-- ShowMenu(true);
		end;
		-- End Starting Opening Plushes --
	return; end;
	-- End WaitRender() --

	-- Left click active object --

	
	
	if sender == 8 then
		HideGlove();
		
		HideScaner();
		HideRentgen()
		HideNvg();
	return end;

	if sender==14 then
	
		addObjectToMouse(obj_id);			
	end
	
	if sender == 1 then
		
		if obj_id == 59 and attachedID==-1  and not canusegadjets  then
			if scaner_on then
							CreatePlashechka(9999,"70","goodgirl")
			return;end;
			flags.dver2=true;
			RemoveFromMouse(obj.kluch23.id)
			SwitchToSheet("gr")		
			DeleteElement("gr",obj.kluch23.id);
			ClosePlushes()
			HideGlove()
			HideScaner()
			flags.finish=true;
			
			
		return;end;
	return; end;
	
end;


function SelectRandom()
computation(59);	
	
return;end;