/* * * * * * * * * * * * *
 * iRO Overlook Water Dungeon
 * - http://irowiki.org/wiki/Overlook_Water_Dungeon_Quests
 * 
 * ------- V1.0 ----------
 * Credits: Smokexyz [sagunxp@gmail.com]
 * * * * * * * * * * * * */

iz_dun04t,25,37,4	script	Overlook Dungeon Hunt#4	2_BULLETIN_BOARD,{
	set .@mob_count,150;
	set .@mobId1,2009;
	set .@mobId2,2010;
	set .@questId,50535;
	set .@bexp,335340;
	set .@jexp,337190;
	setarray .@itemId[0],985,2608;
	setarray .@itemAmt[0],2,1;
	
	callfunc("OverLook_Final"); // Final Reward Function
	if (questprogress(.@questId) == 2) {
		mes "You have already completed this mission.";
		mes "Upon venturing into other levels of this dungeon you may find more missions.";
		close;
	}
	mes "Mission Objectives -";
	mes "Hunt "+.@mob_count+" "+strmobinfo(2,.@mobId1)+" and "+strmobinfo(2,.@mobId2)+".";
	next;
	if(select("- Accept/Submit Mission","- Cancel") == 2) close;
	else if (questprogress(.@questId,HUNTING) == 0) {
		mes "You have accepted this mission.";
		mes "Good luck on your journey towards it's completion.";
		setquest .@questId;
		close;
	}
	else if (questprogress(.@questId,HUNTING) == 1) {
		mes "You are already on this quest and have not completed it yet.";
		next;
		switch(select("I'm going to finish the mission.","Leave this mission."))
		{
			case 1:
				close;
			case 2:
				mes "Are you sure you wish to quit this mission?";
				mes "All current progress will be lost upon doing so.";
				next;
				if(select("- Proceed","- Cancel") == 2) close;
				mes "You have quit this mission.";
				erasequest .@questId;
				close;
		}
	}
	else if (questprogress(.@questId,HUNTING) == 2) {
		mes "You have successfully completed this mission.";
		next;
		mes "You will now be rewarded with :";
		mes " ";
		mes "^4a66ffBase Exp^000000 : "+callfunc("int__",.@bexp)+" Exp";
		mes "^4a66ffJob Exp^000000 : "+callfunc("int__",.@jexp)+" Exp";
		mes " ";
		mes "And these items -";
		for(.@i=0; .@i<getarraysize(.@itemId); .@i++)
		mes getitemname(.@itemId[.@i])+" x "+.@itemAmt[.@i];
		next;
		mes "Your mission rewards have been sanctioned.";
		completequest .@questId;
		getexp .@bexp,.@jexp;
		for(.@i=0; .@i<getarraysize(.@itemId); .@i++)
			getitem .@itemId[.@i],.@itemAmt[.@i];
	}
	close;
}