- 注册时间
- 2022-8-23
- 最后登录
- 2024-3-6
- 在线时间
- 2 小时
编程入门
- 天马币
- 28
|
诛仙走路CALL,寻路CALL,以前用的!给新手参考一下吧
procedure CallAutoWalk(p: Autogo);stdcall; //自动寻路call
var
goAddr:pointer;
gox,goy:Single;
begin
gox:=p^.x;
goy:=p^.y;
goAddr:=pointer(AutogoBase);
try
asm
pushad
mov eax, gox
mov [AutogoBase1], eax
//mov eax, goz
mov eax, 0
mov [AutogoBase1+$4], eax
mov eax, goy
mov [AutogoBase1+$8], eax
push 0
mov eax, Base1
mov eax, [eax]
mov eax, [eax+$1c]
mov eax, [eax+$8]
mov eax, [eax+$90]
push eax//地图代码
mov eax, Base1
mov eax, [eax]
mov eax, [eax+$1c]
mov eax, [eax+$28]
add eax, $3c
push AutogoBase1
push eax
mov ecx, AutogoCallBase
call goAddr
popad
end;
except
exit;
end;
end;
procedure Go(p: Autogo);stdcall; //走路CALL
var
gox,goy:Single;
begin
gox:=p^.x;
goy:=p^.y;
try
asm
pushad
mov eax,dword ptr [base1]
mov eax,dword ptr [eax+$1C]
mov eax,dword ptr [eax+$28]
mov ecx,dword ptr [eax+$1220]
push 1
mov ebx , RunAdd1
call ebx
lea ecx,dword ptr [esp+$50]
mov esi,eax
push ecx
push 0
mov ecx,esi
mov ebx , RunAdd2
call ebx
mov eax,dword ptr [base1]
mov eax,dword ptr [eax+$1C]
mov eax,dword ptr [eax+$28]
mov ecx,dword ptr [eax+$1220]
push 0
push 1
push esi
push 1
mov ebx , RunAdd3
call ebx
mov eax,dword ptr [base1]
mov eax,dword ptr [eax+$1C]
mov eax,dword ptr [eax+$28]
mov eax,dword ptr [eax+$1220]
mov eax,dword ptr [eax+$30]
mov ecx,dword ptr [eax+4]
mov eax,gox
mov [ecx+$20],eax
mov eax,goy
mov [ecx+$28],eax
popad
end;
except
end;
end;
这是以前用的,现在的没有找过,偏移一定不对了,给大家作个参考吧!
|
|