// @unloadnpc changecart
// @loadnpc npc/thor/changecart.txt

-	script	changecart	-1,{
    OnInit:
    	bindatcmd "changecart","changecart::OnChangeCart", 0, 99;
    	end;


OnChangeCart:
	if (!#mobile){
		dispbottom "Sorry, this command is available for mobile users only.";	
		end;
	}	
	if (!getskilllv(MC_CHANGECART)) {
		dispbottom "Sorry, you don't have Change Cart Quest skill.";
		end;
	}
	if (!checkcart()){
		dispbottom "Sorry, you don't have a cart";
		end;
	}
	if (BaseLevel <= 40) {
		mes "[ Change Cart ]";
		mes "Select Cart:";
		next;
		switch(select(
	 		" > Normal Cart:"+
	 		" > ^777777Close^000000"
		)) {	
		case 1:
			setcart(1);
			close;
		case 2:
			close;
		}
		close;
			
	}
	else if (BaseLevel <= 65) {
		mes "[ Change Cart ]";
		mes "Select Cart:";
		next;
		switch(select(
	 		" > Normal Cart:"+
	 		" > Wooden Cart:"+
	 		 " > ^777777Close^000000"
		)) {	
		case 1:
			setcart(1);
			close;
		case 2:
			setcart(2);
			close;
		case 3:
			close;
		}
		close;
	}
	else if (BaseLevel <= 80) {
		mes "[ Change Cart ]";
		mes "Select Cart:";
		next;
		switch(select(
	 		" > Normal Cart:"+
	 		" > Wooden Cart:"+
	 		" > Flower Cart:"+
	 		 " > ^777777Close^000000"
		)) {	
		case 1:
			setcart(1);
			close;
		case 2:
			setcart(2);
			close;
		case 3:
			setcart(3);
			close;
		case 4:
			close;
		}
		close;
	}
	else if (BaseLevel <= 90) {
		mes "[ Change Cart ]";
		mes "Select Cart:";
		next;
		switch(select(
	 		" > Normal Cart:"+
	 		" > Wooden Cart:"+
	 		" > Flower Cart:"+
	 		" > Panda Cart:"+
	 		 " > ^777777Close^000000"
		)) {	
		case 1:
			setcart(1);
			close;
		case 2:
			setcart(2);
			close;
		case 3:
			setcart(3);
			close;
		case 4:
			setcart(4);
			close;
		case 5:
			close;
		}
		close;
	}
	else if (BaseLevel >= 91) {
		mes "[ Change Cart ]";
		mes "Select Cart:";
		next;
		switch(select(
	 		" > Normal Cart:"+
	 		" > Wooden Cart:"+
	 		" > Flower Cart:"+
	 		" > Panda Cart:"+
	 		" > Big Wheels Cart:"+
	 		 " > ^777777Close^000000"
		)) {	
		case 1:
			setcart(1);
			close;
		case 2:
			setcart(2);
			close;
		case 3:
			setcart(3);
			close;
		case 4:
			setcart(4);
			close;
		case 5:
			setcart(5);
			close;
		case 6:
			close;
		}
		close;
	}
	end;
}
