嘛,B站新游戏呢,模式什么的和舰B几乎没有什么区别,还简化了,结果我这边整体逻辑都不用改,就改了一小部分代码就实现自动选关练级了。目前,自动收远征还没改,自动收任务没改,选择阵型没写,嘛,无所谓吧。 现在手游同质化真严重呢,感觉就像换人物立绘骗钱。
Delay 2000
Dim screenX,screenY,deviceID,first=1
screenX = GetScreenX()
screenY = GetScreenY()
deviceID = GetDeviceID()
TracePrint ""&screenX&"*"&screenY&chr(10)
While 1
call messagebox ("准备进入出击")
TracePrint "准备进入出击"
Call zhanyi()
first = 2
Delay 3000
Wend
//----------------//
Sub zhanyi()
Dim dijiguan=1,zdd,ty=225,zyi=1,yv //zyi的值影响章节。dijiguan的值影响关卡//
call messagebox ("点击出击")
TracePrint "点击出击"
Delay 1000
Touch 567,1757, 100
call messagebox ("向左滑动归零")
TracePrint "向左滑动归零"
Delay 1000
TouchDown 95,198, 1//按住屏幕上的100,100坐标不放,并设置此触点ID=1
TouchMove 98,1212, 1, 200//将ID=1的触点花200毫秒移动至300,300坐标
TouchUp 1//松开弹起ID=1的触点
Delay 1000
call messagebox ("归零关卡选择")
TracePrint "归零关卡选择"
Touch 86, 225, 100
call messagebox ("选择关卡,注意单复数关卡坐标不一致")
TracePrint "选择关卡,注意单复数关卡坐标不一致"
Delay 1000
call messagebox ("章节选择为第" & zyi & "章")
TracePrint "章节选择"
ty=ty+(zyi-1)*450
Touch 99, ty, 100
yv = zyi mod 2
If yv=0 Then //判断奇偶关卡
Select Case dijiguan
Case 1
call messagebox ("选择关卡一")
TracePrint "选择偶数关卡一"
Touch 533,229, 100
Delay 1000
Case 2
call messagebox ("选择关卡二")
Touch 366,707, 100
Delay 1000
Case 3
call messagebox ("选择关卡三")
Touch 617,1059, 100
Delay 1000
Case 4
call messagebox ("选择关卡四")
Touch 403,1557, 100
Delay 1000
Case Else
call messagebox ("关卡值错误!")
End Select
Else //偶数关
Select Case dijiguan
Case 1
call messagebox ("选择关卡一")
TracePrint "选择奇数关卡一"
Touch 428,272, 100
Delay 1000
Case 2
call messagebox ("选择关卡二")
Touch 633,719, 100
Delay 1000
Case 3
call messagebox ("选择关卡三")
Touch 361,1102, 100
Delay 1000
Case 4
call messagebox ("选择关卡四")
Touch 605,1571, 100
Delay 1000
Case Else
call messagebox ("关卡值错误!")
End Select
End If
call messagebox ("关卡介绍页面")
TracePrint "关卡介绍页面"
Touch 225,1506, 100
Delay 1000
call messagebox ("出击!")
TracePrint "出击!"
Touch 228,1491, 100
Delay 3000
Touch 76,1756, 100 //打开搜寻敌人
Delay 3000
While 1
zdd = CmpColor(933,1513,"F3F6EE",0.9)
If zdd > -1 Then
zdd = CmpColor(568, 1799, "FFFFFF", 0.9)
If zdd > -1 Then
call messagebox ("回到关卡界面了,跳出战斗")
TracePrint "回到关卡界面了,跳出战斗"
Exit While
End If
End If
call messagebox ("似乎没有结束呢,继续战斗")
TracePrint "似乎没有结束呢,继续战斗"
Touch 185, 1649, 100
Delay 1000
Touch 830, 1794, 100
Delay 1000
zdd = CmpColor(1053,1580, "DDFFFF", 0.9)
If zdd = -1 Then
Touch 1025, 1562, 100
Delay 1000
Call messagebox("开启自动战斗")
TracePrint "开启自动战斗"
End If
Wend
Touch 1029, 385, 100
call messagebox ("回到主界面开始下个循环吧")
TracePrint "回到主界面开始下个循环吧"
End Sub
//----------------//
Sub messagebox(box)
TracePrint box
ShowMessage box
Delay 1500
End Sub