function xrbaozi_choose2()
	local m=flag.GetValue(42031)
	local n=flag.GetValue(42032)
	local pj=flag.GetValue(42004)
	local pj2=flag.GetValue(40030)
	local pj3=flag.GetValue(40031)
	local pj4=flag.GetValue(40032)
	if m==1 then  --保存队伍
		if n==1 then
			flag.SetValue(42041,1) --队伍1 保存过
			local fid=42041
			local pid
			for i=1,9,1 do
				pid=2^i
				if player.IsPlayerInTeam(pid)==1 then
					flag.SetValue(fid+i,1)
					flag.SetValue(40030,pj)
				else
					flag.SetValue(fid+i,0)
					flag.SetValue(40030,pj)
				end
			end
			ui.Message(90060)
			npc.TurnTo(811,98,-19,1)
		elseif n==2 then
			flag.SetValue(42051,1) --队伍1 保存过
			local fid=42051
			local pid
			for i=1,9,1 do
				pid=2^i
				if player.IsPlayerInTeam(pid)==1 then
					flag.SetValue(fid+i,1)
					flag.SetValue(40031,pj)
				else
					flag.SetValue(fid+i,0)
					flag.SetValue(40031,pj)
				end
			end
			ui.Message(90061)
			npc.TurnTo(811,98,-19,1)
		elseif n==3 then
			flag.SetValue(42061,1) --队伍1 保存过
			local fid=42061
			local pid
			for i=1,9,1 do
				pid=2^i
				if player.IsPlayerInTeam(pid)==1 then
					flag.SetValue(fid+i,1)
					flag.SetValue(40032,pj)
				else
					flag.SetValue(fid+i,0)
					flag.SetValue(40032,pj)
				end
			end
			ui.Message(90062)
			npc.TurnTo(811,98,-19,1)
		elseif n==4 then
			npc.TurnTo(811,98,-19,1)
		end
	elseif m==2 then   --载入队伍
		if n==1 then
			if flag.GetValue(42041)==1 then
				local fid=42042
				local pid
				for i=1,9,1 do
					pid=2^i
					if player.IsPlayerInTeam(pid)==1 then
						player.Remove(pid)
					end
					flag.SetValue(42021+i,0)
					flag.SetValue(42004,pj2)
				end
				for j=1,9,1 do
					if flag.GetValue(fid+j-1)==1 then
						pid=2^j
						player.Add(pid,0,1)
						flag.SetValue(42021+j,1)
						flag.SetValue(42004,pj2)
					end
				end
				map_reload()
				ui.Message(90067)
			else
				ui.Message(90064)
				npc.TurnTo(811,98,-19,1)
			end
			
		elseif n==2 then
			if flag.GetValue(42051)==1 then
				local fid=42052
				local pid
				for i=1,9,1 do
					pid=2^i
					if player.IsPlayerInTeam(pid)==1 then
						player.Remove(pid)
					end
					flag.SetValue(42021+i,0)
					flag.SetValue(42004,pj3)
				end
				for j=1,9,1 do
					if flag.GetValue(fid+j-1)==1 then
						pid=2^j
						player.Add(pid,0,1)
						flag.SetValue(42021+j,1)
						flag.SetValue(42004,pj3)
					end
				end
				map_reload()
				ui.Message(90067)
			else
				ui.Message(90065)
				npc.TurnTo(811,98,-19,1)
			end
			
		elseif n==3 then
			if flag.GetValue(42061)==1 then
				local fid=42062
				local pid
				for i=1,9,1 do
					pid=2^i
					if player.IsPlayerInTeam(pid)==1 then
						player.Remove(pid)
					end
					flag.SetValue(42021+i,0)
					flag.SetValue(42004,pj4)
				end
				for j=1,9,1 do
					if flag.GetValue(fid+j-1)==1 then
						pid=2^j
						player.Add(pid,0,1)
						flag.SetValue(42021+j,1)
						flag.SetValue(42004,pj4)
					end
				end
				map_reload()
				ui.Message(90067)
			else
				ui.Message(90066)
				npc.TurnTo(811,98,-19,1)
			end
			
		elseif n==4 then
			npc.TurnTo(811,98,-19,1)
		end
	elseif m==3 then
	
	elseif m==4 then
		
	end
	global.Print(pj)
	global.Print(pj2)
end