[按键]孙策通天塔 2019-01-24

// qq群号码:236977679 //感谢群友"依然"的帮助

Dim turn = -103    //如果孙策的船撞墙了》改这里的数字,-110是往左边,-90是往右边

Dim 金币上限停止 = "否"

Dim 是否相等,i=0,intX,intY

//金币上限停止 = 后面请填写"是"或者"否"

//不要有错别字,双引号是 "" 不是 ""

Dim nice = 0

Dim lunpan_x=300,lunpan_y=300 //移动方向轮盘起点

Dim jn1_x=171,jn1_y=1433  //一技能

Dim jn2_x=331,jn2_y=1550  //二技能

Dim jn3_x=447,jn3_y=1708  //三技能

Dim a_x=171,a_y=1733  //攻击

Dim zd_x=1043,zd_y=1755  //自动按钮

Function ttap(dx,dy)//点击dx,dy

  TouchDown dx, dy, 1

  Delay(10)

  touchUp 1

End Function

Function sswipe(sx, sy, tx, ty)

  TouchDown sx, sy, 1

  Delay(100)

  TouchMove tx, ty, 1, 0

  Delay(100)

  touchUp 1

End Function

Function move(tx,ty)//滑动方向

  touchMove lunpan_x+tx,lunpan_y+ty,2,0

End Function

Function newmove(tx,ty)//滑动方向

  touchUp 2

  Delay(100)

  TouchDown lunpan_x, lunpan_y, 2

  Delay(100)

  move(tx,ty)

End Function

Function waitboss()

  Do While CmpColor(898, 776,"2c3cd8",0.95) = -1

    ttap jn1_x, jn1_y

    ttap 110,1255

    Delay(1000)

  Loop

  Delay(200)

  If CmpColor(898, 776,"2c3cd8",0.95) = -1 Then

    waitboss()

  End If

End Function

Function waitend()//等待游戏结算

FindMultiColor 93,1826,103,1835,"FFBF02","9|0|FFBF02,3|0|FFBF02,0|5|FFBF02",0,0.9,intX,intY//判断是否通关

Do Until intX > -1 And intY > -1

Delay 500

FindMultiColor 93, 1826, 103, 1835, "FFBF02", "9|0|FFBF02,3|0|FFBF02,0|5|FFBF02", 0, 0.9, intX, intY

Loop

Tap 1026 ,1822//点击跳过

是否相等 = CmpColor(677 ,1396 ,"FEFEFE",0.9)//判断是否再次回到开始界面

Do Until 是否相等 > -1

//Tap 100 ,1404

Delay 100

Tap 80, 1600

//Tap 165,1550//开始游戏

是否相等 = CmpColor(677 ,1396 ,"FEFEFE",0.9)

Loop

End Function

Function begin()//从闯关界面到游戏内

For 3

Tap 356,960

Tap 165,1550//开始游戏

Delay 3000//防止出现小时提醒

If (CmpColor(359, 1200, "4C23B7", 0.9) > -1) Then //n小时提醒跳过

Tap 360,1260//点击跳过提醒

End If

Next

'开始监视英雄血条是否存在

是否相等 = CmpColor(685 ,880 ,"15CE53",0.9)

Do Until 是否相等 > -1

Delay 500

是否相等 = CmpColor(685 ,880 ,"15CE53",0.9)

Loop

Tap 1026 ,1822//点击跳过

Delay 500


End Function

Function sunce()//子脚本。孙策

  begin()//开始游戏


  newmove 200, -120

  Delay (4500)//直走移动


  move 180,-200

  Delay (1400)//斜着向左走一点


  move 200,turn

  sswipe(jn3_x,jn3_y,jn3_x+470,jn3_y-200)

  Delay (1500)

  TouchUp 2

  waitboss


  Tap 106,1218//加血

  Delay(200)

  '判断boss血条,点击一技能

FindMultiColor 856,743,933,1302,"282EC4","-23|-2|212696,-23|32|141C98,-4|42|222AC9,-23|92|11198F,-4|140|2027CC,-21|196|121A95,-25|254|13178C,-13|327|2425BF,-4|367|2027CC",0,0.9,intX,intY

Do Until intX > -1 And intY > -1

Delay 100

TouchDown 141 ,1404 ,2

TouchUp 2

FindMultiColor 856,743,933,1302,"282EC4","-23|-2|212696,-23|32|141C98,-4|42|222AC9,-23|92|11198F,-4|140|2027CC,-21|196|121A95,-25|254|13178C,-13|327|2425BF,-4|367|2027CC",0,0.9,intX,intY

Loop

'boss出现,点击自动按钮

Tap 1023,1789

Delay 2000

  waitend()

End Function

SetScreenScale 1080,1920,0

Dim jb=0, cnt=0

While True

cnt = cnt + 1

sunce()

jb=jb+29

ShowMessage "已循环" & cnt & "次,获得金币" & jb & "\n耗时:" & Fix(TickCount() / 1000 / 60 ) & "分" & TickCount() /1000 - Fix(TickCount() / 1000 / 60 )*60 & "秒",3000,0,0

If 金币上限停止 = "是" Then

  If CmpColor(1717, 598, "C1BAAF", 0.95) <> -1 Then

    EndScript

  End If

End If

Wend

你可能感兴趣的:([按键]孙策通天塔 2019-01-24)