//@unloadnpc Testers
//@loadnpc npc/amatsu/event/test.txt

new_1-4,53,107,0	script	Testers	4_F_JOB_HUNTER,{
	disable_items;
	if (BaseLevel < 40) {
		mes "[Rina]";
		mes "Hi~!";
		mes "You are an adventurer like me.";
		next;
		mes "[Rina]";
		mes "I am put under a curse.";
		mes "I know you want to help me,";
		mes "but your experience is not enough.";
		next;
		consumeitem 607; //Yggdrasilberry
		consumeitem 12068; //Luk_Dish03
		consumeitem 12063; //Dex_Dish03
		consumeitem 12053; //Vit_Dish03
		npcskill "AL_INCAGI",1,0,0;
		npcskill "AL_BLESSING",1,0,0;
		mes "[Rina]";
		mes "I am not in the good condition,";
		mes "so what I can do for you";
		mes "is just like this.";
		mes "Then, good bye.";
		mes "Take care~!";
		close;
	}
	.@quest1 = questprogress(9117);
	if (!.@quest1) {
		if (!#mobile) playbgm "30"; // One Step Closer
		mes "[Rina]";
		mes "Hi~!";
		mes "You are an adventurer like me.";
		mes "Well... In fact, I am";
		mes "put under a strange curse.";
		next;
		mes "[Rina]";
		mes "To release this curse,";
		mes "somebody needs to do ^800080Oath-taking ceremony^000000";
		mes "with me,";
		mes "and then needs to solve";
		mes "several problems instead of me.";
		next;
		if (select("Let's help ^800080Rina^000000.", "Just skip it.") == 2) {
			emotion e_sigh;
			mes "[Rina]";
			mes "To help me,";
			mes "I need a competent adventurer.";
			mes "If you know those people,";
			mes "I hope you to introduce them to me later.";
			close;
		}
		emotion e_awsm;
		mes "[Rina]";
		mes "Are you really going to help me?";
		mes "Thank you.";
		mes "You are so brave.";
		next;
		if (!#mobile) playbgm "01"; // Title
		mes "[Rina]";
		mes "Then I'll start ^800080Oath-taking ceremony^000000.";
		mes " ";
		mes "^787878( A mysterious atmosphere hangs in the air. )^000000";
		next;
		specialeffect(EF_COUPLECASTING, AREA, playerattached());
		next;
		mes "[Rina]";
		mes "Blah blah blah...";
		mes " ";
		mes "Blah blah blah...";
		mes " ";
		mes "^787878( ... This is a strange spell. )^000000";
		next;
		specialeffect(EF_SIGNUM, AREA, playerattached());
		mes "[Rina]";
		mes "Haaaaah~";
		mes "^800080Oath-taking ceremony^000000 is done enough now.";
		mes "Isn't that so simple?";
		next;
		emotion e_dum;
		mes "[Rina]";
		mes "Okay, from no on,";
		mes "you need to go on ^006400a real adventure";
		mes "to release my curse^000000.";
		mes "Let me know when you are ready.";
		setquest 9117;
		close;
	} else if (.@quest1 == 1) {
		callsub(L_HuntingInfo, .@quest1);
	} else if (.@quest1 == 2) {
		if (questprogress(9118) != 2 || questprogress(9119) != 2 || questprogress(9120) != 2 || questprogress(9121) != 2) {
			if (questprogress(9118,HUNTING) == 2 || questprogress(9119,HUNTING) == 2 || questprogress(9120,HUNTING) == 2 || questprogress(9121,HUNTING) == 2) {
				mes "[Rina]";
				mes "You did it.";
				mes "I can feel that my body is recovering.";
				mes "But it is not enough.";
				next;
				mes "[Rina]";
				mes "^006400You have one more thing to do.^000000";
				mes "Let me know when you're ready.";
				close2;
				completequest 9118;
				completequest 9119;
				completequest 9120;
				completequest 9121;
				setquest 9122;
			} else
				callsub(L_HuntingInfo, .@quest1);
			end;
		}
	}
	if (questprogress(9122) == 1) {
		if (!#mobile) {
		mes "[Rina]";
		mes "I will check one thing.";
		mes "For this task,";
		mes "You need to feel the music.";
		next;
		mes "[Rina]";
		mes "You cannot complete the task";
		mes "without the music.";
		mes "do you have any problem?";
		next;
		mes "- Check! -";
		mes "^787878- BGM option should be turned on -^000000";
		mes "^787878- in the game option menu. -^000000";
		mes "^787878- Please check -^000000";
		mes "^787878- whether you can listen -^000000";
		mes "^787878- to the music sound. -^000000";
		next;
		if(select("[I'm ready to listen to the BGM.]", "[I can't listen to the BGM.]") == 2) {
			mes "[Rina]";
			mes "I am so shocked that";
			mes "you cannot feel the music.";
			mes "What should we do now...";
			close2;
			emotion e_sob;
			end;
		}
		mes "[Rina]";
		mes "Listen carefully";
		mes "the feelings of it...";
		mes "I can't hear it,";
		mes "but you can hear the sound.";
		next;
		if (oversea_event2 < 520 || oversea_event3 < 270 || oversea_event6 < 245 || oversea_event9 < 197) {
			     if (oversea_event2 == 520) playbgm "13"; // Theme of Geffen
			else if (oversea_event3 == 270) playbgm "59"; // Theme of Lutie
			else if (oversea_event6 == 245) playbgm "70"; // Theme of Juno
			else if (oversea_event9 == 197) playbgm "76"; // Theme of Amatsu
			else {
				switch(rand(1,4)) {
					case 1: playbgm "13"; oversea_event2 = 520; break;
					case 2: playbgm "59"; oversea_event3 = 270; break;
					case 3: playbgm "70"; oversea_event6 = 245; break;
					case 4: playbgm "76"; oversea_event9 = 197; break;
				}
			}
		}
			mes "[Rina]";
			mes "^006400The music you're hearing now^000000";
			mes "has something to do with the one specific city.";
			mes "Think carefully ^006400what kind of city^000000";
			mes "has similar feeling with this music.";
			next;
			mes "[Rina]";
			mes "And...";
			mes "Go to ^006400the city";
			mes "where you can remind by this music^000000.";
		} else {
			mes "[Rina]";
			if (oversea_event2 < 520 || oversea_event3 < 270 || oversea_event6 < 245 || oversea_event9 < 197) {
			     if (oversea_event2 == 520) mes "Go to ^006400Geffen^000000"; // Theme of Geffen
			else if (oversea_event3 == 270) mes "Go to ^006400Lutie^000000"; // Theme of Lutie
			else if (oversea_event6 == 245) mes "Go to ^006400Juno^000000"; // Theme of Juno
			else if (oversea_event9 == 197) mes "Go to ^006400Amatsu^000000"; // Theme of Amatsu
			else {
				switch(rand(1,4)) {
					case 1: mes "Go to ^006400Geffen^000000"; oversea_event2 = 520; break;
					case 2: mes "Go to ^006400GLutie^000000";oversea_event3 = 270; break;
					case 3: mes "Go to ^006400Juno^000000";oversea_event6 = 245; break;
					case 4: mes "Go to ^006400Amatsu^000000";oversea_event9 = 197; break;
				}
			}
			close;
		}
		next;
		mes "[Rina]";
		mes "After that,";
		mes "find ^FF0000the strange mark^000000";
		mes "around the entrances of the city.";
		mes "Then you can release the curse on me.";
		next;
		mes "[Rina]";
		mes "It must be tough";
		mes "but I hope you good luck.";
		close2;
		emotion e_sigh;
		end;
	}
	if (questprogress(9123) == 1) {
		emotion e_kis;
		mes "[Rina]";
		mes "You're back~!";
		mes "My curse has been released.";
		mes "Thank you so much.";
		next;
		if (checkweight(Easter_Egg_Shell,1) == 0) {
			mes "[Rina]";
			mes "Your bag is too full.";
			mes "I have a present for you";
			mes "so make your bag lighter.";
			mes "I'll wait for you.";
			close;
		}
		completequest 9123;
		getitem Easter_Egg_Shell,1;
		.@BaseExp = (BaseLevel * (BaseLevel / 4)) * ((BaseLevel / 29) + (BaseLevel / 6)) + (5 * BaseLevel / 2);
		if (ADVJOB == 0) {
			if (BaseLevel < 40) .@nBaseExp = .@BaseExp;
			else if (BaseLevel < 50) .@nBaseExp = .@BaseExp + (BaseLevel * BaseLevel);
			else if (BaseLevel < 60) .@nBaseExp = .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 20));
			else if (BaseLevel < 70) .@nBaseExp = .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 10));
			else if (BaseLevel < 80) .@nBaseExp = .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 5));
			else if (BaseLevel < 90) .@nBaseExp = .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 3));
			else if (BaseLevel < 99) .@nBaseExp = .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 2));
			else .@nBaseExp = .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 2) * 2);

			.@nJobExp = (JobLevel * (JobLevel - 3) * (JobLevel / 25 + 1) + (16 - (JobLevel * 2))) * 2;
		} else {
			if (BaseLevel < 30) .@nBaseExp = .@BaseExp;
			else if (BaseLevel < 40) .@nBaseExp = .@BaseExp + (BaseLevel * 10);
			else if (BaseLevel < 50) .@nBaseExp = .@BaseExp + (BaseLevel * BaseLevel * 2);
			else if (BaseLevel < 60) .@nBaseExp = .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 10));
			else if (BaseLevel < 70) .@nBaseExp = .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 5));
			else if (BaseLevel < 80) .@nBaseExp = .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 3));
			else if (BaseLevel < 90) .@nBaseExp = .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 2));
			else if (BaseLevel < 98) .@nBaseExp = .@BaseExp + (BaseLevel * BaseLevel * BaseLevel);
			else .@nBaseExp = .@BaseExp + (BaseLevel * BaseLevel * BaseLevel * 2);

			.@nJobExp = (JobLevel * JobLevel * (JobLevel / 5 + 2) + (20 - JobLevel)) * 3;
		}
		getexp .@nBaseExp,.@nJobExp;
		mes "[Rina]";
		mes "This is the present for you.";
		mes "It's not a big one";
		mes "but please take it";
		mes "as a token of my gratitude.";
		next;
		mes "[Rina]";
		mes "I'll take a rest for a few days";
		mes "and then I'll go on an adventure.";
		mes "See you again.";
		close2;
		consumeitem 607; //Yggdrasilberry
		consumeitem 12068; //Luk_Dish03
		consumeitem 12063; //Dex_Dish03
		consumeitem 12053; //Vit_Dish03
		npcskill "AL_INCAGI",1,0,0;
		npcskill "AL_BLESSING",1,0,0;
		end;
	}
	mes "[Rina]";
	mes "Thank you for releasing my curse.";
	mes "I'll take a rest for a few days";
	mes "and then go on an adventure again.";
	mes "Have a happy day~!";
	close2;
	consumeitem 607; //Yggdrasilberry
	npcskill "AL_INCAGI",1,0,0;
	npcskill "AL_BLESSING",1,0,0;
	end;

L_HuntingInfo:
	mes "[Rina]";
	mes "What you need to do is";
	mes "to choose one monster among";
	mes "^FF0000DEVIRUCHI,^000000 ^FF0000FREEZER,^000000";
	mes "^FF0000POISON TOAD,^000000 ^FF0000NIGHTMARE TERROR^000000";
	mes "and then kill ^0000FF50^000000 monsters";
	mes "and come back to me.";
	next;
	mes "[Rina]";
	mes "It must be a tough task,";
	mes "but you are the right person";
	mes "who did the oath-taking ceremony.";
	mes "I hope you succeed.";
	if (getarg(0) < 2) {
		completequest 9117;
		setquest 9118;
		setquest 9119;
		setquest 9120;
		setquest 9121;
	}
	close2;
	npcskill "AL_INCAGI",1,0,0;
	npcskill "AL_BLESSING",1,0,0;
	end;
}