诛仙走路CALL,寻路CALL 给新手参考一下吧
诛仙走路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 , eax
//mov eax, goz
mov eax, 0
mov , eax
mov eax, goy
mov , eax
push 0
mov eax, Base1
mov eax,
mov eax,
mov eax,
mov eax,
push eax//地图代码
mov eax, Base1
mov eax,
mov eax,
mov eax,
add eax, $3c
push AutogoBase1
push eax
movecx, 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
mov eax,dword ptr
mov eax,dword ptr
mov ecx,dword ptr
push 1
mov ebx , RunAdd1
call ebx
lea ecx,dword ptr
mov esi,eax
push ecx
push 0
mov ecx,esi
mov ebx , RunAdd2
call ebx
mov eax,dword ptr
mov eax,dword ptr
mov eax,dword ptr
mov ecx,dword ptr
push 0
push 1
push esi
push 1
mov ebx , RunAdd3
call ebx
mov eax,dword ptr
mov eax,dword ptr
mov eax,dword ptr
mov eax,dword ptr
mov eax,dword ptr
mov ecx,dword ptr
mov eax,gox
mov ,eax
mov eax,goy
mov ,eax
popad
end;
except
end;
end;
这是以前用的,现在的没有找过,偏移一定不对了,给大家作个参考吧!
页:
[1]