local BankInItem = GetItemInfo(0)
local BankInMoney = GetItemInfo(1)
local g_Opn = 0 
function Bank()
	if 取地图名() ~= "洛阳" and 取距离(190,298) > 20 then 召唤坐骑(1) end
	跨图寻路(190,298,"洛阳")
	对话npc("褚先生")
	对话选项("打开银行")
	延迟(1000)
	local nRentNum = lua_dostring("nRentNum = Bank:GetRentBoxNum();","nRentNum","")
	for i = 1, nRentNum do
		if g_Opn == 0 then
			打印信息("BankInMoney = "..BankInMoney)
			if BankInMoney == 1 then
				LuaString("Bank:OpenSaveFrame();")
				LuaString("setmetatable(_G, {__index = InputMoney_Env});InputMoneyAccept_Clicked();")
			end
			g_Opn = g_Opn + 1
		end
		LuaString("setmetatable(_G, {__index = Bank_Env});Bank_patulousBox_Clicked("..i..");")
		local NullSeat = GetBankInfo(i)
		for v = 1, NullSeat do
			local ItemNum = BankStringFind(BankInItem)
			打印信息("存放物品在背包位子 = "..ItemNum)
			if ItemNum ~= -1 then
				BankIn(ItemNum,i)
			else
				打印信息("物品已经存放完毕!背包没有可存放物品")
				return
			end
			LuaString("setmetatable(_G, {__index = Bank_Env});Bank_PackUp_Clicked();")
		end
			--切换到下一个Bank
		LuaString("setmetatable(_G, {__index = Bank_Env});Bank_PackUp_Clicked();")
	end
	打印信息("物品已经存放完毕!!!")
end

打印信息("开始执行自动储存脚本!!请手动解锁二级密码!!!")
打印信息("需要存储的物品 = "..BankInItem)
if BankInItem ~= "" and BankInItem ~= nil then
	Bank()
end
