ツムツム 自動操作

AutoMainPNGページ

ツムツムを自動化するためのプロセスをまとめました、プレイ中の動作これはランダムにツムを繋げて消す処理を行います。拘束に動作させる必要があり今回のアンドロイドでは非力と思われます。動画の通りiPhoneはかなりいい感じで動きます。それと画面を自動でタップすることで繰り返しツムをプレイしてコインを取得していきます。
We have summarized the process for automating Tsum Tsum, the behavior during play This is the process of randomly connecting and erasing Tsum. It needs to be operated in a restraint, and it seems to be powerless in this android. As you can see in the video, the iPhone works pretty well. Also, by tapping the screen automatically, you can play Tsum repeatedly and get coins.

関連目次
Android 又は パソコン版 LDPlayer
1.ツムツム 自動化1 プレイ中の動作を確認
2.ツムツム 自動化2 実際に自動化してみよう!
3.1.と2.を合体させる!

次の動画は4年前に作成したツムツムの自動動画になります。

  1. ツムツムを立ち上げてください。
  2. プレイ画面まで進めます。
    アイテムを選んでおいてください。
    <<<<  ここから自動操作です >>>>
  3. スタートをタップします。
  4. スキルが溜まると自動でスキルタップします。
  5. 残り5秒で止まります(仕様ですw)
  6. 得点画面にてリトライをタップします。
  7. スタートをタップします。
  8. 4~7を繰り返します。

公開したスクリプトはツムツムをランダムでくっ付けることを20回繰り返して止まるだけです。
今後自動化を行うための方法を投稿していきます。

  1. Please launch Tsum Tsum.
  2. Proceed to the play screen.
    Please select an item.
    <<<<<< Automatic operation from here >>>>>
  3. Tap Start.
  4. When the skill is accumulated, the skill is automatically tapped.
  5. It will stop with 5 seconds remaining (specification w)
  6. Tap Retry on the score screen.
  7. Tap Start.
  8. Repeat steps 4-7.

The published script just stops by randomly sticking Tsum Tsum 20 times.
I will post a method for automation in the future.

Tsum Tsum script [ iPhone ]


math.randomseed(os.time())
math.randomseed(os.time()+math.random(50000))
-- ツムのマス目設定
local TSUMUXMIN = 70;
local TSUMUXMAX = 1175;
local TSUMUYMIN = 730;
local TSUMUYMAX = 1705;
local TSUMUSTEP = 65;
-- ------------------------------------
-- if route
-- ------------------------------------
function route_if(self)
	if (self.row > 0) and (self.row <= self.ts.rowcount) and
		(self.col > 0) and (self.col <= self.ts.colcount) then
		self.count = self.count + 1
		self.route[self.count]=self.ts.rows[self.row][self.col];
	end
end
-- ------------------------------------
-- tsumu class:
-- ------------------------------------
tsumu = {}
tsumu.new = function(xfr, xto, yfr, yto, step)
	obj = {}
	obj.rows = {}
	obj.xfr = xfr;
	obj.xto = xto;
	obj.yfr = yfr;
	obj.yto = yto;
	obj.step = step;
	obj.rowcount = 0;
	obj.colcount = 0;
	for y = obj.yfr, obj.yto, obj.step do
		local cols = {}
		for x = obj.xfr, obj.xto, obj.step do
			table.insert(cols, {x, y});
		end
		table.insert(obj.rows, cols);
	end
	for y = obj.yfr, obj.yto, obj.step do
		obj.rowcount = obj.rowcount + 1;
	end
	for x = obj.xfr, obj.xto, obj.step do
		obj.colcount = obj.colcount + 1;
	end
	return obj;
end
-- ------------------------------------
-- route class:
-- ------------------------------------
route = {}
route.select = function(self)
	local i = math.random(self.ts.rowcount);
	local j = math.random(self.ts.colcount);
	self.row = i;
	self.col = j;
	self.target = {i, j}
end
route.up = function(self)-- 右上
	self.row = self.row - 1;
	self.col = self.col + 1;
	route_if(self)
end
route.right = function(self)--右下
	self.col = self.col + 1;
	self.row = self.row + 1;
	route_if(self)
end
route.down =    function(self)--左下
	self.row = self.row + 1;
	self.col = self.col - 1;
	route_if(self)
end
route.left = function(self)--左上
	self.col = self.col - 1;
	self.row = self.row - 1;
	route_if(self)
end
route.run = function(self)
	local x = self.ts.rows[self.target[1]][self.target[2]][1];
	local y = self.ts.rows[self.target[1]][self.target[2]][2];
	local w = 1900;
	local txy = XYren(x,y)
	touchDown(0, txy[1], txy[2]); usleep(w);
	for key, val in pairs(self.route) do
		local txy = XYren(val[1],val[2])
		touchMove(0, txy[1], txy[2]); usleep(w);
	end
	touchUp(0, txy[1], txy[2])
end
-- ------------------------------------
-- create route class: circle
-- ------------------------------------
route_minicircle = {}
route_minicircle.new = function(ts)
	obj = {}
	obj.route = {}
	obj.row = 0;
	obj.col = 0;
	obj.count = 0;
	obj.ts = ts;
	obj.target = {}
	setmetatable(obj, {__index=route})
	obj:select();
	-- 1周目
	obj:up();
	obj:up();
	obj:right();
	obj:right();
	obj:down();
	obj:down();
	obj:down();
	obj:down();
	obj:left();
	obj:left();
	obj:left();
	obj:left();
	obj:up();
	obj:up();
	obj:up();
	obj:up();
	obj:up();
	obj:up();
	obj:right();
	obj:right();
	obj:right();
	obj:right();
	obj:right();
	obj:right();
	obj:down();
	obj:down();
	obj:down();
	obj:down();
	obj:down();
	obj:down();
	obj:down();
	obj:down();
	obj:left();
	obj:left();
	obj:left();
	obj:left();
	obj:left();
	obj:left();
	obj:left();
	obj:left();
	obj:up();
	obj:up();
	obj:up();
	obj:up();
	obj:up();
	obj:up();
	obj:up();
	obj:up();
	return obj;
end
-- ------------------------------------
-- main
-- ------------------------------------
math.randomseed(os.time());
local area_range = {}
local ts = tsumu.new(TSUMUXMIN, TSUMUXMAX,
                     TSUMUYMIN, TSUMUYMAX, TSUMUSTEP);
-- 他のiPhoneの画面サイズに対して修正する ww,hh 
--例
-- ww, hh = getScreenResolution(); 画面サイズ取得
-- ww=ww/1242;hh=hh/2208 iPhone6+ はそれぞれ1の値となる。
function XYren(xx,yy);
 return {math.floor(xx*ww+0.5),math.floor(yy*hh+0.5)}
end
local rt = {}
ww, hh = getScreenResolution();
ssee=os.time() --タイマーセット
if ww >= hh then
 --alert("縦画面固定してください。");
 --goto endstop;
 ww,hh=hh,ww
end;
ww=ww/1242;hh=hh/2208;--1242,2208
::Sta_loop::
	 rt = route_minicircle.new(ts);
	 rt:run();
usleep(2000)
goto Sta_loop

Tsum Tsum script [ Android]


local xy = getAppUsableScreenSize()
DeveY = xy:getY()
DeveX = xy:getX()
Settings:setScriptDimension(true , DeveX)
Settings:setCompareDimension(true , DeveX)
setImmersiveMode(true)
autoGameArea(true)
-- ツムのマス目設定
local STEP_Point = 7
local STEP = math.floor((DeveX/STEP_Point))
local TSUMUSTEP = math.floor(((DeveX - STEP) / STEP_Point))
local TSUMUXMIN = math.floor(STEP / 2)
local TSUMUXMAX = TSUMUXMIN + TSUMUSTEP * STEP_Point
local TSUMUYMAX = math.floor(DeveY / 9) * STEP_Point
local TSUMUYMIN = TSUMUYMAX - TSUMUSTEP * STEP_Point
setManualTouchParameter(math.floor(TSUMUSTEP/2),4) -- see below for explanation
-- ------------------------------------
-- if route
-- ------------------------------------
function route_if(self)
	if (self.row > 0 and self.row <= self.ts.rowcount) and
			(self.col > 0 and self.col <= self.ts.colcount) then
		self.count = self.count + 1
		self.route[self.count]=self.ts.rows[self.row][self.col]
	end
end
-- ------------------------------------
-- tsumu class:
-- ------------------------------------
tsumu = {}
tsumu.new = function(xfr, xto, yfr, yto, step)
	obj = {}
	obj.rows = {}
	obj.xfr = xfr;
	obj.xto = xto;
	obj.yfr = yfr;
	obj.yto = yto;
	obj.step = step;
	obj.rowcount = 0;
	obj.colcount = 0;
	for y = obj.yfr, obj.yto, obj.step do
		local cols = {}
		for x = obj.xfr, obj.xto, obj.step do
			table.insert(cols, {x, y});
		end
		table.insert(obj.rows, cols);
	end
	for y = obj.yfr, obj.yto, obj.step do
		obj.rowcount = obj.rowcount + 1;
	end
	for x = obj.xfr, obj.xto, obj.step do
		obj.colcount = obj.colcount + 1;
	end
	return obj;
end
-- ------------------------------------
-- route class:
-- ------------------------------------
route = {}
route.select = function(self)
	local i = math.random(self.ts.rowcount);
	local j = math.random(self.ts.colcount);
	self.row = i;
	self.col = j;
	self.target = {i, j}
end
route.up = function(self)-- 右上
	self.row = self.row - 1;
	self.col = self.col + 1;
	route_if(self)
end
route.right = function(self)--右下
	self.col = self.col + 1;
	self.row = self.row + 1;
	route_if(self)
end
route.down =    function(self)--左下
	self.row = self.row + 1;
	self.col = self.col - 1;
	route_if(self)
end
route.left = function(self)--左上
	self.col = self.col - 1;
	self.row = self.row - 1;
	route_if(self)
end
route.run = function(self)
	local x = self.ts.rows[self.target[1]][self.target[2]][1]
	local y = self.ts.rows[self.target[1]][self.target[2]][2]
	acList={}
	acList[1] = {action = "touchDown", target = Location(x, y)}
	local ip = 2
	for key, val in pairs(self.route) do
		acList[ip] = {action = "touchMove", target = Location(val[1], val[2])}
		x = val[1]
		y = val[2]
		ip = ip + 1
	end
	acList[ip] = {action = "touchUp", target = Location(x, y)}
	manualTouch(acList)
end
-- ------------------------------------
-- create route class: circle
-- ------------------------------------
route_minicircle = {}
route_minicircle.new = function(ts)
	obj = {}
	obj.route = {}
	obj.row = 0;
	obj.col = 0;
	obj.count = 0;
	obj.ts = ts;
	obj.target = {}
	setmetatable(obj, {__index=route})
	obj:select();
	local rn = math.random(4);
	if rn == 1 then
	obj:up();
	obj:right();
	obj:down();
	obj:down();
	obj:left();
	obj:left();
	obj:up();
	obj:up();
	obj:up();
	obj:right();
	obj:right();
	obj:right();
	obj:down();
	obj:down();
	obj:down();
	obj:down();
	obj:left();
	obj:left();
	obj:left();
	obj:left();
	elseif rn == 2 then
	obj:up();
	obj:right();
	obj:down();
	obj:down();
	obj:right();
	obj:right();
	obj:up();
	obj:up();
	obj:up();
	obj:left();
	obj:left();
	obj:left();
	obj:down();
	obj:down();
	obj:down();
	obj:down();
	obj:right();
	obj:right();
	obj:right();
	obj:right();
	elseif rn == 3 then
	obj:down();
	obj:right();
	obj:up();
	obj:up();
	obj:left();
	obj:left();
	obj:down();
	obj:down();
	obj:down();
	obj:right();
	obj:right();
	obj:right();
	obj:up();
	obj:up();
	obj:up();
	obj:up();
	obj:left();
	obj:left();
	obj:left();
	obj:left();
	elseif rn == 4 then
	obj:down();
	obj:right();
	obj:up();
	obj:up();
	obj:right();
	obj:right();
	obj:down();
	obj:down();
	obj:down();
	obj:left();
	obj:left();
	obj:left();
	obj:up();
	obj:up();
	obj:up();
	obj:up();
	obj:right();
	obj:right();
	obj:right();
	obj:right();
	end
	return obj;
en
-- ------------------------------------
-- main
-- ------------------------------------
math.randomseed(os.time())
local area_range = {}
local ts = tsumu.new(TSUMUXMIN, TSUMUXMAX,
                     TSUMUYMIN, TSUMUYMAX, TSUMUSTEP);
local rt = {}
local cont = 0
local doloopB = true
while  cont < 20  do
		cont = cont + 1
	 rt = route_minicircle.new(ts);
	 rt:run();
end