--获取当前游戏坐标
local tab = {
"0033f86c60f103c40f183c71b0fc$5$48$14$8",
"60018006003fffffffc00$1$38$14$6",
"006007803e03983c61c18fffffff006@00$4$57$14$9",
"fe3bf87c60f183c60f1c7c7fb0fc$5$64$14$8",
"1f007f01ff1b063e0c6c199c371ffc1fe@000$9$69$15$9",
"20018006003e00fffffff$1$38$14$6",
"20018006001800fffffc0$1$29$14$6",
"3e3bf86c60f103c40f183c3fa07c$5$54$14$8",
"0ff0fce660f103c40f183033807c$6$49$14$8",
"20018004003fff$1$18$14$4",
}
index_zb = addTSOcrDictEx(tab)
-- 获取当前坐标1
function getzb()
local mapx, mapy = -1, -1
local zbColors =
{
0xd8cec0 ,
0xb6a99d ,
0xe7dccd,
}
for i = 1, #zbColors, 1 do
x, y = findColorInRegionFuzzy(zbColors[i], 90, 121, 77, 170, 78)
if x > 0 then
mapx = tsOcrText(index_zb, 110, 54, x + 2, 81, 'DBD0C4,484845', 90)
mapy = tsOcrText(index_zb, x, 59, 190, 80, 'DBD0C4,484845', 88)
break
end
end
mapx = tonumber(mapx)
mapy = tonumber(mapy)
if mapx ~= nil and mapy ~= nil then
return true, mapx, mapy
end
return false, -1, -1
end
a,b,c=getzb()
-- nLog(a)
nLog(b..","..c)
-- dialog(b..","..c)