stoneage8.5/服务器端lua文件/ablua/other/familybadge/init.lua
2020-06-22 17:49:02 +08:00

56 lines
1.2 KiB
Lua

local ={};
local ="";
function 字符串切割(,)
= ..
local t = {}
local = 1
repeat
local nexti = string.find(, , )
table.insert(t, string.sub(, ,nexti-string.len()))
= nexti + string.len()
until > string.len()
return t
end
function LoadFamilyBadge(fd)
lssproto.FamilyBadge(fd,);
end
function 读取家族徽章数据()
local ;
local ,;
= assert(io.open("./data/ablua/other/familybadge/data.txt", "r"))
= :read("*a"); -- 读取所有内容
:close();
= .."|"
if ~= "" then
= 0;
= (,"\n");
for b = 1,table.getn() do
if string.sub([b],1,1) ~= "#" then
= + 1;
[] = tonumber([b]);
end
end
for b=1,table.getn() do
if b~=table.getn() then
= .. [b].."|";
else
= .. [b];
end
end
end
end
function main()
=1000;
();
lssproto.GetFBData(,);
end
main();