- UID
- 174859
- 帖子
- 73
- 主題
- 73
- 精華
- 0
- 積分
- 77
- 楓幣
- 848
- 威望
- 77
- 存款
- 0
- 贊助金額
- 0
- 推廣
- 0
- GP
- 87
- 閱讀權限
- 10
- 性別
- 保密
- 在線時間
- 1 小時
- 註冊時間
- 2017-1-12
- 最後登入
- 2017-6-21
|
//TwMs_v196.2_ICS 座標左右走(指定範圍)
//Author: Onion
//修改: PearDelicious, Thx to MS88088
[Enable]
RegisterSymbol(SwitchLR)
RegisterSymbol(X)
RegisterSymbol(RBound)
RegisterSymbol(LBound)
Alloc(AutoLRICS,512)
Alloc(MyLR,4)
Alloc(X,4) //初始位置
Alloc(Step,4)
Alloc(LBound,4) //左方距離
Alloc(RBound,4) //右方距離
Alloc(SwitchLR,4)
Label(InitFun)
Label(AutoLR)
Label(GetWall)
Label(GetChrX)
Label(GoRight)
Label(GoLeft)
//-----------------------------------------------
LBound:
DD 80 //距離 16進制 1A=26
RBound:
DD 80 //距離 16進制 12C=300
X:
ReadMem([0214E60C]+000017B8, 4)
//-----------------------------------------------
SwitchLR:
DD 01
Step:
DD 0
MyLR:
DD 1 //開啟後先向右走
AutoLRICS:
Cmp [Esp],012F4F9A
Jne GetFocus
Mov Eax,[Step]
Cmp Eax,0
je InitFun
Mov Eax,[SwitchLR]
Cmp Eax,01
jne GetFocus
Mov [Esp],AutoLR
Jmp GetFocus
InitFun:
Mov [Step],1
Mov Eax,[X]
Sub Eax,[LBound]
Mov [LBound],Eax
Mov Eax,[X]
Add Eax,[RBound]
Mov [RBound],Eax
Ret
AutoLR:
Call GetWall
Mov [ebp-10],Eax
Xor Ecx,Ecx
Xor Eax,Eax
Cmp [ebp-10],Eax
Jmp 012F5517
GetWall:
call GetChrX
Mov Ecx,[LBound]
Sub Eax,Ecx
Cmp Eax,0
Jle GoRight
call GetChrX
Mov Ecx,[RBound]
sub Ecx,Eax
cmp Ecx,0
Jle GoLeft
Mov Eax,[MyLR]
Ret
GetChrX:
Mov Eax,[0214E60C]
Mov Eax,[Eax+000017B8]
ret
GoRight:
Mov [MyLR],1
Mov Eax,1
Ret
GoLeft:
Mov [MyLR],FFFFFFFF
Mov Eax,FFFFFFFF
Ret
02157888:
DD AutoLRICS
[Disable]
02157888:
DD GetFocus
DeAlloc(LBound)
DeAlloc(RBound)
DeAlloc(Step)
DeAlloc(X)
DeAlloc(MyLR)
DeAlloc(AutoLRICS)
UnRegisterSymbol(SwitchLR)
UnRegisterSymbol(X)
UnRegisterSymbol(RBound)
UnRegisterSymbol(LBound)
|
|