//===== Athena Script ========================================
//= Thanatos Tower Warp Script
//===== By: ==================================================
//= Bibilol & Moryagorn  (1.0)
//===== Current Version: =====================================
//= 1.6
//===== Compatible With: =====================================
//= Any Athena Version; RO Episode 10+
//===== Description: =========================================
//= Warp Points for Thanatos Tower
//===== Additional Comments: =================================
//= It's just Temp warps [Lupus]
//= 1.2 Updated to level tha_t12
//= 1.3 Some warps changes due to official info [Justin84]
//= 1.4 Fixed 2 warps [Justin84]
//= 1.5 Added Thanatos entrance warp. Now you can go in [Justin84]
//= 1.6 Fixed warps: tha_t06,tha_t06a,tha_t06b,tha_t05a
//=	Added Temp Keys solution [Justin84]
//============================================================

// Affiliated Files : tha_statues.txt
// ^^^^ it's in the custom quests

//Hugel Field 01 -> Thanatos Scene 01
hu_fild01,139,164,0	script	Thanatos Tower Warper	111,{
	mes "[Thanatos Tower Warper]";
	mes "There is no turning back.";
	mes "Are you sure want to go Thanatos Tower?";
	next;
	menu "Yes",-,"No",T_CLOSE;

	warp "tha_scene01",131,224;
	end;

T_CLOSE:
	close;
}

//Thanatos Scene 01 -> Thantos Tower F1
tha_scene01,144,200,0	warp	tha_scene01	1,1,tha_t01,150,39
tha_t01,150,32,0	warp	tha_scene02	1,1,tha_scene01,142,200

//Thanatos Tower
tha_scene01,144,200,0	warp	tha_scene03	1,1,tha_t01,150,39
tha_t01,150,32,0	warp	tha_scene04	1,1,tha_scene01,142,200
tha_t01,150,149,0	warp	tha_t02	1,1,tha_t02,150,136
tha_t02,150,129,0	warp	tha_t01	1,1,tha_t01,150,142
tha_t02,226,161,0	warp	tha_t03	1,1,tha_t03,220,158
tha_t03,220,165,0	warp	tha_t02a	1,1,tha_t02,226,149
tha_t03,60,134,0	warp	tha_t04	1,1,tha_t04,59,143
tha_t04,59,136,0	warp	tha_t03a	1,1,tha_t03,59,126
tha_t04,83,36,0	warp	tha_t05	1,1,tha_t05,62,11
//According to official info, 5F it is not possible to return to the 4F, so we disable this warp:
//tha_t05,62,4,0	warp	tha_t04a	1,1,tha_t04,90,34
tha_t05,208,96,0	warp	tha_t06	1,1,tha_t06,206,8
tha_t05,185,232,0	warp	tha_t06a	1,1,tha_t06,206,8
tha_t05,61,157,0	warp	tha_t06b	1,1,tha_t06,206,8
tha_t06,206,5,0	warp	tha_t05a	1,1,tha_t05,61,164

//tha_t06,119,120,0	warp	tha_t07	1,1,tha_t07,35,166
//Thanatos 6F to 7F
tha_t06,119,120,4	script	tha_t07warp	45,2,2,{
	mes "You have to gather 4 types of keys to enter the 7th Floor.";
	mes "Give me the key of red, yellow, blue & green.";
	next;
	menu "Give the keys",-,"Leave",T_CLOSE;

	if(countitem(7421) < 1 || countitem(7422) < 1 || countitem(7423) < 1 || countitem(7424) < 1) goto T_1;
	delitem 7421,1;
	delitem 7422,1;
	delitem 7423,1;
	delitem 7424,1;
	warp "tha_t07",35,166;
	end;

T_1:
	mes "You don't have enough keys.";
T_CLOSE:
	close;
}


tha_t07,28,166,0	warp	tha_t06c	1,1,tha_t06,119,127
tha_t07,112,166,0	warp	tha_t08	1,1,tha_t08,105,44
tha_t08,112,44,0	warp	tha_t07b	1,1,tha_t07,105,166
tha_t08,26,44,0	warp	tha_t09	1,1,tha_t09,88,145
tha_t09,93,145,0	warp	tha_t08	1,1,tha_t08,30,44
tha_t10,171,138,0	warp	tha_t09	1,1,tha_t09,18,97
tha_t11,93,36,0	warp	tha_t10	1,1,tha_t10,91,130
tha_t12,129,51,0	warp	tha_t11	1,1,tha_t11,13,38

//Thana_step
thana_step,12,73,0	warp	thana_step1	1,1,tha_t12,128,58
thana_step,16,16,0	warp	thana_step2	1,1,thana_step,32,224
thana_step,30,224,0	warp	thana_step3	1,1,thana_step,19,16
thana_step,32,166,0	warp	thana_step4	1,1,thana_step,184,74
thana_step,180,74,0	warp	thana_step5	1,1,thana_step,36,166
thana_step,182,16,0	warp	thana_step6	1,1,thana_step,184,224
thana_step,180,224,0	warp	thana_step7	1,1,thana_step,185,16
thana_step,182,166,0	warp	thana_step8	1,1,thana_step,73,287
thana_step,69,287,0	warp	thana_step9	1,1,thana_step,186,166
thana_step,70,371,0	warp	thana_step10	1,1,thana_step,170,287
thana_step,174,287,0	warp	thana_step11	1,1,thana_step,74,371

//Thana_boss
thana_step,169,371,0	warp	thana_boss	1,1,thana_boss,85,76
thana_boss,80,76,0	warp	thana_step9	1,1,thana_step,163,371
thana_boss,62,171,0	warp	thana_step10	1,1,thana_step,163,371
thana_boss,141,217,0	warp	thana_step11	1,1,thana_step,163,371
thana_boss,202,75,0	warp	thana_step12	1,1,thana_step,163,371

//Temp Plug for KEYS
tha_t03,139,46,0	script	#TanKey1	111,{
	if(countitem(7421) < 1) getitem 7421,1;
	end;
}

tha_t03,67,70,0	script	#TanKey2	111,{
	if(countitem(7421) < 1) end;
	delitem 7421,1;
	getitem 7426,1;
	end;
}

tha_t03,48,143,0	script	#TanKey3	111,{
	if(countitem(7422) < 1) getitem 7422,1;
	end;
}

tha_t03,66,208,0	script	#TanKey4	111,{
	if(countitem(7422) < 1) end;
	delitem 7422,1;
	getitem 7427,1;
	end;
}

tha_t03,139,230,0	script	#TanKey5	111,{
	if(countitem(7423) < 1) getitem 7423,1;
	end;
}

tha_t03,208,208,0	script	#TanKey6	111,{
	if(countitem(7423) < 1) end;
	delitem 7423,1;
	getitem 7428,1;
	end;
}

tha_t03,230,143,0	script	#TanKey7	111,{
	if(countitem(7424) < 1) getitem 7424,1;
	end;
}

tha_t03,207,70,0	script	#TanKey8	111,{
	if(countitem(7424) < 1) end;
	delitem 7424,1;
	getitem 7429,1;
	end;
}