--2018-04-01 面板左上角红心白手套位置左移
require "TSLib"
local gamebid = "com.idleif.abyssrium"
init(0)
w,h = getScreenSize()
if w > h then
dialog("请将模拟器设置为竖屏,建议分辨率:720x1280")
lua_exit()
end
if w == 1080 and h == 1920 then
lx0,ly0,rx0,ry0 = 300,220,1070,300
lx,ly,rx,ry = 0,0,1050,70
elseif w == 720 and h == 1280 then
lx0,ly0,rx0,ry0 = 10,120,710,200
lx,ly,rx,ry = 0,0,700,80
elseif w == 640 and h == 1136 then
lx0,ly0,rx0,ry0 = 10,130,630,180
lx,ly,rx,ry = 0,0,620,40
elseif w == 1242 and h == 2208 then
lx0,ly0,rx0,ry0 = 10,200,1232,260
lx,ly,rx,ry = 0,0,1222,60
else
dialog("脚本尚未完全适配您的手机分辨率,不保证运行效果")
mSleep(3000)
end
glSettings({switch = "1001", x1 = lx0, y1 = ly0, x2 = rx0, y2 = ry0,tsp_switch = false})
function hyStrNum(str)
if str==nil then return 40 end
local strn = nil
for i=1,string.len(str) do
local num=string.sub(str,i,i)
if tonumber(num) then
if strn==nil then
strn=num
else
strn=strn..num
end
end
end
return tonumber(strn)
end
function upgrade(... ) --升级
if multiColTap( ... ) then
sign_upgrade = 1
end
end
function unlock()--防锁屏
flag = deviceIsLock()
if flag ~= 0 then
sysver = getOSVer()
sysint = tonumber(string.sub(sysver, 1, 1)..string.sub(sysver, 2, 2))--转化为数字版本号
if sysint == 10 then
toast("解锁!",1)
pressHomeKey(0)
pressHomeKey(1)
mSleep(500)
unlockDevice()
mSleep(50)
pressHomeKey(0)
pressHomeKey(1)
mSleep(500)
else
unlockDevice()
end
end
end
function gamestart()
runApp(gamebid)
mSleep(3000)
end
UINew("深海水族馆挂机辅助","立即运行","立即退出","shszg.dat",0,30)
UILabel("活动期间请勿使用和糖果颜色接近主题,以便提高收集效率!!!",24,"center","255,100,100")
UILabel("收集设置",20,"center","230,50,92")
UIRadio("bubble","日常红心,活动物品","0")
UILabel("基础功能",20,"center","230,50,92")
UICheck("basic1,basic2","自动点击,自动收集","0@1")
UILabel("点击速度设置",20,"center","230,50,92")
UIRadio("step","iPhone 6+,iPhone 5 或安卓旗舰,低配千元安卓机,选这个保证不卡,自定义速度","3")
UILabel("自定义速度设置",20,"center","230,50,92")
UIEdit("speedset","每秒点击次数","30",15,"left","255,0,0","number")
UILabel("是否显示准星",20,"center","230,50,92")
UIRadio("wztouch","显示,不显示","0")
UILabel("珊瑚设置",20,"center","230,50,92")
UIRadio("shanhu","孤独的珊瑚石,小珊瑚石","0")
UILabel("显示设置",20,"center","230,50,92")
UIRadio("case","全屏不显示菜单,石头界面,扩张界面","0")
UILabel("功能设置",20,"center","230,50,92")
UICheck("func1,func2,func3","升级石头,使用技能,收割农场","0@1")
UILabel("使用须知",20,"left","230,50,92")
UILabel("★ 加速为技能冷却、广告冷却、农场产出时间加速",16,"left","230,50,92")
UILabel("★ 请将体积较大的鱼收起以便更容易找到红心。",16,"left","230,50,92")
UILabel("★ 每秒点击次数最好不要超过40次,否则游戏会卡死",16,"left","230,50,92")
UILabel("★ 活动期间建议使用全屏模式,半屏会导致有些鱼飘到上面去找不到",16,"left","230,50,92")
UILabel("★ 活动期间建议使用活动范围在珊瑚石周围的鱼比如小丑鱼",16,"left","230,50,92")
UILabel("★ 活动期间建议使用与活动物品色差较大的主题皮肤,否则会严重影响找色",16,"left","230,50,92")
UIShow()
if shanhu == "孤独的珊瑚石" then
nLog("孤独的珊瑚石")
shanhushi = 0
elseif shanhu == "小珊瑚石" then
nLog("小珊瑚石")
shanhushi = 1
end
if step == "iPhone 6+" then
tapms = 15
elseif step == "iPhone 5 或安卓旗舰" then
tapms = 23
elseif step == "低配千元安卓机" then
tapms = 40
elseif step == "选这个保证不卡" then
tapms = 190
elseif step == "自定义速度" then
tapms = hyStrNum(speedset)
tapms = 1000/tapms-10
if tapms < 1 then
tapms = 30
end
mSleep(2000)
else
tapms = 30
end
if basic2 == "自动收集" then
if bubble == "日常红心" then
seconds = 5
elseif bubble == "活动物品" then
seconds = 2
end
else
seconds = 2
end
if case == "石头界面" or "扩张界面" then
fh = h*0.38
elseif case == "全屏不显示菜单" then
fh = h*0.8
end
if wztouch == "显示" then
tapimg = "wzpoint.png"
mLog("显示准星")
else
tapimg = "不显示准星.png"
mLog("不显示准星")
end
if w == 640 and h == 1136 then
require "5c"
elseif w == 1536 and h == 2048 then
require "ipadhd"
elseif w == 750 and h == 1334 then
require "6s"
elseif w == 1242 and h == 2208 then
require "6P"
elseif w == 720 and h == 1280 then
require "720p"
elseif w == 1080 and h == 1920 then
require "1080p"
else
setScreenScale(true, 720, 1280)
require "720p"
setScreenScale(false)
end
while (true) do
unlock()
if frontAppBid() == gamebid then
if basic1 == "自动点击" then
local t1 = os.time()
if adtime ~= 1 then
while (true) do
tap(w/3,h/3,tapms,tapimg)
mSleep(tapms)
if os.time() - t1 >= seconds then
break
end
end
end
end
daily()--日常弹窗检测
if basic2 == "自动收集" then
if bubble == "日常红心" then
collect()
elseif bubble == "活动物品" then
festival()
end
end
if case == "石头界面" then
menu()
elseif case == "扩张界面" then
expand()
elseif case == "全屏不显示菜单" then
shutmenu()
end
if func1 == "升级石头" then
stoneup()
end
if func2 == "使用技能" then
stoneskill()
end
if func3 == "收割农场" then
farm()
end
else
gamestart()
end
end
再放一个 1080 的安卓分辨率,主要是图色特征:
[Lua] 纯文本查看复制代码
function daily()
multiColTap({{ 471, 818, 0xece2ed},{ 647, 820, 0xece2ed},{ 647, 755, 0x86cc4a},{ 565, 1192, 0xffffff}})--离线奖励
multiColTap({{ 503, 1251, 0xff547b},{ 572, 1250, 0xff547b},{ 506, 1308, 0xff547b},{ 567, 1304, 0xff547b}})--签到
multiColTap({{ 1038, 1033, 0xd1e926},{ 1048, 1041, 0xd3ea26},{ 1071, 1016, 0xcce326},{ 730, 1232, 0x7d7d85},{ 754, 1220, 0x808188}})--发现隐藏的鱼C
multiColTap({{ 634, 1548, 0xffae00},{ 647, 1548, 0xffae00},{ 737, 1546, 0xffae00},{ 737, 1552, 0xffae00},{ 377, 1554, 0x66686a}})--关闭宝箱
end
function collect()
x,y = findMultiColorInRegionFuzzy( 0xd965ab, "5|-1|0xd966ab,2|3|0xd964ab", 90, 192, 205, 1050, fh)--鱼红心泡泡
if x ~= -1 then
tap(x,y)
mLog("找到一颗心233")
end
end
function festival()
x, y = findMultiColorInRegionFuzzy(0xffdcff, "-17|3|0xffefff,-23|-20|0xffe0ff,-10|-27|0xffd3ff",95,112, 269, 1061, fh)--2020 迎春活动
if x ~= -1 then
tap(x,y,1,"click.png")
mLog("2020 迎春活动呀~坐标"..x.."&"..y)
else
x, y = findMultiColorInRegionFuzzy(0xffd2ff, "0|17|0xfffdff,-14|14|0xffe0ff,16|14|0xffe7ff", 95, 112, 269, 1061, fh)
if x ~= -1 then
tap(x,y,1,"click.png")
mLog("2020 迎春活动哇~坐标"..x.."&"..y)
else
x, y = findMultiColorInRegionFuzzy(0xffdaff, "-8|-30|0xffd2ff,-25|-17|0xffe0ff", 95,112, 269, 1061, fh)
if x ~= -1 then
tap(x,y,1,"click.png")
mLog("2020 迎春活动哦~坐标:"..x.."&"..y)
end
end
end
end
if shanhushi == 0 then--大
左上角红心小手 = {
{ 36, 1020, 0xbe516a},
{ 44, 1022, 0xbe516a},
{ 45, 1077, 0xbb5566},
{ 62, 1085, 0xffffff},
}
elseif shanhushi == 1 then--小
左上角红心小手 = {
{40,1016,0x6a51be},
{45,1016,0x6a51be},
{52,1085,0xffffff},
{34,1076,0x6655bb},
}
end
x,y = findMultiColorInRegionFuzzyByTable( 左上角红心小手, 90, 20, 1011, 164, 1110)
if x ~= -1 then
halfmenu = true
else
halfmenu = false
end
function expand()
if halfmenu == false then
tap(981, 1844)
if multiColor({
{ 509, 1809, 0xffffff},
{ 544, 1810, 0xffffff},
{ 544, 1842, 0xffffff},
{ 510, 1841, 0xffffff},
}) == false then--扩张未开
tap(544, 1842)
end
end
end
function stonemove()
if shanhushi == 0 then
if multiColor({{117, 1821, 0xffffff},{ 117, 1838, 0xffffff},{ 92, 1840, 0xffffff}}) == false then--石头未开
tap(107, 1836)
mLog("打开石头")
else
x,y = findMultiColorInRegionFuzzy( 0xfeffff, "0|8|0xffffff,14|-2|0xffffff,13|14|0xfeffff", 90, 497, 1188, 565, 1232)--技能
if x == -1 then
moveTo(w/2,h-400,w/2,h-200,10)
end
end
elseif shanhushi == 1 then
if multiColor({{117, 1821, 0xffffff},{ 117, 1838, 0xffffff},{ 92, 1840, 0xffffff}}) == false then--石头未开
tap(107, 1836)
else
x,y = findMultiColorInRegionFuzzy( 0xfeffff, "0|8|0xffffff,14|-2|0xffffff,13|14|0xfeffff,14|-2|0xffffff,13|14|0xfeffff,14|-2|0xffffff,13|14|0xfeffff", 90, 497, 1188, 565, 1232)--技能
if x == -1 then
moveTo(w/2,h-400,w/2,h-200,10)
end
end
end
end
function menu()
if halfmemu == false then
tap(981, 1844)
else
stonemove()
end
end
function shutmenu()
if halfmemu == true then
tap(986, 1824)
end
end
function farmmove()
if shanhushi == 0 then
if multiColor({{ 246, 1835, 0xffffff},{ 238, 1811, 0xffffff},{ 263, 1826, 0xffffff},}) == false then--珊瑚未开
tap(238, 1811)
else
x,y = findMultiColorInRegionFuzzy( 0x1c2935, "9|-12|0x1c2935,75|-24|0x1c2935,106|12|0x1c2935,71|10|0xffffff", 90, 31, 1188, 179, 1339)--海带农场
if x == -1 then
moveTo(w/2,h-400,w/2,h-200,10)
end
end
end
end
function farm()
if shanhushi == 0 then
x,y = findMultiColorInRegionFuzzy( 0x2c2885, "0|10|0x30228c,4|18|0x30218d", 90, 91, 699, 130, 730)--半屏海胆
if x ~= -1 then
tap(x,398)
mSleep(500)
mLog("收割海胆~")
end
x,y = findMultiColorInRegionFuzzy( 0x5ab866, "-9|7|0x58b96a,-15|15|0x55bb71,-10|21|0x45a37e,-3|14|0x419f7a,6|5|0x3b976b", 90, 152, 238, 244, 321)--半屏海带
if x ~= -1 then
tap(x,360)
mSleep(500)
mLog("收割海带~")
end
x,y = findMultiColorInRegionFuzzy( 0xdae6e8, "2|9|0xfafffd,7|7|0xfafffd,10|6|0xfafffd,5|11|0xfafffd,13|16|0xdae6e9", 90, 839, 264, 924, 339)--半屏贝壳
if x ~= -1 then
tap(x,398)
mSleep(500)
mLog("收割贝壳~")
end
x,y = findMultiColorInRegionFuzzy( 0x2c2885, "0|10|0x30228c,4|18|0x30218d", 90, 91, 699, 130, 730)--全屏海胆
if x ~= -1 then
tap(x,823)
mSleep(500)
mLog("收割海胆~")
end
x,y = findMultiColorInRegionFuzzy( 0x55bb72, "8|-7|0x58b96b,16|-14|0x5bb867,22|-10|0x3b9769,14|-2|0x409e7a,7|5|0x44a280", 90, 177, 627, 251, 698)--全屏海带
if x ~= -1 then
tap(x,747)
mSleep(500)
mLog("收割海带~")
end
x,y = findMultiColorInRegionFuzzy( 0xdae6e9, "-1|8|0xfafffd,5|8|0xfafffd,7|7|0xfafffd,0|12|0xfafffd,9|16|0xdae6e9", 90, 829, 643, 903, 715)--全屏贝壳
if x ~= -1 then
tap(x,773)
mSleep(500)
mLog("收割贝壳~")
end
end
end
function stoneup()
x,y = findMultiColorInRegionFuzzy( 0xfbae17, "108|0|0xfbae17,-2|101|0xfbae17,111|101|0xfbae17", 90, 33, 1179, 174, 1774)--获取升级奖励
if x ~= -1 then
tap(x,y)
end
x1=876
y1=1536
multiColTap({{x1, y1, 0xf7f1fe},{ x1+210,y1, 0x0099bc},{ x1, y1+70, 0xffffff},{ x1+210, y1+70, 0x0099bc}})--升级珊瑚石(蓝色)
multiColTap({{x1, y1, 0xf7f1fe},{ x1+210,y1, 0xe8972d},{ x1, y1+70, 0xe8972d},{ x1+210, y1+70, 0xffffff}})--升级珊瑚石(黄色)
end
function stoneskill()
if shanhushi == 0 then
multiColTap({
{ 155, 1322, 0xf9f9f9},
{ 180, 1322, 0xf9f9f9},
{ 208, 1322, 0xf9f9f9},
})--火山爆发
multiColTap({
{ 625, 1340, 0x2f7496},
{ 615, 1396, 0x172e3f},
{ 607, 1360, 0xececec},
})--月之歌
multiColTap({
{ 406, 1311, 0xe9566e},
{ 410, 1326, 0xe9566e},
{ 433, 1314, 0xdb4964},
})--海鲜大餐
elseif shanhushi == 1 then
x,y = findMultiColorInRegionFuzzy( 0xff815a, "0|-34|0xff815a,-26|-8|0xff815a", 90, 93, 1218, 272, 1401)--盛开的珊瑚石
if x~= -1 then
tap(x,y)
mLog("盛开的珊瑚石")
end
x,y = findMultiColorInRegionFuzzy( 0x78b259, "8|-9|0x589b4c,47|-69|0xfbe7d1,86|-11|0x33642a", 90, 334, 1222, 508, 1393)--花的祝福
if x~= -1 then
tap(x,y)
mLog("花的祝福")
end
x,y = findMultiColorInRegionFuzzy( 0x2f7496, "47|-11|0x144d6d,38|0|0xfcf2c3,88|33|0x27607f", 90, 565, 1222, 747, 1396)--萤火的祝福
if x~= -1 then
tap(x,y)
mLog("萤火的祝福")
end
end
end