禁止组队和限制多少人组队lua(ablua版本)

  • A+
所属分类:LUA脚本
function FreePartyJoin( meindex, toindex )
	for i = 1, table.getn(floorid) do 
		if char.getInt(meindex, "地图号") == floorid[i] then
			char.TalkToCli(meindex, -1, "该地图不允许组队!", "黄色")
			return 0
		end
	end

	if char.getInt(meindex, "地图号") == 140 then
		if char.getWorkInt( meindex, "家族地图") ~= char.getWorkInt( toindex, "家族地图") then
			char.TalkToCli(meindex, -1, "不同家族无法进行组队!", "黄色")
			return 0
		end
	end
	
	
	
	if char.getInt(meindex, "地图号") == 11223 then
		num = 0
		for j = 1, 5 do
			pindex = char.getWorkInt(toindex, "队员" .. j) 
			if char.check(pindex) == 1 then
				num = num +1
				if num > 2 then
					char.TalkToCli(meindex, -1, "该队全已满三人,无法再加入团队!", "黄色")
					return 0
				end
			end
		end
	end
	return 1
end

function data()
	floorid = {40000, 12345}
	flooridforip = {40001, 40001, 40002, 40003, 40004, 40005, 40006, 40007, 40008, 40009, 40010, 40011, 40012, 40033, 40014, 40015, 40016, 40017, 40018, 40019, 40020}
end

function main()
	data()
end
  • 我的微信
  • 这是我的微信扫一扫
  • weinxin
  • 我的微信公众号
  • 我的微信公众号扫一扫
  • weinxin

发表评论

您必须登录才能发表评论!