mosuzi={}
mosuzi[1]="BBAABBBBAABBBBAABBBBAABBBBAABB"
mosuzi[2]="AAAAAABBBBAAAAAAAAAABBBBAAAAAA"
mosuzi[3]="AAAAAABBBBAAAAAAAABBBBAAAAAAAA"
mosuzi[4]="AABBAAAABBAAAAAAAABBBBAABBBBAA"
mosuzi[5]="AAAAAAAABBBBAAAAAABBBBAAAAAAAA"
mosuzi[6]="AAAAAAAABBBBAAAAAAAABBAAAAAAAA"
mosuzi[7]="AAAAAABBBBAABBBBAABBBBAABBBBAA"
mosuzi[8]="AAAAAAAABBAAAAAAAAAABBAAAAAAAA"
mosuzi[9]="AAAAAAAABBAAAAAAAABBBBAAAAAAAA"
aa=NPC对话内容
aa=string.gsub(aa," ","BB")
aa=string.gsub(aa,"{■/SCOLOR=117}","BB")
aa=string.gsub(aa,"{■/SCOLOR=58}","AA")
for i=1,50 do
k1=匹配内容(aa,[[({■/SCOLOR=\d{1,2}})]])
if k1~=nil then
aa=string.gsub(aa,k1,"BB")
end
end
for i=1,50 do
k1=匹配内容(aa,[[({■/SCOLOR=\d{3}})]])
if k1~=nil then
aa=string.gsub(aa,k1,"AA")
end
end
aa=string.gsub(aa,"\\","")
destring=匹配内容(aa,[[([A-B]{160})]])
pass={}
k2=1
desuzi={}
for i=1,5 do
desuzi[i]=string.sub(destring,k2,k2+5)
--输出信息(desuzi[i])
k2=k2+32
end
pass[1]=table.concat{desuzi[1],desuzi[2],desuzi[3],desuzi[4],desuzi[5]}
k2=1
desuzi={}
for i=1,5 do
desuzi[i]=string.sub(destring,k2+8,k2+13)
--输出信息(desuzi[i])
k2=k2+32
end
pass[2]=table.concat{desuzi[1],desuzi[2],desuzi[3],desuzi[4],desuzi[5]}
k2=1
desuzi={}
for i=1,5 do
desuzi[i]=string.sub(destring,k2+16,k2+21)
--输出信息(desuzi[i])
k2=k2+32
end
pass[3]=table.concat{desuzi[1],desuzi[2],desuzi[3],desuzi[4],desuzi[5]}
k2=1
desuzi={}
for i=1,5 do
desuzi[i]=string.sub(destring,k2+24,k2+29)
--输出信息(desuzi[i])
k2=k2+32
end
pass[4]=table.concat{desuzi[1],desuzi[2],desuzi[3],desuzi[4],desuzi[5]}
passcode=""
for i1=1,4 do
for i2=1,9 do
if pass[i1]==mosuzi[i2] then
--输出信息(i1)
passcode=table.concat{passcode,tostring(i2)}
end
end
end
findapi=匹配内容(NPC对话内容,[[(@@InPutString\d{1,3})]])
if findapi~=nil then
api=findapi
else
api=匹配内容(NPC对话内容,[[(@@InPutInteger\d{1,3})]])
end
合成命令(api,passcode)