给点思路即可。现在如果点击开启打怪,它会自动打身边的怪,如果点寻路后,就只寻路不打怪了,如何保证在寻路的同时打怪呢?对DEPHI才接触23天,不熟,请路过的兄弟朋友们指点一下!!!给个思路即可
解决方案 »
- 用delphi碰到奇怪的问题
- 求Delphi 读写Oracle Blob 大类型数据,的程序
- 我通过了“用有”的面试,可是我拿的是假文凭,怎么办
- 当点击 listview 某行前面的checkbox 给该行打勾时,发生什么事件?
- 求助:如何编程实现交换鼠标左右键的同时也改变鼠标指针的指向?
- 数据用sql备份的问题,给分100
- SQL问题,近来看看
- 如何在DELPHI实现绑定变量
- 怎样解决DBGrid新增时的错误!!
- delphi xe1.2.3下json解析
- 请问软件怎样避过360及瑞星的拦截
- delphi 能不能用ies构造html document对象 就像webbrowser.document对象一样.在线求助
用计时器,寻路一段时间后自动切换到打怪call,打怪call没对象了在换回寻路call
//如何解决寻路计时器关掉后,人物游戏也停止呢?
procedure TForm1.Auto_PlayMonTimer(Sender: TObject);
var
i,monNum:integer;
curType:PByte;
temp,temp2,temMonObj:dword;
playBase,pt,curRole,pmonNum,curRoleX,curRoleY,curRoleLD,temp1:PDWORD;//^integer ^Dword;
ws:pchar;
s,tempStr,tempTypeStr,tempStr1:string;
begin
self.Memo2.Clear;
playBase:=Pointer($63E7C4);
playBase:=Pointer(playbase^+$5FB5C);
pmonNum:=Pointer(playbase^+$8);//周围怪物数量
playBase:=Pointer(playbase^+$4);
for i:=0 to pmonNum^-1 do
begin
try
curRole:=Pointer(playBase^+i*4);//对象基址
temMonObj:=curRole^;
curType:=Pointer(curRole^+$e); //表示怪物类型
if (curType^= 0) then continue;//如果是0,表示不是怪物
if (curRole=nil) then continue;
if (curRole^=0) then continue;
pt:=Pointer(curRole^+$24); //表示名称指针
curRoleLD:=Pointer(curRole^+$16); //最后一位为1生0死表示怪物生死
curRoleX:=Pointer(curRole^+$E0); //表示怪物X坐标
curRoleY:=Pointer(curRole^+$E4); //表示怪物Y坐标
temp:=curRoleLD^;
tempStr:=copy(IntToHex(temp,8),8,8); begin
if (tempStr='0') then //如果怪物是活的并且周围有怪时,则
begin
Auto_GoRoad.Enabled:=false;//有怪时关掉计时器
//但疑问是关掉计时器后人物寻路不会自动停止
ws:=Pointer(pt^);//表示名称
s:=strpas(ws);
self.Memo2.Lines.Add('怪物对象基址:'+IntToHex(curRole^,8)+'怪物名称:'+S+'怪物类型:'+IntToHex(curType^,8));
f1_f12(3,curRole^); //传入参数,3表示技能数组下标,curRole^表示怪物对象,调用技能打怪CALL
end
end;
except
continue;
end;
end;
//此处判断周围是否无怪,无怪就寻路
tempStr1:=self.Memo2.Text;
if tempStr1='' then
begin
flag:=true;
// goRoadMir($000000df,$00000165); //寻路函数
Auto_GoRoad.Enabled:=true; //开启寻路计时器
end;end;procedure TForm1.goRoadMir(x,y:DWORD);