只好自己动手了。搞了好久,发现lua和汉字是有点不兼容的,又弄了些取巧的办法。
function on_item1 (name, line, wildcards)
local number = 1
if string.find("一|二|三|四|五|六|七|八|九|十", string.sub(wildcards[1], 1, 1)) ~= nil then
number = ctonum(string.sub(wildcards[1], 1, string.len(wildcards[1])))
ArraySet ("item", string.lower(wildcards[2]), number)
else
ArraySet ("item", string.lower(wildcards[2]), 1)
end
end
效果:
waist 1
silver 51
bingpo zhang 1
sword 1
gan liang 10
gold 29
armor 1
boots 1
ring 1
blade 1
jiudai 8
head 1
staff 1
yangjing dan 66
necklace 1
wrists 1
surcoat 1
cloth 1
coin 12
hands 1
jinchuang yao 99 |