office,132,29,2	script	Smokey	4_F_SKULL06GIRL,{
	disable_items;
	mes("[ "+CStr("Smokey","GREEN")+" ]");
	mes("Hello, Would you want to avail my Christmas Bundle?");
	mes(Itemlink(Lucky_Christmas_Box));
	next;
	mes("[ "+CStr("Smokey","GREEN")+" ]");
	mes("This box will give 1 random items when opened at these chances.");
	mes(Itemlink(Sagittarius_Diadem)+" - 2%");
	mes(Itemlink(Sagittarius_Crown)+" - 2%");
	mes(Itemlink(C_Over_Protector)+" - 10%");
	mes(Itemlink(C_Very_Cute_Doll_Hat)+" - 10%");
	mes(Itemlink(Donation_Card)+" - 1%");
	mes(Itemlink(Banshee_Egg_Box)+" - 5%");
	mes(Itemlink(Bloody_Dead_Branch)+" - 30%");
	mes(Itemlink(Red_Bag)+" - 30%");
	mes(Itemlink(Destruction_Scroll)+" - 50%");
	mes(Itemlink(Fruit_Of_Mastela)+" - 70%");
	next;
	mes("[ "+CStr("Smokey","GREEN")+" ]");
	mes("You have 3 option to acquire the box. How do you wish to buy it?");
	switch(select(
		" > Buy 50,000 Zeny (1 box):"+
		" > Buy 1,000 Credit (5 box):"+
		" > Exchange my useless costumes (5 box):"+
		" > ^777777Close^000000"
		)) {
	case 1:
		if( Zeny > 49999){
			Zeny -= 50000;
			getitem(Lucky_Christmas_Box,1);
			close();
		}
		mes("[ "+CStr("Smokey","GREEN")+" ]");
		mes("You do not have enough Zeny.");
		close();
	case 2:
		if(callfunc("F_CheckCredit") > 999 ) {
			callfunc("F_UpdateCredit",-1000);
			getitem(Lucky_Christmas_Box,5);
			close();
		}
		mes("[ "+CStr("Smokey","GREEN")+" ]");
		mes("You do not have enough Credits.");
		close();
	case 3:
		mes("[ "+CStr("Smokey","GREEN")+" ]");
		mes("Which of your costumes you want to exchange for 5 boxes of "+Itemlink(Lucky_Christmas_Box)+" ?");
		getinventorylist();
		.@i = 0;
		while ( .@i < @inventorylist_count ) {
			.@itemname$ = callfunc( "getitemname2", @inventorylist_id[.@i], @inventorylist_identify[.@i], @inventorylist_refine[.@i], @inventorylist_attribute[.@i], @inventorylist_card1[.@i], @inventorylist_card2[.@i], @inventorylist_card3[.@i], @inventorylist_card4[.@i], @inventorylist_bound[.@i]);
			.@menu$ = .@menu$ + @itemname2_info$ + .@itemname$ +":";
			.@i++;
		}
		.@select = select( .@menu$ ) - 1;
		if( getiteminfo(@inventorylist_id[.@select],ITEMINFO_LOC) == EQP_COSTUME_HEAD_TOP 
		|| getiteminfo(@inventorylist_id[.@select],ITEMINFO_LOC) == EQP_COSTUME_HEAD_MID 
		|| getiteminfo(@inventorylist_id[.@select],ITEMINFO_LOC) == EQP_COSTUME_HEAD_LOW) {
			if(@inventorylist_id[.@select] == 20307 || @inventorylist_id[.@select] == 19860) {
				mes("[ "+CStr("Opps... I can not accept freebies headgears","RED")+" ]");
				close();
			}
			delitem @inventorylist_id[.@select],1;	
			getitem(Lucky_Christmas_Box,5);
			close();
		}
		mes("[ "+CStr("Opps... You can only exchange costumes headgears","RED")+" ]");
		close();
	default:
		close();
	}
	close();
}
