//==============================================
// Ͳ
// д by FPE (2006.6.26)
// Jathena++ ̳http://www.foxofice.net/bbs
//----------------------------------------------

payon_in02.gat,25,35,3	script	ͲԱ	85,{
	mes "[ͲԱ]";
	mes "ãܹļʸڹֹƵļͲҪҰæ";
	next;
	menu	"Ͳ",L_SUB,
		"ʲôǼͲ",-;
	mes "[ͲԱ]";
	mes "ͲԽͬһļʸһÿֻͲܷʸ500֧ʹüͲɻӦļʸ";
	next;
	mes "[ͲԱ]";
	mes "ͲŵǿӴſռͼٸͲҪӦļ500֧Ͳ1Ҫʼ";
	next;
	menu	"Ͳ",-,
		"´",L_EXIT;
L_SUB:
	mes "[ͲԱ]";
	mes "ּʸʸֱʾдּ";
	next;
	menu	"ʸ         - "+countitem(1750),L_SUB_1,
		"ʸ       - "+countitem(1770),L_SUB_2,
		"ʸ     - "+countitem(1753),L_SUB_3,
		"֮ʸ - "+countitem(1765),L_SUB_4,
		"ʸ       - "+countitem(1752),L_SUB_5,
		"ʸ       - "+countitem(1751),L_SUB_6,
		"ʸ     - "+countitem(1755),L_SUB_7,
		"ʸ     - "+countitem(1756),L_SUB_8,
		"ˮʸ     - "+countitem(1754),L_SUB_9,
		"ӰӼʸ     - "+countitem(1767),L_SUB_10,
		"μʸ     - "+countitem(1757),L_SUB_11,
		"ʸ     - "+countitem(1762),L_SUB_12;
L_SUB_1:
	set @Arrow,1750;
	set @Quiver,12004;
	goto L_CHECK;
L_SUB_2:
	set @Arrow,1770;
	set @Quiver,12005;
	goto L_CHECK;
L_SUB_3:
	set @Arrow,1753;
	set @Quiver,12006;
	goto L_CHECK;
L_SUB_4:
	set @Arrow,1765;
	set @Quiver,12007;
	goto L_CHECK;
L_SUB_5:
	set @Arrow,1752;
	set @Quiver,12008;
	goto L_CHECK;
L_SUB_6:
	set @Arrow,1751;
	set @Quiver,12009;
	goto L_CHECK;
L_SUB_7:
	set @Arrow,1755;
	set @Quiver,12010;
	goto L_CHECK;
L_SUB_8:
	set @Arrow,1756;
	set @Quiver,12011;
	goto L_CHECK;
L_SUB_9:
	set @Arrow,1754;
	set @Quiver,12012;
	goto L_CHECK;
L_SUB_10:
	set @Arrow,1767;
	set @Quiver,12013;
	goto L_CHECK;
L_SUB_11:
	set @Arrow,1757;
	set @Quiver,12014;
	goto L_CHECK;
L_SUB_12:
	set @Arrow,1762;
	set @Quiver,12015;
L_CHECK:
	if(countitem(@Arrow)<500 || countitem(7150)<1) goto L_NOARROW;
	if(countitem(@Arrow)<1000 || countitem(7150)<2) goto L_GETQUIVER_1;
	mes "[ͲԱ]";
	mes "ҪһͲȫ";
	next;
	menu	"ֻһͲͺ",L_GETQUIVER_1,
		"ȫ",-;
	if((countitem(@Arrow)/500)>=countitem(7150)) set @temp,countitem(7150);
	if((countitem(@Arrow)/500)<=countitem(7150)) set @temp,(countitem(@Arrow)/500);
	delitem @Arrow,(500 * @temp);
	delitem 7150,@temp;
	getitem @Quiver,@temp;
	goto L_GETQUIVER_2;
L_GETQUIVER_1:
	delitem @Arrow,500;
	delitem 7150,1;
	getitem @Quiver,1;
L_GETQUIVER_2:
	mes "[ͲԱ]";
	mes "ҪļͲҪ";
	next;
	menu	"",L_SUB,
		"´",L_EXIT;
L_NOARROW:
	mes "[ͲԱ]";
	mes "ܱǸҪ׼500֧"+getitemname(@Arrow)+"1ͲҲܰ"+getitemname(@Quiver)+"";
	close;
	end;
L_EXIT:
	mes "[ͲԱ]";
	mes "ӭʱҡ";
	close;
	end;
}