game_level_hints.levels["Chapter04"] = function()
	return 
    {
		miniscenes({
			room = -- кабинет 
			{
				on_scene("holding", end_level("_area_room")),
				on_scene("miniscene_table", end_level("area_room_table_for_hints")), 
				on_scene("miniscene_table", end_level("area_room_table"))				
				
			},
			miniscene_table =
			{ -- стол алабамы
				on_scene("room", miniscene("_area_table"))
			},
			miniscene_notebook =
			{ -- ноутбук алабамы
				on_scene("miniscene_table", miniscene("_area_comp"))
			},
			miniscene_printer =
			{ -- принтер 
				on_scene("room", miniscene("_area_printer"))
			},
			holding =
			{ -- коридор
				on_scene("room", end_level("_area_holding")),
				IF(hidden("closed_door"), on_scene("laboratory", end_level("_area_lab_holding"))),
				on_scene("warehouse", end_level("area_to_hold")),
				on_scene("miniscene_board", end_level("area_holding01")),
				on_scene("miniscene_board", end_level("area_holding02"))
			},
			laboratory =
			{ -- лаба 
				on_scene("holding", end_level("_area_lab")),
				on_scene("miniscene_tiles", end_level("area_to_lab_for_hints")),
				on_scene("miniscene_tiles", end_level("_area_to_lab")),
				on_scene("miniscene_book", end_level("area_to_lab_book_for_hints")),
				on_scene("miniscene_book", end_level("_area_to_lab_book"))
			},
			miniscene_tiles = 
			{ -- фотко с табличками
				on_scene("laboratory", miniscene("_area_tiles")),
				IF(NOT(disabled("_area_tiles")), on_scene("laboratory", miniscene("_area_lamp02")))
			},
			miniscene_book =
			{ -- учебник химии
				IF(NOT(disabled("area_flag_tile_states2")), on_scene("laboratory", miniscene("_area_book")))
			}, 
			warehouse =
			{ -- хранилище
				on_scene("holding", end_level("_area_warehouse"))
			},
			miniscene_box =
			{ -- ящик
				IF(NOT(hidden("board_shifted")), on_scene("warehouse", miniscene("_area_box01")))
			},
			minisene_safe =
			{
				IF(state("Safe", "safe01"), on_scene("warehouse", miniscene("Safe")))
			}
		}),
        -- хинты хога
		hog_hints("chapter04_hog02"),
		hog_hints("chapter04_hog_big"),
		hog_hints("chapter04_hog_small"),
		
		-- отправка фотки на печать
		IF(disabled("area_button_print_clicked"), on_scene("miniscene_notebook", click("area_button"))),
		-- включаем принтер
		IF(state("Button_power", "power01"), on_scene("miniscene_printer", click("Button_power"))),
		on_scene("room", take("Paper", "_area_paper_")),
		on_scene("miniscene_printer", click("area_for_paper", "Paper")), -- заправили принтер бумагой
		on_scene("room", click("_area_printer", "Paper")), -- заправили принтер бумагой
		on_scene("miniscene_printer", take("Photo", "area_photo")), -- взяли фотку
		on_scene("laboratory", click("_area_lamp02", "Photo")), -- положили фото под лампу
		-- обнаруживаем закрытый сундук и идем искать ключ
		IF({disabled("area_chest_clicked"), hidden("chest_opened")}, on_scene("warehouse", click("_area_chest"))),
		IF(hidden("board_shifted"), on_scene("warehouse", click("_area_box01"))),
		on_scene("miniscene_box", take("Part_key02")),
		IF({disabled("area_clicked_aqua"), on_level("Part_key01")}, on_scene("room", click("_area_aqua"))), 
		on_scene("miniscene_table", take("Pen", "_area_pen")),
		on_scene("holding", click("_area_basket")),
		on_scene("holding", take("Glue")),
		IF({hidden("opened_shelf"), on_level("Thread")}, on_scene("holding", click("_area_shelf"))), -- открыли шкаф
		on_scene("holding", take("Thread")),
		on_scene("warehouse", take("Hook", "_area_hook")), -- взяли крючок, нить и ручку, получили удочку
		on_scene("room", click("_area_aqua", "Fishrod")),
		on_scene("room", click("_area_aqua_key", "Fishrod")),
		IF(in_inv("Fishrod"), on_scene("room", take("Part_key01"))), -- ключик склеился
		on_scene("warehouse", click("_area_chest", "Full_key")), -- открываем сундук
		on_scene("warehouse", minigame("_area_hog01")), -- нашли таблички
		IF(in_inv("Tiles"), on_scene("miniscene_tiles", click("area_photo_tiles", "Tiles"))),
		on_scene("laboratory", click("_area_tiles", "Tiles")),
		on_scene("laboratory", click("_area_lamp02", "Tiles")), -- положили таблички на стол и узнали, что их надо отчистить
		
		IF(NOT(hidden("table_with_tiles")), on_scene("holding", take("Rag"))),
		on_scene("room", click("_area_aqua", "Rag")),
		IF(in_inv("Rag"), on_scene("room", take("Wet_rag"))), -- берем тряпку и мочим ее
		IF({NOT(in_inv("Tiles"), NOT(on_level("Tiles")))}, on_scene("miniscene_tiles", {
			-- очищаем таблички
			-- тряпочкой 
			IF(state("Tile01", "01"), click("Tile01", "Wet_rag")),
			IF(state("Tile02", "01"), click("Tile02", "Wet_rag")),
			IF(state("Tile03", "01"), click("Tile03", "Wet_rag")),
			IF(state("Tile04", "01"), click("Tile04", "Wet_rag")),
			IF(state("Tile05", "01"), click("Tile05", "Wet_rag")),
			IF(state("Tile06", "01"), click("Tile06", "Wet_rag")),
			IF(state("Tile07", "01"), click("Tile07", "Wet_rag")),
			IF(state("Tile08", "01"), click("Tile08", "Wet_rag")),
			IF(state("Tile09", "01"), click("Tile09", "Wet_rag")),
			IF(state("Tile10", "01"), click("Tile10", "Wet_rag")),
			IF(state("Tile11", "01"), click("Tile11", "Wet_rag")),
			IF(state("Tile12", "01"), click("Tile12", "Wet_rag")),
			IF(state("Tile13", "01"), click("Tile13", "Wet_rag")),
			IF(state("Tile14", "01"), click("Tile14", "Wet_rag")),
			IF(state("Tile15", "01"), click("Tile15", "Wet_rag")),
			IF(state("Tile16", "01"), click("Tile16", "Wet_rag")),
			-- ваткой с раствором
			IF(state("Tile01", "02"), click("Tile01", "Wet_cotton")),
			IF(state("Tile02", "02"), click("Tile02", "Wet_cotton")),
			IF(state("Tile03", "02"), click("Tile03", "Wet_cotton")),
			IF(state("Tile04", "02"), click("Tile04", "Wet_cotton")),
			IF(state("Tile05", "02"), click("Tile05", "Wet_cotton")),
			IF(state("Tile06", "02"), click("Tile06", "Wet_cotton")),
			IF(state("Tile07", "02"), click("Tile07", "Wet_cotton")),
			IF(state("Tile08", "02"), click("Tile08", "Wet_cotton")),
			IF(state("Tile09", "02"), click("Tile09", "Wet_cotton")),
			IF(state("Tile10", "02"), click("Tile10", "Wet_cotton")),
			IF(state("Tile11", "02"), click("Tile11", "Wet_cotton")),
			IF(state("Tile12", "02"), click("Tile12", "Wet_cotton")),
			IF(state("Tile13", "02"), click("Tile13", "Wet_cotton")),
			IF(state("Tile14", "02"), click("Tile14", "Wet_cotton")),
			IF(state("Tile15", "02"), click("Tile15", "Wet_cotton")),
			IF(state("Tile16", "02"), click("Tile16", "Wet_cotton"))
		})),
		IF({NOT(on_level("Wet_cotton")), NOT(in_inv("Wet_cotton")), hidden("full_bg")}, on_scene("laboratory", minigame("_area_tiles"))),
		
		-- ищем бутыльки
		IF({NOT(disabled("area_flag_tile_states2")), disabled("area_flag_for_bottles")}, on_scene("laboratory", click("_area_book"))),
		IF(NOT(disabled("area_flag_for_bottles")), on_scene("laboratory", { -- собираем бутыльки
			minigame("_area_hog02"),
			take("Red01", "_area_bottle03"),
			take("Green02", "_area_bottle02"),
			take("Green01", "_area_bottle01"),
			IF({disabled("_area_bottle01"), on_level("Green01")}, click("area_chair_for_hint"))
		})),
		on_scene("laboratory", click("_area_scales", "All_bottles")), -- взвешиваем 
		on_scene("laboratory", click("_area_powder", "Portions")), 
		on_scene("laboratory", click("_area_powder", "Cotton")), 
		IF(hidden("Cotton"), on_scene("laboratory", click("_area_door10"))), -- открываем дверку, за которой вата
		IF({NOT(on_level("Portions")), NOT(in_inv("Portions"))}, on_scene("laboratory",take("Cotton"))),
		on_scene("laboratory", click("_area_powder", "Cotton")), -- взяли смоченную вату
		IF(in_inv("Cotton"), on_scene("laboratory", take("Wet_cotton"))),
		
		
		on_scene("laboratory", {
			-- открываем дверь
			take("Paper_single"),
			click("_area_lab_holding", "Paper_single"),
			IF(NOT(hidden("closed_door")), take("Wire")),
			click("_area_lab_holding", "Wire"),
			click("_area_paper_under_door"),
			take("Lab_key", "_area_paper_near_door"),
			click("_area_lab_holding", "Lab_key"), -- ура, дверь открыта!
			
			-- фотаем
			IF(in_inv("SD"), click("_area_camera", "SD")),
			IF({NOT(hidden("full_bg")), NOT(hidden("photo_lamp")), on_level("SD_photo")}, click("_area_camera")),
			IF(NOT(hidden("camera_flash")), take("SD_photo", "_area_camera"))
		}),
		IF({NOT(in_inv("Photo")), NOT(on_level("Photo"))}, on_scene("miniscene_printer", take("SD"))),
		on_scene("warehouse",{
			IF(NOT(hidden("table_with_tiles")), click("_area_picture_up")), -- опускаем картину
			minigame("_area_hog03"),
			IF(state("Safe", "safe02"), take("CD", "Safe")),
			IF({on_level("CD"), state("Safe", "safe01")}, minigame("Safe")),
			IF({on_level("CD"), state("Safe", "safe01")}, click("Safe", "Plate"))
		}),
		on_scene("miniscene_safe", {
			click("_area_for_plate", "Plate")
		}),
		on_scene("miniscene_table", {
			IF({hidden("cdrom_open"), hidden("cdrom_disk_in"), hidden("cdrom_closed")}, click("_area_cd")),
			IF(hidden("cdrom_disk_in"), click("_area_cd", "CD")),
			IF(hidden("cdrom_closed"), click("_area_cd"))			
		}),
		on_scene("miniscene_notebook", {
			IF(NOT(hidden("cdrom_closed")), click("area_notebook01", "SD_photo")),
			IF(NOT(hidden("cdrom_closed")), click("area_button_dec", "SD_photo")),
			IF(NOT(hidden("cdrom_closed")), click("area_ok01", "SD_photo")),
			IF(NOT(hidden("cdrom_closed")), click("area_cancel01", "SD_photo")),
			IF(NOT(hidden("Button_ok02")), click("_area_ok02")),
		}),
		
		on_scene("miniscene_table", IF(NOT(hidden("cdrom_closed")), click("_area_comp", "SD_photo")))
	}
end 