local dimension = {
	{itemid = 13643, position = Position(33639,32718, 12)},
	{itemid = 13643, position = Position(33638,32715, 12)},
	{itemid = 13643, position = Position(33645,32715, 12)},
	{itemid = 13643, position = Position(33644,32727, 12)},
	{itemid = 13643, position = Position(33637,32725, 12)},
	{itemid = 13643, position = Position(33639,32713, 12)},
	{itemid = 13643, position = Position(33638,32727, 12)},
	{itemid = 13643, position = Position(33647,32726, 12)},
	{itemid = 13643, position = Position(33641,32714, 12)},
	{itemid = 13643, position = Position(33643,32720, 12)},
	{itemid = 13643, position = Position(33644,32722, 12)},
	{itemid = 13643, position = Position(33636,32717, 12)},
	{itemid = 13643, position = Position(33636,32718, 12)},
	{itemid = 13643, position = Position(33636,32724, 12)},
	{itemid = 13643, position = Position(33646,32726, 12)},
	{itemid = 13642, position = Position(33637,32719, 12)},
	{itemid = 13642, position = Position(33638,32721, 12)},
	{itemid = 13642, position = Position(33639,32716, 12)},
	{itemid = 13642, position = Position(33636,32726, 12)},
	{itemid = 13642, position = Position(33637,32720, 12)},
	{itemid = 13642, position = Position(33644,32721, 12)},
	{itemid = 13642, position = Position(33645,32724, 12)},
	{itemid = 13642, position = Position(33645,32716, 12)},
	{itemid = 13642, position = Position(33640,32712, 12)},
	{itemid = 13641, position = Position(33646,32723, 12)},
	{itemid = 13641, position = Position(33646,32722, 12)},
	{itemid = 13641, position = Position(33648,32727, 12)},
	{itemid = 13641, position = Position(33647,32716, 12)},
	{itemid = 13641, position = Position(33644,32719, 12)},
	{itemid = 13641, position = Position(33644,32715, 12)},
	{itemid = 13641, position = Position(33642,32713, 12)},
	{itemid = 13641, position = Position(33637,32726, 12)},
	{itemid = 13641, position = Position(33641,32718, 12)},
	{itemid = 13641, position = Position(33645,32720, 12)},
	{itemid = 13641, position = Position(33640,32716, 12)},
	{itemid = 13641, position = Position(33639,32726, 12)},
	{itemid = 13641, position = Position(33635,32723, 12)},
	{itemid = 13641, position = Position(33638,32722, 12)},
	{itemid = 13641, position = Position(33648,32715, 12)},
	{itemid = 13641, position = Position(33648,32713, 12)},
	{itemid = 13641, position = Position(33635,32719, 12)},
	{itemid = 13641, position = Position(33648,32712, 12)},
	{itemid = 13641, position = Position(33634,32722, 12)},
	{itemid = 13640, position = Position(33643,32725, 12)},
	{itemid = 13640, position = Position(33639,32724, 12)},
	{itemid = 13640, position = Position(33639,32712, 12)},
	{itemid = 13640, position = Position(33645,32723, 12)},
	{itemid = 13640, position = Position(33644,32724, 12)},
	{itemid = 13640, position = Position(33641,32725, 12)},
	{itemid = 13639, position = Position(33640,32722, 12)},
	{itemid = 13639, position = Position(33640,32719, 12)},
	{itemid = 13639, position = Position(33645,32722, 12)},
	{itemid = 13639, position = Position(33636,32725, 12)},
	{itemid = 13639, position = Position(33643,32715, 12)},
	{itemid = 13639, position = Position(33638,32723, 12)},
	{itemid = 13639, position = Position(33637,32718, 12)},
	{itemid = 13639, position = Position(33646,32727, 12)},
	{itemid = 13639, position = Position(33634,32723, 12)},
	{itemid = 13639, position = Position(33638,32725, 12)},
	{itemid = 13639, position = Position(33648,32714, 12)},
	{itemid = 13639, position = Position(33640,32726, 12)},
	{itemid = 13639, position = Position(33641,32713, 12)},
	{itemid = 13639, position = Position(33641,32712, 12)},
	{itemid = 13639, position = Position(33641,32722, 12)},
	{itemid = 13639, position = Position(33637,32724, 12)},
	{itemid = 13639, position = Position(33642,32726, 12)},
	{itemid = 13639, position = Position(33643,32721, 12)},
	{itemid = 13639, position = Position(33637,32723, 12)},
	{itemid = 13639, position = Position(33643,32717, 12)},
	{itemid = 13638, position = Position(33648,32725, 12)},
	{itemid = 13638, position = Position(33645,32725, 12)},
	{itemid = 13638, position = Position(33635,32724, 12)},
	{itemid = 13638, position = Position(33642,32727, 12)},
	{itemid = 13638, position = Position(33642,32725, 12)},
	{itemid = 13638, position = Position(33638,32716, 12)},
	{itemid = 13638, position = Position(33647,32715, 12)},
	{itemid = 13638, position = Position(33642,32722, 12)},
	{itemid = 13638, position = Position(33635,32718, 12)},
	{itemid = 13638, position = Position(33644,32718, 12)},
	{itemid = 13638, position = Position(33640,32718, 12)},
	{itemid = 13638, position = Position(33637,32717, 12)},
	{itemid = 13637, position = Position(33638,32719, 12)},
	{itemid = 13637, position = Position(33638,32717, 12)},
	{itemid = 13637, position = Position(33638,32720, 12)},
	{itemid = 13637, position = Position(33640,32717, 12)},
	{itemid = 13637, position = Position(33645,32727, 12)},
	{itemid = 13637, position = Position(33641,32721, 12)},
	{itemid = 13637, position = Position(33644,32716, 12)},
	{itemid = 13637, position = Position(33641,32727, 12)},
	{itemid = 13637, position = Position(33639,32714, 12)},
	{itemid = 13637, position = Position(33645,32714, 12)},
	{itemid = 13637, position = Position(33645,32721, 12)},
	{itemid = 13637, position = Position(33648,32716, 12)},
	{itemid = 13637, position = Position(33639,32719, 12)},
	{itemid = 13637, position = Position(33639,32721, 12)},
	{itemid = 13637, position = Position(33646,32715, 12)},
	{itemid = 13637, position = Position(33639,32720, 12)},
	{itemid = 13637, position = Position(33647,32725, 12)},
	{itemid = 13636, position = Position(33639,32727, 12)},
	{itemid = 13636, position = Position(33636,32727, 12)},
	{itemid = 13636, position = Position(33647,32714, 12)},
	{itemid = 13636, position = Position(33644,32717, 12)},
	{itemid = 13636, position = Position(33640,32713, 12)},
	{itemid = 13636, position = Position(33640,32714, 12)},
	{itemid = 13636, position = Position(33639,32725, 12)},
	{itemid = 13636, position = Position(33639,32722, 12)},
	{itemid = 13636, position = Position(33640,32725, 12)},
	{itemid = 13636, position = Position(33639,32723, 12)},
	{itemid = 13636, position = Position(33635,32727, 12)},
	{itemid = 13636, position = Position(33647,32724, 12)},
	{itemid = 13636, position = Position(33641,32726, 12)},
	{itemid = 13636, position = Position(33646,32724, 12)},
	{itemid = 13636, position = Position(33647,32713, 12)},
	{itemid = 13636, position = Position(33636,32719, 12)},
	{itemid = 13636, position = Position(33644,32725, 12)},
	{itemid = 13636, position = Position(33644,32726, 12)},
	{itemid = 13636, position = Position(33636,32720, 12)},
	{itemid = 13636, position = Position(33640,32715, 12)},
	{itemid = 13636, position = Position(33644,32723, 12)},
	{itemid = 13636, position = Position(33648,32717, 12)},
	{itemid = 13636, position = Position(33644,32720, 12)},
	{itemid = 13636, position = Position(33648,32726, 12)},
	{itemid = 13636, position = Position(33645,32717, 12)},
	{itemid = 13636, position = Position(33646,32725, 12)},
	{itemid = 13636, position = Position(33645,32726, 12)},
	{itemid = 13636, position = Position(33646,32716, 12)},
	{itemid = 13636, position = Position(33646,32721, 12)},
	{itemid = 13636, position = Position(33638,32724, 12)},
	{itemid = 13636, position = Position(33647,32727, 12)},
	{itemid = 13636, position = Position(33638,32726, 12)},
	{itemid = 13636, position = Position(33646,32714, 12)},
	{itemid = 13636, position = Position(33643,32716, 12)},
	{itemid = 13636, position = Position(33638,32718, 12)},
	{itemid = 13636, position = Position(33635,32725, 12)},
	{itemid = 13636, position = Position(33637,32727, 12)},
	{itemid = 13636, position = Position(33638,32714, 12)},
	{itemid = 13636, position = Position(33643,32723, 12)},
	{itemid = 13636, position = Position(33643,32722, 12)},
	{itemid = 13636, position = Position(33640,32727, 12)},
	{itemid = 13636, position = Position(33639,32715, 12)},
	{itemid = 13636, position = Position(33634,32724, 12)},
	{itemid = 13636, position = Position(33642,32714, 12)},
	{itemid = 13636, position = Position(33642,32715, 12)},
	{itemid = 13636, position = Position(33639,32717, 12)},
	{itemid = 13636, position = Position(33642,32721, 12)},
	{itemid = 13636, position = Position(33643,32727, 12)},
	{itemid = 13636, position = Position(33643,32726, 12)},
	{itemid = 13631, position = Position(33634,32726, 12)},
	{itemid = 13631, position = Position(33634,32720, 12)},
	{itemid = 13631, position = Position(33637,32712, 12)},
	{itemid = 13631, position = Position(33635,32721, 12)},
	{itemid = 13631, position = Position(33642,32724, 12)},
	{itemid = 13631, position = Position(33647,32718, 12)},
	{itemid = 13630, position = Position(33646,32718, 12)},
	{itemid = 13630, position = Position(33648,32722, 12)},
	{itemid = 13629, position = Position(33643,32712, 12)},
	{itemid = 13629, position = Position(33648,32723, 12)},
	{itemid = 13629, position = Position(33648,32721, 12)},
	{itemid = 13629, position = Position(33634,32716, 12)},
	{itemid = 13629, position = Position(33647,32720, 12)},
	{itemid = 13629, position = Position(33641,32724, 12)},
	{itemid = 13629, position = Position(33635,32721, 12)},
	{itemid = 13629, position = Position(33636,32722, 12)},
	{itemid = 13629, position = Position(33646,32719, 12)},
	{itemid = 13628, position = Position(33646,32712, 12)},
	{itemid = 13628, position = Position(33636,32722, 12)},
	{itemid = 13628, position = Position(33634,32726, 12)},
	{itemid = 13628, position = Position(33642,32724, 12)},
	{itemid = 13628, position = Position(33644,32713, 12)},
	{itemid = 13628, position = Position(33635,32716, 12)},
	{itemid = 13628, position = Position(33637,32713, 12)},
	{itemid = 13627, position = Position(33635,32720, 12)},
	{itemid = 13627, position = Position(33637,32721, 12)},
	{itemid = 13627, position = Position(33634,32725, 12)},
	{itemid = 13627, position = Position(33643,32724, 12)},
	{itemid = 13627, position = Position(33647,32717, 12)},
	{itemid = 13627, position = Position(33638,32712, 12)},
	{itemid = 13627, position = Position(33642,32723, 12)},
	{itemid = 13627, position = Position(33635,32726, 12)},
	{itemid = 13627, position = Position(33634,32718, 12)},
	{itemid = 13626, position = Position(33640,32723, 12)},
	{itemid = 13626, position = Position(33647,32722, 12)},
	{itemid = 13626, position = Position(33645,32718, 12)},
	{itemid = 13626, position = Position(33646,32717, 12)},
	{itemid = 13625, position = Position(33642,32712, 12)},
	{itemid = 13625, position = Position(33648,32724, 12)},
	{itemid = 13625, position = Position(33646,32720, 12)},
	{itemid = 13625, position = Position(33647,32723, 12)},
	{itemid = 13625, position = Position(33640,32724, 12)},
	{itemid = 13625, position = Position(33634,32717, 12)},
	{itemid = 13625, position = Position(33643,32714, 12)},
	{itemid = 13625, position = Position(33647,32721, 12)},
	{itemid = 13625, position = Position(33636,32723, 12)},
	{itemid = 13625, position = Position(33645,32719, 12)},
	{itemid = 13625, position = Position(33635,32722, 12)},
	{itemid = 13624, position = Position(33637,32716, 12)},
	{itemid = 13624, position = Position(33638,32713, 12)},
	{itemid = 13624, position = Position(33634,32727, 12)},
	{itemid = 13624, position = Position(33637,32722, 12)},
	{itemid = 13624, position = Position(33644,32714, 12)},
	{itemid = 13624, position = Position(33647,32712, 12)},
	{itemid = 13624, position = Position(33646,32713, 12)},
	{itemid = 13624, position = Position(33635,32717, 12)},
	{itemid = 13623, position = Position(33643,32713, 12)},
	{itemid = 13622, position = Position(33636,32723, 12)},
	{itemid = 13622, position = Position(33637,32714, 12)},
	{itemid = 13622, position = Position(33637,32715, 12)},
	{itemid = 13622, position = Position(33634,32719, 12)},
	{itemid = 13621, position = Position(33648,32718, 12)},
	{itemid = 13621, position = Position(33641,32723, 12)},
	{itemid = 13621, position = Position(33636,32721, 12)},
	{itemid = 13620, position = Position(33636,32716, 12)},
	{itemid = 13620, position = Position(33645,32713, 12)},
	{itemid = 13620, position = Position(33643,32724, 12)},
	{itemid = 13620, position = Position(33642,32724, 12)},
	{itemid = 13620, position = Position(33634,32721, 12)},
	{itemid = 13620, position = Position(33641,32724, 12)},
	{itemid = 13620, position = Position(33635,32726, 12)},
	{itemid = 13619, position = Position(33641,32717, 12)},
	{itemid = 13619, position = Position(33641,32715, 12)},
	{itemid = 13619, position = Position(33642,32717, 12)},
	{itemid = 13619, position = Position(33641,32716, 12)},
	{itemid = 13619, position = Position(33642,32716, 12)},
	{itemid = 13618, position = Position(33639,32716, 12)},
	{itemid = 13618, position = Position(33639,32712, 12)},
	{itemid = 13617, position = Position(33643,32717, 12)},
	{itemid = 13617, position = Position(33644,32716, 12)},
	{itemid = 13616, position = Position(33644,32715, 12)},
	{itemid = 13616, position = Position(33642,32713, 12)},
	{itemid = 13615, position = Position(33639,32715, 12)},
	{itemid = 13615, position = Position(33640,32714, 12)},
	{itemid = 13614, position = Position(33642,32715, 12)},
	{itemid = 13614, position = Position(33641,32712, 12)},
	{itemid = 13613, position = Position(33640,32715, 12)},
	{itemid = 13613, position = Position(33641,32714, 12)},
	{itemid = 13612, position = Position(33643,32716, 12)},
	{itemid = 13611, position = Position(33640,32712, 12)},
	{itemid = 13611, position = Position(33640,32716, 12)},
	{itemid = 13611, position = Position(33641,32713, 12)},
	{itemid = 13610, position = Position(33642,32714, 12)},
	{itemid = 13607, position = Position(33643,32715, 12)},
	{itemid = 13479, position = Position(33641,32717, 12)},
	{itemid = 13479, position = Position(33646,32720, 12)},
	{itemid = 13477, position = Position(33642,32724, 12)},
	{itemid = 13476, position = Position(33636,32722, 12)},
	{itemid = 11560, position = Position(33639,32722, 12)},
	{itemid = 11559, position = Position(33641,32722, 12)},
	{itemid = 11559, position = Position(33644,32720, 12)},
	{itemid = 11559, position = Position(33643,32721, 12)},
	{itemid = 11558, position = Position(33644,32717, 12)},
	{itemid = 11557, position = Position(33639,32719, 12)},
	{itemid = 11557, position = Position(33640,32718, 12)},
	{itemid = 11557, position = Position(33641,32717, 12)},
	{itemid = 11555, position = Position(33640,32719, 12)},
	{itemid = 11555, position = Position(33641,32718, 12)},
	{itemid = 11554, position = Position(33643,32720, 12)},
	{itemid = 11554, position = Position(33641,32721, 12)},
	{itemid = 11552, position = Position(33644,32719, 12)},
	{itemid = 11552, position = Position(33644,32718, 12)},
	{itemid = 11551, position = Position(33642,32721, 12)},
	{itemid = 11551, position = Position(33640,32722, 12)},
	{itemid = 11550, position = Position(33639,32720, 12)},
	{itemid = 11550, position = Position(33639,32721, 12)},
	{itemid = 11549, position = Position(33643,32717, 12)},
	{itemid = 11549, position = Position(33642,32717, 12)},
	{itemid = 11548, position = Position(33642, 32718, 12)},
	{itemid = 11548, position = Position(33643, 32718, 12)},
	{itemid = 11548, position = Position(33641, 32719, 12)},
	{itemid = 11548, position = Position(33642, 32719, 12)},
	{itemid = 11548, position = Position(33643, 32719, 12)},
	{itemid = 11548, position = Position(33640, 32720, 12)},
	{itemid = 11548, position = Position(33641, 32720, 12)},
	{itemid = 11548, position = Position(33642, 32720, 12)},
	{itemid = 11548, position = Position(33640, 32721, 12)},
	{itemid = 414, position = Position(33635,32716, 12)},
	{itemid = 414, position = Position(33635,32720, 12)},
	{itemid = 414, position = Position(33647,32720, 12)},
	{itemid = 414, position = Position(33635,32721, 12)},
	{itemid = 414, position = Position(33635,32726, 12)},
	{itemid = 414, position = Position(33647,32721, 12)},
	{itemid = 414, position = Position(33635,32713, 12)},
	{itemid = 414, position = Position(33636,32712, 12)},
	{itemid = 414, position = Position(33647,32723, 12)},
	{itemid = 414, position = Position(33647,32719, 12)},
	{itemid = 414, position = Position(33635,32717, 12)},
	{itemid = 414, position = Position(33647,32718, 12)},
	{itemid = 414, position = Position(33635,32715, 12)},
	{itemid = 414, position = Position(33647,32717, 12)},
	{itemid = 414, position = Position(33635,32714, 12)},
	{itemid = 414, position = Position(33635,32722, 12)},
	{itemid = 414, position = Position(33647,32722, 12)},
	{itemid = 414, position = Position(33635,32712, 12)},
	{itemid = 414, position = Position(33634,32720, 12)},
	{itemid = 414, position = Position(33634,32726, 12)},
	{itemid = 414, position = Position(33634,32715, 12)},
	{itemid = 414, position = Position(33648,32722, 12)},
	{itemid = 414, position = Position(33634,32716, 12)},
	{itemid = 414, position = Position(33648,32721, 12)},
	{itemid = 414, position = Position(33648,32723, 12)},
	{itemid = 414, position = Position(33648,32724, 12)},
	{itemid = 414, position = Position(33634,32714, 12)},
	{itemid = 414, position = Position(33634,32713, 12)},
	{itemid = 414, position = Position(33634,32727, 12)},
	{itemid = 414, position = Position(33634,32717, 12)},
	{itemid = 414, position = Position(33648,32719, 12)},
	{itemid = 414, position = Position(33634,32721, 12)},
	{itemid = 414, position = Position(33634,32725, 12)},
	{itemid = 414, position = Position(33648,32720, 12)},
	{itemid = 414, position = Position(33636,32713, 12)},
	{itemid = 414, position = Position(33634,32718, 12)},
	{itemid = 414, position = Position(33634,32719, 12)},
	{itemid = 414, position = Position(33648,32718, 12)},
	{itemid = 414, position = Position(33636,32714, 12)},
	{itemid = 414, position = Position(33646,32713, 12)},
	{itemid = 414, position = Position(33647,32712, 12)},
	{itemid = 414, position = Position(33641,32723, 12)},
	{itemid = 414, position = Position(33641,32724, 12)},
	{itemid = 414, position = Position(33642,32712, 12)},
	{itemid = 414, position = Position(33645,32712, 12)},
	{itemid = 414, position = Position(33645,32713, 12)},
	{itemid = 414, position = Position(33640,32724, 12)},
	{itemid = 414, position = Position(33640,32723, 12)},
	{itemid = 414, position = Position(33645,32718, 12)},
	{itemid = 414, position = Position(33644,32714, 12)},
	{itemid = 414, position = Position(33644,32712, 12)},
	{itemid = 414, position = Position(33643,32713, 12)},
	{itemid = 414, position = Position(33643,32714, 12)},
	{itemid = 414, position = Position(33644,32713, 12)},
	{itemid = 414, position = Position(33643,32712, 12)},
	{itemid = 414, position = Position(33642,32723, 12)},
	{itemid = 414, position = Position(33642,32724, 12)},
	{itemid = 414, position = Position(33643,32724, 12)},
	{itemid = 414, position = Position(33636,32715, 12)},
	{itemid = 414, position = Position(33645,32719, 12)},
	{itemid = 414, position = Position(33638,32713, 12)},
	{itemid = 414, position = Position(33637,32712, 12)},
	{itemid = 414, position = Position(33637,32713, 12)},
	{itemid = 414, position = Position(33637,32714, 12)},
	{itemid = 414, position = Position(33636,32723, 12)},
	{itemid = 414, position = Position(33636,32721, 12)},
	{itemid = 414, position = Position(33636,32722, 12)},
	{itemid = 414, position = Position(33636,32716, 12)},
	{itemid = 414, position = Position(33646,32712, 12)},
	{itemid = 414, position = Position(33646,32720, 12)},
	{itemid = 414, position = Position(33646,32719, 12)},
	{itemid = 414, position = Position(33637,32722, 12)},
	{itemid = 414, position = Position(33638,32712, 12)},
	{itemid = 414, position = Position(33637,32715, 12)},
	{itemid = 414, position = Position(33646,32717, 12)},
	{itemid = 414, position = Position(33646,32718, 12)},
	{itemid = 414, position = Position(33637,32721, 12)},
	{itemid = 414, position = Position(33637,32716, 12)},
	{itemid = 414, position = Position(33634,32712, 12)},
	{itemid = 13608, position = Position(33640,32718, 12)},
	{itemid = 13608, position = Position(33640,32717, 12)}
}

local function transformArea()
	for x = 33634, 33648 do
		for y = 32712, 32727 do
			local position = Position(x, y, 12)
			local tile = Tile(position)
			if not tile then
				return
			end
			local ground = tile:getGround()
			if not ground then
				return
			end
			local grounds = ground:getId()
			local items = tile:getItems()
			if items then
				for i = 1, #items do
					local item = items[i]
					if item then
						item:remove()
					end
				end
			end
			ground:remove()
		end
	end
	for i = 1, #dimension do
		local item = dimension[i]
		local ground = Tile(item.position):getGround()
		local transformid = item.itemid
		local tp = Game.createItem(item.itemid, 1, item.position)
	end
	return true
end

local ferumbrasAscendantHabitatDimension = Action()
function ferumbrasAscendantHabitatDimension.onUse(player, item, fromPosition, target, toPosition, isHotkey)
	if item.itemid == 10044 then
		if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Dimension) >= 1 then
			player:say('The lever are stucke, need some time to it can be moveable again.', TALKTYPE_MONSTER_SAY)
			return true
		end
		Game.createMonster('lovely souleater', Position(33642, 32722, 12), true, true)
		addEvent(transformArea, 2 * 1000)
		item:transform(10045)
		local basin = Tile(Position(33631, 32721, 12)):getItemById(12070)
		if basin then
			basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA)
			basin:transform(24852)
		end
		Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Dimension, 1)
		Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats, Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) + 1)
		player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'The room transforms into a completely different landscape.')
		if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) >= 8 then
			addEvent(functionRevert, 1 * 60 * 60 * 1000)
		end
	elseif item.itemid == 10045 then
		item:transform(10044)
	end
	return true
end

ferumbrasAscendantHabitatDimension:aid(34312)
ferumbrasAscendantHabitatDimension:register()