Post by yamada on Jun 3, 2017 17:19:18 GMT
[Auto Script] Monster Super League - Auto Refill Energy - Auto Catch Variant, Rare, S.Rare, Exotic, Legendary Download! Free Source code >> DoWnload Monster Super League << >> Download AutoMainPNG 1.01.2 << - Works with Android with Auto resolution - use DAEMON - AnkuluaPro2 v7.0.0 or above Screenshot data is included in the download file. This script is created with AutoMainPNG. >>> Manual of AutoMainPNG <<< >>> AutoMainPNG main page <<< The translation function is on the left |
AnkuLua folder <<<==== MHR Android.luae only. A png file is unnecessary for this script. |
--説明 ページ
--http://capsulecontents.client.jp/
Settings:setScriptDimension(true, 1920)
Settings:setCompareDimension(true, 1920)
IfSet=20 -- 画像認識のしきい値 大きいほどあいまいになる
--フルスクリーン用
setImmersiveMode(true)
--split 指定文字に分解する
function split(str, del)
p, nrep = str:gsub("%s*"..del.."%s*", "")
return { str:match((("%s*(.-)%s*"..del.."%s*"):rep(nrep).."(.*)")) }
end
-- 他の画面サイズに対して修正する ww,hh
function XYren(xx,yy)
ww=1
hh=1
return {math.floor(xx*ww+0.5),math.floor(yy*hh+0.5)}
end
-- ankulua用 getColors
function getColors(list)
local colors = {}
local r, g, b = getColor(Location(list[1][1], list[1][2]))
colors[1] = r * 256 * 256 + g * 256 + b
usePreviousSnap(true)
for i = 2, #list do
r, g, b = getColor(Location(list[i][1], list[i][2]))
colors[i] = r * 256 * 256 + g * 256 + b
end
usePreviousSnap(false)
return colors
end
-- 取得した画像をチェック R G Bに分解し判定
function RGBchek(a,b)
local r1,g1,b1 = intToRgb(a)
local ra1,ga1,ba1 = intToRgb(b)
if math.abs(ra1-r1) <= IfSet then
if math.abs(ga1-g1) <= IfSet then
if math.abs(ba1-b1) <= IfSet then
return 1
end
end
end
return 0
end
-- RGBを分解
function intToRgb(val)
local GetRed = val % 256
val= ( val - GetRed ) / 256
local GetGreen = val % 256
val= ( val - GetGreen ) / 256
local GetBlue = val % 256
return GetBlue,GetGreen,GetRed
end
gColor = {}
gColor.new = function()
local obj ={}
local obj_name = {"Select" , "color_a" , "color_b"
, "tap" , "name" , "GC", "value"
, "color_c" , "color_d"}
for i,v in pairs(obj_name) do
obj[v] = {}
end
obj.index = 0
obj.GCset = function(self)
local a = split(self,"^")
for i,v in pairs(a) do
local a = split(v,",")
obj.index = obj.index + 1
obj["Select"][obj.index] = a[1]
obj["color_a"][obj.index] = a[2]
obj.GC[obj.index*2-1] = XYren(a[3],a[4])
obj["color_b"][obj.index] = a[5]
obj.GC[obj.index*2] = XYren(a[6],a[7])
obj["tap"][obj.index] = a[8]
obj["name"][obj.index] = a[9]
end
end
obj.GCfaind = function()
local rgb = getColors(obj.GC)
obj.value={}
for i=1 , obj.index do
obj.value[i] = {RGBchek(rgb[i*2-1],obj.color_a[i]) ,
RGBchek(rgb[i*2],obj.color_b[i])}
end
end
obj.GCGet = function()
local rgb = getColors(obj.GC)
obj.color_c = {}
obj.color_d = {}
for i=1 , obj.index do
obj["color_c"][i] = rgb[i*2-1]
obj["color_d"][i] = rgb[i*2]
end
end
obj.GCtap = function(self)
local txy = split(obj.tap[self],"_")
txy = XYren(txy[1],txy[2])
click(Location(txy[1],txy[2]))
end
return obj
end
gColor_Dat = {}
gColor_Dat = gColor.new() -- 初期化、インスタンス作成
--画面情報とタップデータ
dat =
"180733,0x261511,63,1029,0x7C432B,1632,1047,73_1028,dumy^"..
"180742,0x34EF9B,63,1029,0x7C432B,1632,1047,1759_1022,dumy^"..
"180832,0xE60B31,437,142,0x7E452A,1486,361,1556_333,dumy^"..
"180849,0x3E2821,437,133,0x79635A,567,160,677_184,dumy^"..
"231155,0x097A7A,1443,276,0xED0D3F,736,133,1549_300,dumy^"..
"180900,0xB25E37,569,162,0x434740,1438,311,1702_119,dumy^"..
"180924,0x01577F,1572,991,0x00A7AF,1620,942,1713_972,dumy^"..
"181009,0xF2C544,49,59,0x2E8947,1373,212,801_713,dumy^"..
"181020,0xF7BA5F,1702,68,0xF2C544,53,59,1734_436,dumy^"..
"181045,0x281B17,1564,779,0x016369,1539,912,1572_771,dumy^"..
"181053,0x077879,609,613,0xAF5E38,1297,609,797_637,dumy^"..
"181101,0x41F4A4,1564,779,0x00646A,1544,913,1700_935,dumy^"..
"184139,0x281B17,824,658,0xF3D362,1210,141,831_653,dumy^"..
"184153,0x3BF2A0,824,658,0xF3D362,1210,141,964_505,dumy^"..
"191250,0xF3D362,1211,140,0xB21302,197,233,973_548,dumy^"..
"203757,0x097A7A,762,598,0xEAD7BF,1378,391,1380_392,dumy^"..
"204223,0x087A7A,762,624,0xEBDAC3,1442,217,1444_218,dumy^"..
"205502,0x097A7A,762,605,0xEAD6BE,1378,382,1380_383,dumy^"..
"205743,0xE1AC7A,872,643,0x075F5D,716,916,875_892,B5743^"..
"205750,0x097B7B,701,595,0x843CFA,993,596,837_617,B5750^"..
"205841,0xB45F2F,626,839,0x52303F,1718,385,1763_354,dumy^"..
"001920,0x0B7F7C,1606,681,0x68BB1C,1227,235,1440_710,dumy^"..
"001931,0xEBD9C2,1725,92,0x273C38,1605,680,1727_93,dumy"
gColor_Dat.GCset(dat) --検索データーセット
dat =
"205855,0x281B17,782,823,0x624F1C,67,57,788_813,dumy^"..
"205905,0x281B17,872,823,0x624F1C,54,57,879_815,dumy^"..
"205912,0x281B17,962,823,0x624F1C,54,57,968_814,dumy^"..
"205919,0x281B17,1052,823,0x614F1B,50,59,1058_814,dumy^"..
"205926,0x604E1B,50,60,0x097B7A,1398,807,1630_828,dumy^"..
"210335,0x097B7A,764,649,0xEBDAC4,1380,340,968_667,dumy^"..
"210347,0x482F26,1055,823,0x482F26,963,823,1859_152,dumy^"..
"203807,0xFC9C60,79,431,0x753725,78,356,1743_552,B3807^"..
"223543,0xDC3A40,299,679,0x361F1A,222,728,370_721,dumy^"..
"223543A,0xD9393E,690,678,0x361F1A,612,726,762_715,dumy^"..
"223543B,0xD5383B,1080,677,0x361F1A,1005,727,1157_713,dumy^"..
"223543C,0xD4373A,1473,676,0x361F1A,1414,733,1546_719,dumy^"..
"094014,0x228654,1476,678,0x361F1A,1401,725,1541_721,dumy^"..
"094014A,0x218553,1082,678,0x361F1A,1004,725,1161_730,dumy^"..
"094014B,0x218353,691,676,0x361F1A,611,729,763_726,dumy^"..
"094014C,0x218553,298,678,0x361F1A,234,733,370_738,dumy^"..
"094015,0xEFC246,1464,674,0x361F1A,1403,730,1550_721,dumy^"..
"094015A,0xEFC246,1072,674,0x361F1A,1008,729,1148_730,dumy^"..
"094015B,0xEFC246,679,674,0x361F1A,617,733,759_730,dumy^"..
"094015C,0xEFC246,286,674,0x361F1A,223,731,366_734,dumy^"..
"094016,0xDC4DC5,1477,678,0x361F1A,1414,733,1541_734,dumy"
gColor_Dat.GCset(dat) --検索データーセット
dat =
"094016A,0xDC4DC5,1085,678,0x361F1A,1012,733,1161_738,dumy^"..
"094016B,0xDD4EC3,693,677,0x361F1A,632,737,759_730,dumy^"..
"094016C,0xDF51BF,301,678,0x361F1A,222,729,370_730,dumy^"..
"165416,0xD3363A,1540,722,0x361F1A,1489,779,1621_771,dumy^"..
"165416A,0xD23639,1102,721,0x361F1A,1029,775,1177_767,dumy^"..
"165416B,0xD4373A,665,722,0x361F1A,602,783,742_776,dumy^"..
"165416C,0xD4373A,227,722,0x361F1A,172,779,303_771,dumy^"..
"165417,0x238A55,1549,722,0x361F1A,1485,783,1612_767,dumy^"..
"165417A,0x228755,1108,723,0x361F1A,1037,779,1173_776,dumy^"..
"165417B,0x228755,669,724,0x361F1A,594,783,734_763,dumy^"..
"165417C,0x218553,230,723,0x361F1A,163,779,295_771,dumy^"..
"165419,0xEFC246,1532,720,0x361F1A,1477,775,1612_771,dumy^"..
"165419A,0xEFC246,1094,720,0x361F1A,1037,783,1173_771,dumy^"..
"165419B,0xEFC246,656,720,0x361F1A,607,783,742_767,dumy^"..
"165419C,0xEFC246,218,720,0x361F1A,158,775,296_766,dumy^"..
"170719,0xDF50C1,1547,723,0x361F1A,1469,775,1616_765,dumy^"..
"170719A,0xE153BC,1111,723,0x361F1A,1034,776,1178_765,dumy^"..
"170719B,0xDD4EC3,670,723,0x361F1A,594,771,740_765,dumy^"..
"170719C,0xDA49C9,230,723,0x361F1A,158,777,302_766,dumy^"..
"130903,0x56382D,1514,12,0xFFD952,1747,137,1752_168,B0903^"..
"181532,0x7E1C14,1721,566,0xB73127,1749,559,81_384,dumy^"..
"203119,0x744132,856,812,0x0B7E7C,1227,820,1085_838,dumy"
gColor_Dat.GCset(dat) --検索データーセット
gAUTO_Dat = {}
gAUTO_Dat = gColor.new() -- 初期化、インスタンス作成
dat =
"102642,0xE6D8AA,80,338,0xF9D3F0,79,441,1727_94,dumy^"..
"102650,0xF8D4AD,29,387,0xE8C29E,132,388,1727_94,dumy"
gAUTO_Dat.GCset(dat) --検索データーセット
-- タップ前に実施する
function Tap_Mae(con)
--###DATATAPMAE###
if gColor_Dat.name[con] == "B5743" then --エネルギー補充のため
if Cot1 >= 2 then
click(Location(1697,117))
Cot1 = 0
IF_Exit = 1
end
end
if gColor_Dat.name[con] == "B3807" then --捕獲行動
local AUTOCheck = 0
for con1 = 1 , 2 do
for con2 = 1 , gAUTO_Dat.index do
gAUTO_Dat.GCfaind() --座標の色情報検索
if (gAUTO_Dat.value[con2][1] + gAUTO_Dat.value[con2][2]) == 2 then
AUTOCheck = AUTOCheck + 1
end
end
end
if AUTOCheck ~= 4 then
IF_Exit = 1
end
if Cot2 >= 1 and AUTOCheck == 4 then
click(Location(82,389))
Cot2 = 0
IF_Exit = 1
end
end
return
end
-- タップ後に実施する
function Tap_Ato(con)
--###DATATAPATO###
--###DATATAPATO###
if gColor_Dat.name[con] == "B5750" then --エネルギー補充のカウント
Cot1 = Cot1 + 1
end
if gColor_Dat.name[con] == "B0903" then --エネルギー補充のカウント
Cot2 = Cot2 + 1
end
return
end
--###DATATHANSU###
Cot1 = 0 --B5743-B5750
Cot2 = 0 --B3807-B0903
finGS = 0
doloopB = true
while doloopB do
gColor_Dat.GCfaind() --座標の色情報検索
IF_Exit = 0 -- タップ前に実施した内容により登録タップを飛ばす。
for con = 1 , gColor_Dat.index do
if (gColor_Dat.value[con][1] + gColor_Dat.value[con][2]) == 2 then
Tap_Mae(con) -- タップ前に実施する
if IF_Exit ~= 1 then
gColor_Dat.GCtap(con)
Tap_Ato(con) -- タップ後に実施する
break
end
end
end
wait(1)
end