Skip to content

Commit

Permalink
Merge pull request #5 from csvwolf/alpha
Browse files Browse the repository at this point in the history
v0.0.12
  • Loading branch information
csvwolf authored Sep 22, 2021
2 parents fdc006f + 9f50f0e commit 2ebdc1e
Show file tree
Hide file tree
Showing 11 changed files with 85 additions and 22 deletions.
Binary file added assets/unlimited/10.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/unlimited/close.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/unlimited/execute.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/unlimited/reset.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/unlimited/zero.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 6 additions & 5 deletions attack.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ const customCmd = storage.get('customCmd') || ''

toast(apple ? '吃苹果' : '不吃苹果')

const Battle = [1953,900]
const Battle = [2010,910]
const CardSP = [1199,340]
const Card1= [475,764]
const Card2 = [855,764]
const Card1= [443,764]
const Card2 = [790,764]

const NextImage = readImage('./assets/next.jpg')
const GoldAppleImage = readImage('./assets/gold_apple.jpg')
Expand Down Expand Up @@ -76,13 +76,14 @@ function use3TInBlue() {
}

function eatApple() {
if (findButton(GoldAppleImage, {maxTimes:10})) {
const appleImage = findButton(GoldAppleImage, {maxTimes:10})
if (appleImage) {
if (!apple) {
toast('体力没有了,不吃苹果,游戏结束')
console.log('别吃啊!!!')
return false
}
click1(1365, 471, true)
click1(appleImage[0], appleImage[1], true)
sleep1(300)
click1(1603,835, true)
console.log('吃屎啦你')
Expand Down
28 changes: 14 additions & 14 deletions commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ setScreenMetrics(1080, 2340)
var click2 = utils.click
var sleep2 = utils.sleep

const SkillY = 880
const SkillY = 846
const MasterSkillY = 479
const ChangeY = 536
const AvatarY = 614
Expand All @@ -16,25 +16,25 @@ const Avatar3 = [1660, AvatarY]
const Confirm = [1569,655]

// 从者一号位
const C1S1 = [370,SkillY]
const C1S2 = [507,SkillY]
const C1S3 = [619,SkillY]
const C1S1 = [293,SkillY]
const C1S2 = [390,SkillY]
const C1S3 = [530,SkillY]

// 从者二号位
const R1S1 = [852,SkillY]
const R1S2 = [997,SkillY]
const R1S3 = [1129,SkillY]
const R1S1 = [740,SkillY]
const R1S2 = [872,SkillY]
const R1S3 = [1037,SkillY]

// 从者三号位
const C3S1 = [1315,SkillY]
const C3S2 = [1452,SkillY]
const C3S3 = [1584,SkillY]
const C3S1 = [1232,SkillY]
const C3S2 = [1391,SkillY]
const C3S3 = [1500,SkillY]

// 御主技能
const MasterSkillStart = [2047, MasterSkillY]
const MasterSkill1 = [1633, MasterSkillY]
const MasterSkill2 = [1770, MasterSkillY]
const MasterSkill3 = [1892, MasterSkillY]
const MasterSkillStart = [2110, MasterSkillY]
const MasterSkill1 = [1700, MasterSkillY]
const MasterSkill2 = [1815, MasterSkillY]
const MasterSkill3 = [1968, MasterSkillY]

// 换人坐标点
// 换人是三技能
Expand Down
3 changes: 2 additions & 1 deletion finder.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ var readImage = utils.readImage
// autojs 这个 node 版本 const 分析的不对,没办法还是用 var 吧
var findButton = utils.findButton
var images = {}
var ListUpdate = [1500, 220]

function initImages () {
for (let key in servants) {
Expand Down Expand Up @@ -57,7 +58,7 @@ function find(servant) {
p = findServantAndSwipe(servant)

while (!p) {
click1(1566,183, true)
click1(ListUpdate[0], ListUpdate[1], true)
sleep1(300)
click1(1576,842, true)
sleep1(3000)
Expand Down
4 changes: 3 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@ ui.friendPoolButton.click(function() {
})

ui.unlimitedPoolButton.click(function() {
toast('没做呢')
w.setSize(600, 200)
storage.put('scriptOption', 'unlimited_pool')
stopExecution(w, execution.p)
})

//-----下面是一坨屎 别动了
Expand Down
2 changes: 1 addition & 1 deletion project.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@
},
"scripts": {},
"versionCode": 1,
"versionName": "0.0.10"
"versionName": "0.0.12"
}
59 changes: 59 additions & 0 deletions unlimited_pool.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
auto()

if (!requestScreenCapture(true)) {
toast('请求截图失败')
exit()
}

sleep(300)

var utils = require('./utils')
var findButton = utils.findButton
var readImage = utils.readImage
var click1 = utils.click
var sleep1 = utils.sleep

var Blank = [2016, 821]

// setScreenMetrics(1080, 2340)

var UnlimitedBtn = readImage('./assets/unlimited/10.jpg')
var Zero = readImage('./assets/unlimited/zero.jpg')
// 重置无限池
var Reset = readImage('./assets/unlimited/reset.jpg')
var Execute = [1582, 861]
var Close = [1268, 840]
var i = 0

events.on('exit', function() {
UnlimitedBtn.recycle()
Zero.recycle()
Reset.recycle()
toast('共抽 ' + i + ' 次')
})

toast('开抽')

while (true) {
if (findButton(Reset, { maxTimes: 1 })) {
toast('已经空拉,重置开始')
const resetPosition = findButton(Reset, { maxTimes: 1 })
if (!resetPosition) {
continue
}
click1(resetPosition[0], resetPosition[1], false)
sleep1(500)
click1(Execute[0], Execute[1], true)
sleep(4000)
click1(Close[0], Close[1], true)
sleep(1000)
}

const position = findButton(UnlimitedBtn, { maxTimes: 5 })
if (position) {
click1(position[0], position[1], false)
i++
}

sleep1(300)
}

0 comments on commit 2ebdc1e

Please sign in to comment.