alberta_in,16,66,4	script	Claude	4_M_05,{
	disable_items();
	if(questprogress(30263) == 1){
		if(
			countitem(Bunny_Band)> 0 &&
			countitem(Chrystal_Pumps) > 0 &&
			countitem(White_Dyestuffs) > 0 &&
			countitem(Fluff) > 99
		){
			delitem(Bunny_Band,1);
			delitem(Chrystal_Pumps,1);
			delitem(White_Dyestuffs,1);
			delitem(Fluff,100);
			getitem(Slipper,1);
			completequest(30263);
			mes ("[ ^ff0000Claude^000000 ]");
			mes ("There you go.  Enjoy this ^ff0000"+getitemname(Slipper)+"^000000.");
			close;
		}	
		mes ("[ ^ff0000Claude^000000 ]");
		mes ("You're still missing something.");
		mes ("Be sure to bring me:");
		mes ("^ff00001x "+getitemname(Bunny_Band)+"^000000");
		mes ("^ff00001x "+getitemname(Chrystal_Pumps)+"^000000");
		mes ("^ff00001x "+getitemname(White_Dyestuffs)+"^000000");
		mes ("^ff0000100x "+getitemname(Fluff)+"^000000");
		close;
	}
	if(questprogress(30262) == 1){
		mes ("[ ^ff0000Claude^000000 ]");	
		mes ("*mumbles* This the third time");
		mes ("shipment has been late.  How am I");
		mes ("going to restock my vending");
		mes ("machines?");
		next;
		if(select("Excuse me","Leave") == 1){
			mes ("[ ^ff0000Claude^000000 ]");
			mes ("What is it?  Can't you see");
			mes ("I'm bussy?");
			next;
			if(select("Explain the problem","Leave") == 1) {
				mes ("[ ^ff0000Claude^000000 ]");
				mes ("Oh, a customer!  I'm sorry about");
				mes ("that, the materials used to make");
				mes ("the necessary charms are running");
				mes ("late.  I haven't been able to");
				mes ("restock.");
				next;
				mes("[ ^257995"+strcharinfo(PC_NAME)+"^000000 ]");
				mes ("Can I have my money back?");
				next;
				mes ("[ ^ff0000Claude^000000 ]");
				mes ("I'm afraid there are no refunds.");
				next;
				mes("[ ^257995"+strcharinfo(PC_NAME)+"^000000 ]");
				mes ("What?  How can you just take");
				mes ("peoples money like that?");
				next;
				mes ("[ ^ff0000Claude^000000 ]");
				mes ("Calm down.");
				mes ("Alright, if you bring me");
				mes ("the following items.  I'll see");
				mes ("to it your money is not wasted.");
				mes ("All you need to bring me is:");
				mes ("^ff00001x "+getitemname(Bunny_Band)+"^000000");
				mes ("^ff00001x "+getitemname(Chrystal_Pumps)+"^000000");
				mes ("^ff00001x "+getitemname(White_Dyestuffs)+"^000000");
				mes ("^ff0000100x "+getitemname(Fluff)+"^000000");
				changequest(30262,30263);
				close;
			} else {
				close;
			}	
		} else {
			close;	
		}	
	}
	mes ("*mumbles*");
	mes ("...");
	close;
}

xmas,145,236,1	script	Vending Machine#bs	2_COLAVEND,{
	if(questprogress(30263) == 2){
		mes ("[ ^ff0000Vending Machine^000000 ]");
		mes "...";
		close;
	}
	if(questprogress(30262) == 1){
		mes ("[ ^ff0000Vending Machine^000000 ]");
		mes ("What do you want to do?");
		next;
		switch(select("Nothing","Hit Vending Machine","Look behind the machine")){
		case 1: // Nothing
			mes ("[ ^ff0000Vending Machine^000000 ]");		
			mes ("^0055FF*OUT OF STOCK*^000000");
			mes ("See supplier about problem");
			close;
		case 2: // Hit Vending Machine
			specialeffect(102, AREA, "Vending Machine#bs");
			mes ("[ ^ff0000Vending Machine^000000 ]");		
			mes ("^0055FF*ERROR*^000000");		
			close;
		case 3: // Look behind the machine.
			mes ("You looked behind the machine and");
			mes ("see the name ^0055FFClaude^000000 and the town is");
			mes ("^0055FFAlberta^000000 inscribed.");
			close;
		default:
			close;
		}

	}
	if(questprogress(30261) == 1){
		if(!@try){
			mes ("[ ^ff0000Vending Machine^000000 ]");
			mes ("*Automated Advertisement*");
			mes ("^0055FFLucky Charms, your ticket to success!^000000");
			++@try;
			close;
		} else if(@try == 1){
			mes ("[ ^ff0000Vending Machine^000000 ]");
			mes ("^0055FFA1 B2 C3 D4 E5 F6 G7 H8 I19 J10 K11");
			mes ("L12 M13 N14 O15 P16 Q17 R18 S19 T20 U21 V22");
			mes ("W23 X24 Y25 Z26^000000");
			++@try;
			close;
		} else if(@try == 2){	
			mes ("[ ^ff0000Vending Machine^000000 ]");
			mes ("*the following text flashes on the vending machine*");
			mes ("^0055FFPlease press the correct buttons");
			mes ("for Bunny Slippers.^000000");
			++@try;
			close;
		} else if(@try == 3) {	
			mes ("[ ^ff0000Vending Machine^000000 ]");
			mes ("^0055FF*Press the correct button*^000000");
			setarray .code$,"B2","U21","N14","N14","Y25","S19","L12","I9","P16","P16","E5","R18","S19";
			for( .@i = 0; .@i < getarraysize(.code$); .@i++ ){
				input .@ask$;
				next;
				if (.@ask$ != .code$[.@i]) {
					mes ("[ ^ff0000Vending Machine^000000 ]");
					mes ("^0055FF*Error* Wrong code.^000000");
					close;
				}	
			}	
			mes ("[ ^ff0000Vending Machine^000000 ]");		
			mes ("*screen flashes again*");
			mes ("^0055FFNo sufficient funds available^000000");
			++@try;		
			close;
		} else if(@try == 4) {
			mes ("[ ^ff0000Vending Machine^000000 ]");
			mes ("What do you want to do?");
			next;
			switch(select("Nothing","Hit Vending Machine","Insert 1 million Zeny")){
			case 1: // Nothing
				mes ("[ ^ff0000Vending Machine^000000 ]");		
				mes ("*screen flashes again*");
				mes ("^0055FFNo sufficient funds available^000000");	
				close;
			case 2: // Hit Vending Machine
				specialeffect(102, AREA, "Vending Machine#bs");
				mes ("[ ^ff0000Vending Machine^000000 ]");		
				mes ("^0055FF*ERROR*^000000");
				close;
			case 3: // Insert 1 million Zeny
				mes ("[ ^ff0000Vending Machine^000000 ]");	
				if (Zeny > 999999){
					mes ("^0055FF*OUT OF STOCK*^000000");
					mes ("See supplier about problem");
					Zeny -= 1000000;
					changequest(30261,30262);
					close;
				}	
				mes ("^0055FF*ZENY NOT ENOUGH^000000");
				close;	
			default:
				close;
			}	
		}
	}
	mes ("[ ^ff0000Vending Machine^000000 ]");
	mes ("...");
	setquest(30261);
	close;
}