//===== rAthena Script ======================================= 
//= Quest NPCs related to Lutie
//===== By: ================================================== 
//= TonyMan & Samuray22
//===== Current Version: ===================================== 
//= 1.3b
//===== Compatible With: ===================================== 
//= rAthena Project
//===== Description: ========================================= 
//= Blush, Cake Hat, Candle, Chef Hat, Raccoon Hat, Rainbow Eggshell,
//= Spore Hat, Wonder Nutshell Quests
//===== Additional Comments: ================================= 
//= 1.1 Optimized [Lupus]
//= 1.2 Fixed Chef Hat items [Lupus]
//= 1.3 Update NPC to the Official One. [Samuray22]
//= 1.3a Changed item names to item IDs. [Samuray22]
//= 1.3b Removed a scrap " left in a delitem. [L0ne_W0lf]
//= 1.4 Updated NPCs once again. [L0ne_W0lf]
//============================================================ 

xmas,117,295,4	script	Vending Machine Man	704,{
	mes "[Titicupe]";
	mes "Hmm...?";
	mes "I, Titicupe, esteemed manager of the Toy Factory and genius inventor, has done it again! I've just created the world's most sophisticated vending machine!";
	next;
	switch(select("Talk to him about the Vending Machine:Items in the Vending Machine:Stop talking")) {
	case 1:
		mes "[Titicupe]";
		mes "Can you see the little snowman to the left side of me? Can you? If you look at his mouth closely, you'll see that it's been built quite largely. You might say, a bit too large for normal purposes...";
		next;
		mes "[Titicupe]";
		mes "You see, that snowman is actually an amazing vending machine that I invented out of my blood, sweat, tears and snow.";
		next;
		mes "[Titicupe]";
		mes "You can put all sorts of things inside its mouth, and if you insert the right items, you'll get some hats in return...";
		next;
		mes "[Titicupe]";
		mes "Fashionable hats that you've always dreamed of wearing...! Bwahahahaha~!";
		next;
		mes "[Titicupe]";
		mes "Oh, this creation of mine is so magnificent!";
		emotion e_kis2;
		next;
		mes "[Titicupe]";
		mes "And the headgears--! I... I can't contain myself!";
		next;
		mes "^3355FFToy factory manager Titicupe jumps and convulses with joy. Clearly he's insane, but it may be possible that he may be brilliant.^000000";
		emotion e_gasp;
		close;
	case 2:
		mes "[Titicupe]";
		mes "Oh right! You need to know what kind of items to put into the Vending Machine to get what you want, yes? Go ahead... Ask me~";
		emotion e_ic;
		next;
		switch(select("Raccoon Hat:Spore Hat:Wonder Nutshell:Ranbow Eggshell:Blush:Chef Hat:Candle:Cake Hat:End Conversation")) {
		case 1:
			mes "[Titicupe]";
			mes "Raccoon Hat?";
			mes "1 Kitty Band";
			mes "20 Dragon Scale";
			mes "200 Tough Scalelike Stem";
			mes "300 Sea-otter Fur";
			break;
		case 2:
			mes "[Titicupe]";
			mes "Spore Hat?";
			mes "850 Poison Spore";
			mes "300 Burnt Tree";
			mes "1 Tongue";
			break;
		case 3:
			mes "[Titicupe]";
			mes "Wonder Nutshell?";
			mes "1 Nut Shell";
			mes "500 Wing of Dragonfly";
			break;
		case 4:
			mes "[Titicupe]";
			mes "Rainbow Eggshell?";
			mes "1 Egg Shell";
			mes "1 Cobaltblue Dyestuffs";
			mes "50 Claw of Desert Wolf";
			break;
		case 5:
			mes "[Titicupe]";
			mes "Blush?!";
			mes "You!";
			mes "You know something...";
			mes "Heh heh~ Anyway";
			mes "100 Alice's Apron";
			break;
		case 6:
			mes "[Titicupe]";
			mes "Chef Hat?";
			mes "120 Piece of Cake";
			mes "1 White Dyestuffs";
			mes "330 Feather";
			mes "450 Dragon Scale";
			break;
		case 7:
			mes "[Titicupe]";
			mes "Candle?";
			mes "1 Bomb Wick";
			mes "50 Matchstick";
			mes "100 Royal Jelly";
			break;
		case 8:
			mes "[Titicupe]";
			mes "Cake Hat?";
			mes "10 Candy";
			mes "5 Candy Cane";
			mes "15 Well-baked Cookie";
			mes "20 Piece Of Cake";
			mes "10 Steel";
			break;
		case 9:
			mes "[Titicupe]";
			mes "Ask me anytime. Those kinds of questions are no problem for geniuses like me!";
		}
		next;
		mes "[Titicupe]";
		mes "So happy!!";
		mes "I'm a genius~!";
		mes "Ho ho ho";
		mes "Ho ho ho ho!";
		close;
	case 3:
		mes "[Titicupe]";
		mes "Sometimes, I can't believe how magnificent this invention of mine is...!";
		next;
		mes "[Titicupe]";
		mes "I...";
		mes "I love you";
		mes "Mister Snowman";
		mes "Vending Machine.";
		emotion e_kis2;
		next;
		mes "^3355FFToy factory manager Titicupe begins to jump around and emit screams of unbridled ecstacy. At this point, it's not difficult to doubt his sanity, as well as his genius.";
		close;
	}
}

xmas,115,297,4	script	Vending Machine	111,{
	mes "[Audi]";
	mes "^555555Exciting item vending machine. Invented by great Titicupe. Select the desired item and place required items into snowmouth receptacle.^000000";
	next;
	switch(select("^FF3355Notice (Must Read)^000000:Raccoon Hat:Spore Hat:Wonder Nutshell:Rainbow Eggshell:Blush:Chef Hat:Candle:Cake Hat:Cancel")) {
	case 1:
		mes "[Audi]";
		mes "Hi~ !";
		mes "I need to tell you one important thing. This vending machine is not equipped to differentiate between special items and ordinary items.";
		next;
		mes "[Audi]";
		mes "So if you use an item that has been ^FF3355upgraded, or has a card compounded to it^000000, any cards or upgrades will be lost in creating the new item.";
		next;
		mes "[Audi]";
		mes "So when you try to exchange and generate items, please put all the valuable items you won't be using into the Kafra Storage.";
		next;
		mes "[Audi]";
		mes "Please keep this in mind because this Vending Machine does not provide any returns, refunds or exchanges.";
		next;
		mes "[Audi]";
		mes "Have a great time!";
		mes "Thank you!";
		close;
	case 2:
		if ((countitem(2213) > 0) && (countitem(1036) > 19) && (countitem(7012) > 199) && (countitem(7065) > 299)) {
			mes "^3355FFYou gingerly place the items into the snowman's mouth.^000000";
			next;
			delitem 2213,1;  //Cat_Hairband
			delitem 1036,20;  //Dragon_Scale
			delitem 7012,200;  //Tough_Scalelike_Stem
			delitem 7065,300;  //Sea_Otter_Leather
			emotion e_Oh;
			mes "^3355FF*Vroooooom~~*";
			mes "*Bzzzzzt*";
			mes "*choogachooga*";
			mes "*Kapang!*^000000";
			getitem 5033,1; // Smokie_Hat
			next;
			mes "[Audi]";
			mes "^555555Thank you for coming by.";
			mes "Please come again!";
			mes "Oh, and tell a friend!^000000";
			close;
		}
		break;
	case 3:
		if ((countitem(7033) > 849) && (countitem(7068) > 299) && (countitem(1015) > 0)) {
			mes "^3355FFYou gingerly place the items into the snowman's mouth.^000000";
			next;
			delitem 7033,850;  //Poison_Spore
			delitem 7068,300;  //Burn_Tree
			delitem 1015,1;  //Thin_N'_Long_Tongue
			emotion e_oh;
			mes "^3355FF*Vroooooom~~*";
			mes "*Bzzzzzt*";
			mes "*choogachooga*";
			mes "*Kapang!*";
			mes "*Wek Wek*^000000";
			getitem 5029,1; // Spore_Hat
			next;
			mes "^555555Thank you for coming by.";
			mes "Please come again!";
			mes "Oh, and tell a friend!^000000";
			close;
		}
		break;
	case 4:
		if ((countitem(5037) > 0) && (countitem(7064) > 499)) {
			mes "^3355FFYou gingerly place the items into the snowman's mouth.^000000";
			next;
			delitem 5037,1;  //Fruit_Shell
			delitem 7064,500;  //Dragon_Fly_Wing
			mes "^3355FF*Vroooooom~~*";
			mes "*Bzzzzzt*";
			mes "*choogachooga*";
			mes "*Kapang!*";
			mes "*BeepBoopBeepBoop*";
			mes "*Beeeeeeoop*^000000";
			emotion e_oh;
			getitem 5050,1; // Mystery_Fruit_Shell
			next;
			mes "[Audi]";
			mes "^555555Thank you for coming by.";
			mes "Please come again!";
			mes "Oh, and tell a friend!^000000";
			close;
		}
		break;
	case 5:
		if ((countitem(5015) > 0) && (countitem(978) > 0) && (countitem(7030) > 49)){ 
			mes "^3355FFYou gingerly place the items into the snowman's mouth.^000000";
			next;
			delitem 5015,1;  //Egg_Shell
			delitem 978,1;  //Cobaltblue_Dyestuffs
			delitem 7030,50;  //Claw_Of_Desert_Wolf
			emotion e_oh;
			mes "^3355FF*Vroooooom~~*";
			mes "*Bzzzzzt*";
			mes "*choogachooga*";
			mes "*OoooEeeeeeee~*^000000";
			getitem 5039,1; // Mottled_Egg_Shell
			next;
			mes "[Audi]";
			mes "^555555Thank you for coming by.";
			mes "Please come again!";
			mes "Oh, and tell a friend!^000000";
			close;
		}
		break;
	case 6:
		if (countitem(7047) > 99) {
			mes "^3355FFYou gingerly place all 100 Aprons into the snowman's mouth.^000000";
			next;
			delitem 7047,100;  //Alice's_Apron
			emotion e_oh;
			mes "^3355FF*Vroooooom~~*";
			mes "*Bzzzzzt*";
			mes "*choogachooga*";
			mes "*Kapang!*";
			mes "*ChoopChoop*";
			mes "*Chaaawah!*^000000";
			getitem 5040,1; // Blush
			mes "[Audi]";
			mes "^555555Thank you for coming by.";
			mes "Please come again!";
			mes "Oh, and tell a friend!^000000";
			next;
			mes "[Titicupe]";
			mes "You got Blush?! Huh. I guess you really like looking glamourous~! I bet you really appreciate my genius now, huh?";
			close;
		}
		break;
	case 7:
		if ((countitem(539) > 119) && (countitem(982) > 0) && (countitem(949) > 329) && (countitem(1036) > 449)) {
			mes "^3355FFYou gingerly place the items into the snowman's mouth.^000000";
			next;
			delitem 539,120;  //Piece_Of_Cake
			delitem 982,1;  //White_Dyestuffs
			delitem 949,330;  //Feather
			delitem 1036,450;  //Dragon_Scale
			emotion e_oh;
			mes "^3355FF*Vroooooom~~*";
			mes "*Bzzzzzt*";
			mes "*choogachooga*";
			mes "*Kapang!*";
			mes "*Muuuuuuugeeee*^000000";
			getitem 5026,1; // Hat_Of_Cook
			next;
			mes "[Audi]";
			mes "^555555Thank you for coming by.";
			mes "Please come again!";
			mes "Oh, and tell a friend!^000000";
			close;
		}
		break;
	case 8:
		if ((countitem(2279) > 0) && (countitem(7035) > 49) && (countitem(526) > 99)) {
			mes "^3355FFYou gingerly place the items into the snowman's mouth.^000000";
			next;
			delitem 2279,1;  //Bomb_Wick
			delitem 7035,50;  //Matchstick
			delitem 526,100;  //Royal_Jelly
			emotion e_oh;
			mes "^3355FF*Vroooooom~~*";
			mes "*Bzzzzzt*";
			mes "*choogachooga*";
			mes "*Kapang!*^000000";
			getitem 5028,1; // Candle
			next;
			mes "[Audi]";
			mes "^555555Thank you for coming by.";
			mes "Please come again!";
			mes "Oh, and tell a friend!^000000";
			close;
		}
		break;
	case 9:
		if ((countitem(529) > 9) && (countitem(530) > 4) && (countitem(538) > 14) && (countitem(539) > 19) && (countitem(999) > 9)) { 
			mes "^3355FFYou gingerly place the items into the snowman's mouth.^000000";
			next;
			delitem 529,10;  //Candy
			delitem 530,5;  //Candy_Striper
			delitem 538,15;  //Well_Baked_Cookie
			delitem 539,20;  //Piece_Of_Cake
			delitem 999,10;  //Steel
			emotion e_oh;
			mes "^3355FF*Vroooooom~~*";
			mes "*Bzzzzzt*";
			mes "*choogachooga*";
			mes "*Kapang!*^000000";
			getitem 5024,1; // Hat_Of_Cake
			next;
			mes "[Audi]";
			mes "^555555Thank you for coming by.";
			mes "Please come again!";
			mes "Oh, and tell a friend!^000000";
			close;
		}
		break;
	case 10:
		mes "[Audi]";
		mes "^555555Please...";
		mes "Insert...";
		mes "Items.^000000";
		close;
	}
	emotion e_x;
	mes "[Audi]";
	mes "^555555Error Error!";
	mes "Incorrect items!^000000";
	next;
	mes "[Titicupe]";
	mes "I...";
	mes "I guess a lot of people would do anything to get their hands on some Blush.";
	close;
}
