//===== rAthena Script ======================================= 
//= Malangdo Town
//===== By: ================================================== 
//= Muad_Dib
//===== Current Version: ===================================== 
//= 1.5
//===== Compatible With: ===================================== 
//= rAthena Project
//===== Description: ========================================= 
//= [Official Conversion]
//= Malangdo Town Script
//===== Additional Comments: ================================= 
//= 1.0 First version. [Euphy]
//= 1.1 Added entrance scripts.
//= 1.2 Moved "Odgnalam" coordinates.
//= 1.3 Fixed dialogues.
//= 1.4 Dialogue edits, source iRO.
//= 1.5 Added Izlude duplicates.
//============================================================

// Malangdo Transportation :: malangdo_go
//============================================================
-	script	Dolangmal	-1,{
	if (checkquest(5091) == -1) {
		mes "[Dolangmal]";
		mes "Hey~! Hi human~ This is Mr. Dolangmal. kakaka~";
		next;
		mes "[Dolangmal]";
		mes "We are sent to here to take you to the heaven of cats, ^A2314BMalangdo^000000.";
		next;
		mes "[Dolangmal]";
		set .@s$,"Why don't you go to ^A2314BMalangdo^000000?";
		switch(atoi(strnpcinfo(2))) {
			case 1: mes "How is that? The crowded city of Prontera is good, but why don't you go our heaven of the cats, ^A2314BMalangdo^000000?"; break;
			case 2: mes "Why don't you go to ^A2314BMalangdo^000000? That place is better than Geffen, where there are only crowds of simple honest wizards."; break;
			case 3: mes "The fresh air of Payon is not bad, but why don't you go better place like the heaven of the cats, ^A2314BMalangdo^000000?"; break;
			case 4: mes .@s$+"The beautiful and quiet place is better than Aldebaran, where it's so noisy with the tick-tock sound of the clock."; break;
			case 5: mes .@s$+"The beautiful and quiet place is better than Morroc, with its heat and sandstorms."; break;
			case 6: mes .@s$+"The beautiful place is better than Yuno, which is full of books and headaches."; break;
			case 7: mes .@s$+"The complex place is better than Rachel, where it's too horribly quiet."; break;
			case 8: mes .@s$+"The safe place is better than Lighthanlzen, which is too dangerous."; break;
			case 9: mes .@s$+"The smell of this sea place is better than Mora, which is full of a grassy smell."; break;
		}
		next;
		if(select("No:^A2314BMalangdo^000000~ Go~ Go~") == 1) {
			mes "[Dolangmal]";
			mes "What!? You don't want to go ^A2314BMalangdo^000000? Chet!";
			next;
			mes "[Dolangmal]";
			mes "You're such an annoying guy. If you don't go, why did you talk to me... but...";
			next;
			mes "[Dolangmal]";
			mes "^9E1837Admiral Tomas^000000 said to kidnap humans... No... Bring them politely?";
			next;
			mes "[Dolangmal]";
			mes "Anyway, I got you. Whenever you want to go, just tell me.";
			close;
		}
		mes "[Dolangmal]";
		mes "Ok! I like your attitude. Full of passion.";
		next;
		mes "[Dolangmal]";
		mes "Now, before you go ^A2314BMalangdo^000000, let me give you some warnings.";
		next;
		mes "[Dolangmal]";
		mes "First!! It is natural that when you arrive on ^A2314BMalangdo^000000, you should notify ^9E1837Admiral Tomas^000000 that you are here.";
		next;
		mes "[Dolangmal]";
		mes "If you don't do that, you might be attacked by scary and wild cats when you walk through dark streets.";
		next;
		mes "[Dolangmal]";
		mes "Secondly!! This ^A2314BMalangdo^000000 is absolutely our island of cats, even though we open to humans.";
		next;
		mes "[Dolangmal]";
		mes "We have a personality... no... no... respect us like one catality because we are cats.";
		next;
		mes "[Dolangmal]";
		mes "And the next one is...";
		next;
		mes "Dolangmal proceeds and gives hundreds of warnings.";
		next;
		mes "[Dolangmal]";
		mes "Ok! Those are all the warnings!! They're easy and simple... right? Can you remember them?";
		next;
		switch(select("Remember his warnings:Can't remember")) {
		case 1:
			mes "[Dolangmal]";
			mes "Ok! Do not bite two mice with one mouth. ^9E1837Admiral Tomas^000000 is located at the ^A2314Bcenter of the ship in Malangdo^000000.";
			next;
			mes "[Dolangmal]";
			mes "Don't forget to give him notice of your arrival.";
			next;
			mes "[Dolangmal]";
			mes "Alright. Let's go to the heaven of the cats, ^A2314BMalangdo^000000~";
			setquest 5091;
			completequest 5091;
			warp "malangdo",217,85;
			close;
		case 2:
			mes "[Dolangmal]";
			mes "What!? Can't you keep these easy rules? Chet!";
			next;
			mes "[Dolangmal]";
			mes "You're such an annoying guy. If you can't keep these, why didn't you tell me during our conversation? I told you everything... but..";
			next;
			mes "[Dolangmal]";
			mes "^9E1837Admiral Tomas^000000 said to kidnap humans... No... Bring them politely?";
			next;
			mes "[Dolangmal]";
			mes "Anyway, I got you. Just tell me whenever you want to go.";
			close;
		}
	}
	mes "[Dolangmal]";
	mes "Uh? You must be the one from last time...? Alright. Did you visit ^A2314BMalangdo^000000?";
	next;
	switch(select("Take me to ^A2314BMalangdo^000000 again:I have visited")) {
	case 1:
		mes "[Dolangmal]";
		mes "I really want to send you there, but I can't because of the policy. It is difficult to send people who have visited ^A2314BMalangdo^000000 already.";
		next;
		mes "[Dolangmal]";
		mes "And that was roughly it... It's supposed to be rule 53...";
		next;
		mes "[Dolangmal]";
		mes "Actually, let me tell you rule 53. I am an indulgent cat.";
		next;
		mes "[Dolangmal]";
		mes "If you want to go back to ^A2314BMalangdo^000000, take the ship at Izlude or Alberta.";
		next;
		mes "[Dolangmal]";
		mes "If you enjoy that pleasant sea trip, you will arrive at the heaven of cats, ^A2314BMalangdo^000000.";
		next;
		mes "[Dolangmal]";
		mes "So easy! Isn't it? Well, good bye~";
		close;
	case 2:
		mes "[Dolangmal]";
		mes "How was it? You liked it? I knew it. Kakaka~";
		next;
		mes "[Dolangmal]";
		mes "Ah! I just want to make sure...";
		next;
		mes "[Dolangmal]";
		mes "Again, if you want to go back to ^A2314BMalangdo^000000, do you know where to take a ship at Izlude or Alberta?";
		next;
		mes "[Dolangmal]";
		mes "Hm~ You might know because you're a smart person. Well, see you again~";
		close;
	}
}
prontera,114,77,6	duplicate(Dolangmal)	Dolangmal#1	553
geffen,109,61,6	duplicate(Dolangmal)	Dolangmal#2	553
payon,200,106,4	duplicate(Dolangmal)	Dolangmal#3	553
aldebaran,170,104,4	duplicate(Dolangmal)	Dolangmal#4	553
morocc,168,275,4	duplicate(Dolangmal)	Dolangmal#5	553
yuno,165,122,4	duplicate(Dolangmal)	Dolangmal#6	553
rachel,121,126,4	duplicate(Dolangmal)	Dolangmal#7	553
lighthalzen,254,83,5	duplicate(Dolangmal)	Dolangmal#8	553
mora,57,150,4	duplicate(Dolangmal)	Dolangmal#9	553

-	script	::Odgnalam	-1,{
	mes "This cat is sleeping in the warm "+((strnpcinfo(2) == "albe")?"Alberta":"Izlude")+" sun.";
	next;
	if(select("Let him sleep:Talk to him") == 1) close;
	mes "[Odgnalam]";
	mes "Meow? Huh?";
	next;
	if (ep13_yong1 == 0) {
		set .@price,1000;
		set .@s1$,"Huh! You are so annoying. Let me send you to ^A2314BMalangdo^000000 for ^0000FF1000 Zeny^000000.";
		set .@s2$,"Money? Where is the money? You can't go anywhere without the money. Shame on you.";
	} else if (ep13_yong1 < 60) {
		set .@price,999;
		set .@s1$,"You have a little relationship with fleet of cat. I'll give you special discount price ^0000FF999 Zeny^000000 to ^A2314BMalangdo^000000, because you have relationship with fleet.";
		set .@s2$,"Where is the money? You don't have a sense of honor.";
	} else if (ep13_yong1 > 59 && ep13_yong1 < 80) {
		set .@price,500;
		set .@s1$,"You gave several help to our cat's fleet so let me give you special that with 50% discount price ^0000FF500 Zeny^000000. I'll send you to ^A2314BMalangdo^000000.";
		set .@s2$,"You don't have any money for paying 50% discount price? I can't believe it.";
	} else {
		mes "[Odgnalam]";
		mes "You are a hero of cat's fleet. Your activity is the legend between us.";
		next;
		mes "[Odgnalam]";
		mes "As you are a hero of the cat fleet let me send you to ^A2314BMalangdo^000000 for free.";
		next;
		if(select("Send me to Malangdo!:Do not go.") == 1) {
			mes "[Odgnalam]";
			mes "Have a comfortable trip... Alright let's go~";
			warp "malangdo",217,85;
		}
		close;
	}
	mes "[Odgnalam]";
	mes .@s1$;
	next;
	if(select("Send me to Malangdo!:Do not go.") == 2) close;
	if (Zeny < .@price) {
		mes "[Odgnalam]";
		mes "Money? Where is the money? You can't go anywhere without the money. Shame on you.";
		close;
	}
	set Zeny, Zeny - .@price;
	mes "[Odgnalam]";
	mes "Let me send you right away. Let's go~";
	warp "malangdo",217,85;
	close;
}
alberta,200,151,4	duplicate(Odgnalam)	Odgnalam#albe	554
izlude,182,218,4	duplicate(Odgnalam)	Odgnalam#iz	554	// Old coordinates: (182,192)
izlude_a,182,218,4	duplicate(Odgnalam)	Odgnalam#iz_a	554
izlude_b,182,218,4	duplicate(Odgnalam)	Odgnalam#iz_b	554
izlude_c,182,218,4	duplicate(Odgnalam)	Odgnalam#iz_c	554
izlude_d,182,218,4	duplicate(Odgnalam)	Odgnalam#iz_d	554

malangdo,219,86,4	script	Kong#malang	545,{
	mes "[Kong]";
	mes "Did you have fun in Malangdo?";
	mes "The fleet has a service to Izlude and Alberta.";
	next;
	if (ep13_yong1 == 0) {
		set .@price,1000;
		set .@s1$, "1000 zeny";
		set .@s2$, "Have a nice day in Malangdo.";
		set .@no_money$, "It is difficult for free.";
		set .@yes_money$, "Have a nice trip.";
		mes "[Kong]";
		mes "The fee of ship is only 1000 zeny, where do you want to go?";
		next;
	} else if (ep13_yong1 < 60) {
		set .@price,999;
		set .@s1$,"999 zeny";
		set .@s2$, "Have a full of fortune day in Malangdo...";
		set .@no_money$, "It is difficult even though you have a relationship with the fleet.";
		set .@yes_money$, "Thanks, have a wonderful trip.";
		mes "[Kong]";
		mes "You have a connection with our fleet. Apply special price 999 zeny. Where do you want to go?";
		next;
	} else if (ep13_yong1 > 59 && ep13_yong1 < 80) {
		set .@price,500;
		set .@s1$,"500 zeny";
		set .@s2$, "There are full of fortune and jackpot in Malangdo.";
		set .@no_money$, "Oh my god. You don't have 500 zeny? It is difficult for free.";
		set .@yes_money$, "Have a nice trip and come again.";
		mes "[Kong]";
		mes "Wow~ You contributed to our fleet a lot. Alright!! Special discount price 500 zeny. Where do you want to go?";
		next;
	} else {
		set .@price,0;
		set .@s1$,"Free for the hero of our fleet!!";
		set .@s2$, "No one objects to the hero of our fleet staying in Malangdo...";
		mes "[Kong]";
		mes "Ah... You are the legendary hero of our cat's fleet.";
		next;
		mes "[Kong]";
		mes "We can't charge the hero of our fleet. What is your destination?";
		next;
	}
	set .@i, select("- Izlude destination --- "+.@s1$+":- Alberta destination --- "+.@s1$+":- Stay on Malangdo");
	mes "[Kong]";
	if (.@i == 3) {
		mes .@s2$;
		close;
	}
	if (ep13_yong1 > 80) {
		mes "Have a comfortable trip.";
		if (.@i == 1)
			warp "izlude",195,212; // Old coordinates: (194,180)
		else
			warp "alberta",192,150;
		close;
	}
	if (Zeny < .@price) {
		mes .@no_money$;
		close;
	}
	set Zeny, Zeny - .@price;
	mes .@yes_money$;
	if (.@i == 1)
		warp "izlude",195,212;
	else
		warp "alberta",192,150;
	close;
}

// Generic Malangdo NPCs :: malang_tre
//============================================================
malangdo,147,117,3	script	Innkeeper#malang	554,{
	mes "You see a lazy cat standing on a chair.";
	mes "You guess that this is the Innkeeper.";
	next;
	switch(select("Umm... Can I rest here?:Psst... Can I save here?:Leave.")) {
	case 1:
		mes "[Innkeeper]";
		mes "Eh?";
		mes "Uh, sure you can use this hammock if you give me ^FF00005 Malangdo Cans^000000.";
		next;
		switch(select("Here you go.:Never mind.")) {
		case 1:
			if (countitem(12636) > 4) {
				delitem 12636,5; //Malang_Sp_Can
				percentheal 100,100;
				specialeffect2 EF_HEALSP;
				mes "[Innkeeper]";
				mes "Now relax.";
				emotion e_kis;
				next;
				warp "malangdo",140,121;
				close;
			}
			mes "[Innkeeper]";
			mes "This ain't no charity.";
			close;
		case 2:
			mes "[Innkeeper]";
			mes "Let me know if you want to relax.";
			close;
		}
	case 2:
		mes "[Innkeeper]";
		mes "Location saved. We should keep company, haha~";
		savepoint "malangdo",142,118,1,1;
		close;
	case 3:
		mes "[Innkeeper]";
		mes "Sometimes you just have to relax.";
		next;
		mes "- Wow, this is the laziest cat ever. -";
		close;
	}
	close;
}

malangdo,151,120,3	script	Minstrel#mal	479,{
	mes "[Minstrel]";
	mes "Boy, that lazy cat makes me want to just nap all day long.";
	next;
	mes "[Minstrel]";
	mes "He makes life look so simple.";
	close;
}

malangdo,149,120,5	script	Wanderer#mal	485,5,1,{
	mes "[Wanderer]";
	mes "The cats living in here are so energetic.";
	mes "Is it weird that they make me want to dance all day?";
	mes "La di dah di dah~!";
	close;
OnTouch:
	switch(rand(5)) {
	case 0:
		soundeffect "ring_of_nibelungen.wav",0;
		break;
	case 1:
		soundeffect "dont_forget_me_not.wav",0;
		break;
	case 2:
		soundeffect "humming.wav",0;
		break;
	case 3:
		soundeffect "assassin_of_sunset.wav",0;
		break;
	case 4: 
		emotion e_ho;
		emotion e_ho,0,"Wandering Minstrel#mal";
		break;
	}
	end;
}

malangdo,216,168,3	script	Cat Trainer#mal1	558,0,8,{
	emotion e_awsm;
	mes "[Cat Trainer]";
	mes "Ooo~ their soft puffy tails and soft fur~";
	mes "I can't stand it, this is heaven~~!!";
	next;
	emotion e_gg;
	mes "[Cat Trainer]";
	mes "My hidden card, ^FF0000Silvervine Fruit^000000, can make all cats in Malangdo my slaves~ haha!";
	next;
	select("^FF0000Silvervine Fruit^000000?");
	mes "[Cat Trainer]";
	mes "It is such a rare item!";
	mes "I can barely get it.";
	mes "But these cudly cats can't resist it~";
	next;
	select("Where can I get ^FF0000Silvervine Fruit^000000?");
	mes "[Cat Trainer]";
	mes "Why would I tell you when I can barely get it?";
	mes "I wouldn't even tell you for all the zeny in the world~!";
	next;
	emotion e_gg;
	mes "[Cat Trainer]";
	mes "All the Malangdo cats are mine~!";
	mes "Muahahahaha~";
	mes "With enough ^FF0000Silvervine Fruit^000000 I can be a queen in Malangdo~ ohhhh!!!";
	close;
OnTouch:
	emotion e_flash;
	end;
}

malangdo,164,203,3	script	Cat Trainer#mal2	853,{
	emotion e_awsm;
	mes "[Cat Trainer]";
	mes "Ooo~ their soft puffy tails and soft fur~";
	mes "I can't stand it, this is heaven~~!!";
	next;
	emotion e_gg;
	mes "[Cat Trainer]";
	mes "This is my little secret called";
	mes "^FF0000Silvervine Fruit^000000. I can use";
	mes "it to make the Malangdo cats my";
	mes "slaves~ muahahahaha~!";
	next;
	select("^FF0000Silvervine Fruit^000000?");
	mes "[Cat Trainer]";
	mes "Hmm, I guess it's no wonder you don't know.";
	mes "These Malangdo cats can't resist it.";
	mes "But it's too rare of an item to get so you shouldn't bother trying to find it.";
	next;
	select("Where can I get ^FF0000Silvervine Fruit^000000?");
	mes "[Cat Trainer]";
	mes "Actually, it's simple. You just...";
	next;
	mes "[Cat Trainer]";
	mes "Hey, you almost made me tell my secret.";
	next;
	emotion e_gg;
	mes "[Cat Trainer]";
	mes "One day these cats will be mine.";
	mes "I can be a king in Malangdo~ ohhh~!";
	close;
}
