TwMS v1.44_ICS_牆值左右走
//TwMS v1.44_ICS_牆值左右走(雪女人物左右)
//原創:Future Doraemon Four
//改寫更新:Onion
[Enable]
Alloc(AutoLRICS,512)
Alloc(MyLR,4)
Label(AutoLR)
Label(GetWall)
Label(GetChrX)
Label(GoRight)
Label(GoLeft)
MyLR:
DD 1 //開啟後向右走
00d00670:
DD AutoLRICS
AutoLRICS:
Cmp [Esp],008E0387
Jne GetFocus
Mov [Esp],AutoLR
Jmp GetFocus
AutoLR:
Call GetWall
Mov [ebp-08],Eax
Xor Ecx,Ecx
Xor Eax,Eax
Cmp [ebp-04],Eax
Jmp 008E061A
GetWall:
Call GetChrX
Mov Ecx,[00CF7DD8]
Sub Eax,[Ecx+1c] //角色X值 - 左牆X值
Cmp Eax,04
Jle GoRight
Call GetChrX
Mov Ecx,[Ecx+24]
sub Ecx,Eax //右牆X值 - 角色X值
cmp Ecx,04
Jle GoLeft
Mov Eax,[MyLR]
Ret
GetChrX:
Mov Eax,[00CFB530]
Mov Eax,[Eax+B0C]
Ret
GoRight:
Mov [MyLR],1
Mov Eax,1
Ret
GoLeft:
Mov [MyLR],FFFFFFFF
Mov Eax,FFFFFFFF
Ret
[Disable]
00d00670:
DD GetFocus
DeAlloc(MyLR)
DeAlloc(AutoLRICS)
//原創:Future Doraemon Four
//改寫更新:Onion
[Enable]
Alloc(AutoLRICS,512)
Alloc(MyLR,4)
Label(AutoLR)
Label(GetWall)
Label(GetChrX)
Label(GoRight)
Label(GoLeft)
MyLR:
DD 1 //開啟後向右走
00d00670:
DD AutoLRICS
AutoLRICS:
Cmp [Esp],008E0387
Jne GetFocus
Mov [Esp],AutoLR
Jmp GetFocus
AutoLR:
Call GetWall
Mov [ebp-08],Eax
Xor Ecx,Ecx
Xor Eax,Eax
Cmp [ebp-04],Eax
Jmp 008E061A
GetWall:
Call GetChrX
Mov Ecx,[00CF7DD8]
Sub Eax,[Ecx+1c] //角色X值 - 左牆X值
Cmp Eax,04
Jle GoRight
Call GetChrX
Mov Ecx,[Ecx+24]
sub Ecx,Eax //右牆X值 - 角色X值
cmp Ecx,04
Jle GoLeft
Mov Eax,[MyLR]
Ret
GetChrX:
Mov Eax,[00CFB530]
Mov Eax,[Eax+B0C]
Ret
GoRight:
Mov [MyLR],1
Mov Eax,1
Ret
GoLeft:
Mov [MyLR],FFFFFFFF
Mov Eax,FFFFFFFF
Ret
[Disable]
00d00670:
DD GetFocus
DeAlloc(MyLR)
DeAlloc(AutoLRICS)
留言
張貼留言