看看我的加血代码那里错了。朋友帮帮忙。
procedure TForm1.Timer1Timer(Sender: TObject);var
curRoleBlood:PWord;
begin
//当前角色血值<RzHp 使用F1
//[[+24]+260]
curRoleBlood:=Pointer(GameBase); //常量已申请
curRoleBlood:=Pointer(curRoleBlood^+$1C);
curRoleBlood:=Pointer(CurRoleBlood^+$24);
curRoleBlood:=Pointer(CurRoleBlood^+$260);//当前HP
/
//如果HP<edit1.内容 且 选择框=真
//则执行 F1操作。
if (xzkhp.Checked and (curRoleBlood^<edithp.IntValue)) then
begin
F1_F8(xlkhp.ItemIndex+1);
end;
你们在看看哪里错了 首先把你的邏輯代碼都丟一邊涼快去
然後確定你的代碼正確取出血值 (按你的公式來看你的代碼明顯錯誤的)
等你把血值正確取出來再來搞你的邏輯代碼。 1楼正解
程式总会遇上不少问题,也是要一步一步除错
建议首先用CE试试看该偏移是否有误
无误的话,步骤如下
1.确认TIMER有启动
2.确定curRoleBlood变数有顺利读取到
3.确认该游戏是支援模拟键盘的
一般新手的话,我都会建议使用远程注入
在下断除错上会方便许多
等技术熟了再去搞DLL var
Blood:DWORD;
curRoleBlood:=PDWORD(GameBase); //常量已申请
curRoleBlood:=PDWORD(curRoleBlood^+$1C);
curRoleBlood:=PDWORD(CurRoleBlood^+$24);
Blood:=PDWORD(CurRoleBlood^+$260)^; //这里取出来的才是血值
页:
[1]