我是比較不喜歡後台_因為每次改版都需要在去抓內存很麻煩
不過有人可能會喜歡後台_提供一些寫法給學者參考
Sub 網絡延遲判斷
//Plugin Window.Active(objwin(i))
Delay 100
Gosub 求當前窗口的起始坐標
VBS x21=MyArray(0)+695
VBS y21=MyArray(1)+20
MoveTo x21,y21
Delay 200
VBSCall Shape=GetCursorShape(0)
While Shape = Shape_Hourglass
Delay 500
VBSCall Shape=GetCursorShape(0)
EndWhile
Delay 1200
Return 網絡延遲判斷
Sub 登出遊戲
VBS i=0
For plays
Plugin Window.Active(objwin(i))
Delay 1500
KeyPress 27,1
Delay 500
KeyPress 27,1
Delay 800
//按下Ctrl+L,退出遊戲
KeyDown 17,1
Delay 50
KeyPress 76,1
Delay 50
KeyUp 17,1
Delay 2000
//按下回車確認退出
KeyPress 13,1
Delay 22000
VBS i=i+1
EndFor
Delay 22000
EndScript
Return 登出遊戲
Sub 判斷行動力
VBS w0 =0
Delay 100
Plugin mytire=LazyGod.ReadMemory(objwin(i),tire_addr,1)
Plugin life=LazyGod.ReadMemory(objwin(i),hp_addr,1)
//讀取行動力數值
Plugin lifemax=LazyGod.ReadMemory(objwin(i),hpmax_addr,1)
//讀取最大行動力數值
VBS lifeDiff = lifemax*0.7
While life <= lifeDiff or mytire >= 500
Gosub 吃料理補充行動力
VBS w0=w0+1
If w0 > 9
Goto finisheat
EndIf
Plugin life=LazyGod.ReadMemory(objwin(i),hp_addr,1)
Plugin mytire=LazyGod.ReadMemory(objwin(i),tire_addr,1)
EndWhile
Rem finisheat
VBS w0=0
Delay 500
Return 判斷行動力
Sub 吃料理補充行動力
Delay 100
Gosub 按F10打開自定義欄
//If eatno=0
//這個判斷主要用於控制循環吃各種料理
Delay 500
Plugin BGKM5.KeyClickE(objwin(i),112)
//第一次按F1吃第一種料理
Delay 1000
Gosub 檢查按F10沒出錯
VBS eatno= eatno+1
//這個賦值主要用於控制循環吃各種料理,吃完一鍾後控制變量+1
Goto 吃完一塊料理
//EndIf
If eatno=1
Delay 100
Plugin BGKM5.KeyClickE(objwin(i),113)
//第2次按F6吃第2種料理
Delay 1000
Gosub 檢查按F10沒出錯
VBS eatno= 0
Goto 吃完一塊料理
EndIf
Rem 吃完一塊料理
Delay 50
Return 吃料理補充行動力
Sub 自動生產
VBS i= 0
Gosub 按F10打開自定義欄
Delay 500
Plugin BGKM5.KeyClickE(objwin(i),118)
Delay 2000
For 3
Plugin BGKM5.KeyClickE(objwin(i),40)
Delay 100
EndFor
Plugin BGKM5.LClick(objwin(i),300,340)
Delay 1000
Plugin BGKM5.LClick(objwin(i),460,407)
Delay 2000
Plugin openmission= LazyGod.ReadMemory(objwin(i),Myinfo_addr,0)
While not openmission=1
Delay 1000
Plugin openmission= LazyGod.ReadMemory(objwin(i),Myinfo_addr,0)
EndWhile
//點自動生產
Plugin BGKM5.LClick(objwin(i),540,405)
Delay 500
Return 自動生產 |