//===== eAthena Script ================
//= Kafras in Dungeons and Fields
//===== By: ============================
//= eAthena Dev Team
//===== Current Version: =======================
//= 2.1b
//===== Compatible With: ============================
//= eAthena 1.0
//===== Description: ============================================
//= Description of argument settings for callfunc "F_Kafra".
//=  arg(0): When set at 0 the default Kafra message is displayed.
//=    When set to 1 the Niflhiem Kafra message is displayed.
//=    When set to 2 the Guild Kafra message is displayed. 
//=  arg(1): Set to 1 to disable teleport menu option.  Otherwise set to 0.
//=  arg(2): Set to 1 to disable info menu.  Otherwise set to 0.
//===== Additional Comments: =================================
//= v1.1 Now using functions. Added teleport service for Orc Dungeon
//= and Coal Mine Kafras.
//= v2.1 Fixed bug with Merc job quest kafra.[Lupus]
//= v2.1b Minor changes to function calls.  Using arguments.
//= Added ant hell kafras.  This version uses arrays .[kobra_k88]
//===============================================================


//<============================= Ant Hell ==============================>\\
// Mocfild04 -----------------------------------------
moc_fild04.gat,230,329,3	script	Kafra	115,{

	cutin "kafra_03",2;
	callfunc "F_Kafra",0,1,1;

	M_Save:
		savepoint "moc_fild04.gat",231,339;
		callfunc "F_KafEnd",0,1;
}

// Mocfild15 --------------------------------------------
moc_fild15.gat,264,260,3	script	Kafra	115,{

	cutin "kafra_03",2;
	callfunc "F_Kafra",0,1,1;

	M_Save:
		savepoint "moc_fild15.gat",266,271;
		callfunc "F_KafEnd",0,1;
}

//<============================= Byalan Island ============================>\\
izlu2dun.gat,106,58,8	script	Kafra	115,{

	cutin "kafra_03",2;
	if(Class==Job_Novice && job_merchant_q3>0) callfunc "F_MercKafra";  //F_MercKafra found in merchant.txt
	callfunc "F_Kafra",0,1,1;

	M_Save:
		savepoint "izlu2dun.gat",87,170;
		callfunc "F_KafEnd",0,1;
}


//<============================ Culvert Sewers ============================>\\
prt_fild05.gat,290,224,1	script	Kafra	114,{
	cutin "kafra_04",2;
	callfunc "F_Kafra",0,1,1;

	M_Save:
		savepoint "prt_fild05.gat",274,243;
		callfunc "F_KafEnd",0,1;
}


//<=========================== Coal Mine (Dead Pitt) =======================>\\
mjolnir_02.gat,83,361,4	script	Kafra	114,{
	cutin "kafra_04",2;
	callfunc "F_KafSetOrcCoal";
	callfunc "F_Kafra",0,0,1;

	M_Save:
		savepoint "mjolnir_02.gat",98,352;
		callfunc "F_KafEnd",0,1;
}


//<=============================== Morroc Ruins ============================>\\
moc_ruins.gat,61,156,5	script	Kafra	114,{
	cutin "kafra_04",2;
	callfunc "F_Kafra",0,1,1;

	M_Save:
		savepoint "moc_ruins.gat",41,141;
		callfunc "F_KafEnd",0,1;
}


//<================================ Orc Dungeon ============================>\\
gef_fild10.gat,73,340,4	script	Kafra	115,{
	cutin "kafra_02",2;
	callfunc "F_KafSetOrcCoal";
	callfunc "F_Kafra",0,0,1;

	M_Save:
		savepoint "gef_fild10.gat",54,326;
		callfunc "F_KafEnd",0,1;
}

// Function: Sets variables for Kafras at the Orc Dungeon and the Coal Mines
function	script	F_KafSetOrcCoal	{
	setarray @wrpD$[0], "Prontera", "Geffen";
	setarray @wrpP[0], 3000, 3000;
	set @wrpC$[0], @wrpD$[0]+" -> "+@wrpP[0];
	set @wrpC$[1], @wrpD$[1]+" -> "+@wrpP[1];
	set @wrpC$[2], "Cancel";
	set @wrpC$[3], "";
	set @wrpC$[4], "";
	set @wrpC$[5], "";
	set @wrpC$[6], "";
	return;
}


//<============================== Treasure Island ==========================>\\
alb2trea.gat,59,69,1	script	Kafra	117,{
	cutin "kafra_01",2;
	callfunc "F_Kafra",0,1,1;

	M_Save:
		savepoint "alb2trea.gat",92,64;
		callfunc "F_KafEnd",0,1;
}
