unit Dllform; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, RzBckgnd, ExtCtrls, RzPanel, RzTabs, RzButton, StdCtrls, RzEdit, Mask, RzLstBox, RzLabel, RzCmboBx, RzRadChk; type TForm1 = class(TForm) RzGroupBox1: TRzGroupBox; RzSeparator1: TRzSeparator; RzButton1: TRzButton; RzButton2: TRzButton; RzBtnHome: TRzButton; RzPageControl1: TRzPageControl; TabSheet1: TRzTabSheet; TabSheet2: TRzTabSheet; TabSheet11: TRzTabSheet; RzMemo1: TRzMemo; RzBtnF1: TRzButton; RzBtnF2: TRzButton; RzBtnF3: TRzButton; RzBtnF4: TRzButton; RzBtnF5: TRzButton; RzBtnF6: TRzButton; RzBtnF7: TRzButton; RzBtnF8: TRzButton; Button1: TButton; Button2: TButton; Button3: TButton; Button4: TButton; Button5: TButton; Button6: TButton; Button7: TButton; Button8: TButton; Button9: TButton; Button10: TButton; btn_selMon: TButton; Button11: TButton; Button12: TButton; Button13: TButton; Button14: TButton; Button15: TButton; Button16: TButton; Button17: TButton; Button18: TButton; Button19: TButton; RzNumericEdit1: TRzNumericEdit; Button20: TButton; btnWalkRoad: TButton; Btn_GoRoad: TButton; Button27: TButton; TabSheet12: TRzTabSheet; RzLabel1: TRzLabel; RzListBox_Mon: TRzListBox; RzButton3: TRzButton; rzNum: TRzNumericEdit; TabSheet13: TRzTabSheet; RzButton4: TRzButton; TabSheet14: TRzTabSheet; Memo2: TMemo; Button21: TButton; Button23: TButton; Button25: TButton; Button26: TButton; Label1: TLabel; Label2: TLabel; Button22: TButton; Button24: TButton; TimerTeam: TTimer; CheckBox1: TCheckBox; CheckBox2: TCheckBox; GroupBox1: TGroupBox; Memo1: TMemo; CheckBox_AutoPick: TCheckBox; TimerAutoPick: TTimer; Timer1: TTimer; Timer_AutoPlay: TTimer; ChkBox_HP: TCheckBox; ChkBox_MP: TCheckBox; RzHP: TRzNumericEdit; RzMP: TRzNumericEdit; Timer_AutoUseGoods: TTimer; RzCB_HP: TRzComboBox; RzCB_MP: TRzComboBox; CheckBox6: TCheckBox; CheckBox7: TCheckBox; RzComboBox3: TRzComboBox; RzComboBox4: TRzComboBox; Label3: TLabel; Label4: TLabel; ckbox_AutoPlay: TCheckBox; cck_FixArea: TCheckBox; RzNumFix_X: TRzNumericEdit; RzNumFix_Y: TRzNumericEdit; Label5: TLabel; Label6: TLabel; RzComBoSkill: TRzComboBox; Label7: TLabel; RzNumFix_Area: TRzNumericEdit; RzEdit1: TRzEdit; Button28: TButton; RzEdit_sel: TRzEdit; RzCheckBox_SelmonID: TRzCheckBox; RzListBox_Npicklist: TRzListBox; Label8: TLabel; CheckBox_PickYN: TCheckBox; Edit_GoodsName: TEdit; procedure RzBtnHomeClick(Sender: TObject); procedure RzBtnF1Click(Sender: TObject); procedure RzBtnF2Click(Sender: TObject); procedure RzBtnF3Click(Sender: TObject); procedure RzBtnF4Click(Sender: TObject); procedure RzBtnF5Click(Sender: TObject); procedure RzBtnF6Click(Sender: TObject); procedure RzBtnF7Click(Sender: TObject); procedure RzBtnF8Click(Sender: TObject); procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Button3Click(Sender: TObject); procedure Button4Click(Sender: TObject); procedure Button5Click(Sender: TObject); procedure Button6Click(Sender: TObject); procedure Button7Click(Sender: TObject); procedure Button8Click(Sender: TObject); procedure Button9Click(Sender: TObject); procedure Button10Click(Sender: TObject); procedure Button12Click(Sender: TObject); procedure Button13Click(Sender: TObject); procedure Button14Click(Sender: TObject); procedure Button15Click(Sender: TObject); procedure Button16Click(Sender: TObject); procedure Button17Click(Sender: TObject); procedure Button18Click(Sender: TObject); procedure Button19Click(Sender: TObject); procedure Button20Click(Sender: TObject); procedure btnWalkRoadClick(Sender: TObject); procedure Btn_GoRoadClick(Sender: TObject); procedure RzButton3Click(Sender: TObject); procedure Button21Click(Sender: TObject); procedure Button22Click(Sender: TObject); procedure Button23Click(Sender: TObject); procedure Button27Click(Sender: TObject); procedure btn_selMonClick(Sender: TObject); procedure Button11Click(Sender: TObject); procedure Button26Click(Sender: TObject); procedure Button25Click(Sender: TObject); procedure Timer_AutoUseGoodsTimer(Sender: TObject); procedure Timer_AutoPlayTimer(Sender: TObject); function CheckFix():boolean; function autoSelmonId():integer; procedure Button28Click(Sender: TObject); procedure Button24Click(Sender: TObject); procedure PickGoods2(); function strNameinList(name:string):boolean; procedure TimerAutoPickTimer(Sender: TObject); procedure CheckBox_AutoPickClick(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation uses GameProc; {$R *.dfm} function TForm1.strNameinList(name:string):boolean; var i:integer; begin result:=false; for i:=0 to self.RzListBox_Npicklist.Count-1 do begin if (self.RzListBox_Npicklist.ItemCaption(i)=name) then begin result:=true;exit;end; //表示物品名在列表里存在 end; end; //////// function TForm1.CheckFix():boolean; //定点检测 var curRole:^integer; cx,cy:^Single;//当前坐标 begin result:=true;//超出范围 ///如果未开启 定点功能 则返回 假 if not cck_FixArea.Checked then begin result:=false;exit; result:=true;self.RzEdit1.Text:='未超出范围';end; curRole:=Pointer(GameBase+$1c); curRole:=Pointer(curRole^+$24);//当前角色基址 cx:=Pointer(curRole^+$3c);//当前X坐标 cy:=Pointer(curRole^+$3c+8);//当前Y坐标 //在窗口上 添加3个RzNumericEdit //分别取名为RzNumFix_X(固定X坐标),RzNumFix_Y(固定Y坐标),RzNumFix_Area(固定范围) //检测是否超出范围 if ((cx^>=(RzNumFix_Area.Value+RzNumFix_X.Value))or (cx^<=(RzNumFix_X.Value-RzNumFix_Area.Value))or (cy^>=(RzNumFix_Area.Value+RzNumFix_Y.Value))or (cy^<=(RzNumFix_Y.Value-RzNumFix_Area.Value)) ) then begin //超出范围,通过寻路 回到定点位置 //goRoad(RzNumFix_X.Value,RzNumFix_Y.Value); result:=true; self.RzEdit1.Text:='超出范围2'; end else begin result:=false;self.RzEdit1.Text:='未超出范围';end; end; procedure TForm1.RzBtnHomeClick(Sender: TObject); begin self.Visible:=not self.Visible; end; procedure TForm1.RzBtnF1Click(Sender: TObject); begin F1_F8(1); //F1 end; procedure TForm1.RzBtnF2Click(Sender: TObject); begin F1_F8(2); end; procedure TForm1.RzBtnF3Click(Sender: TObject); begin F1_F8(3); end; procedure TForm1.RzBtnF4Click(Sender: TObject); begin F1_F8(4); end; procedure TForm1.RzBtnF5Click(Sender: TObject); begin F1_F8(5); end; procedure TForm1.RzBtnF6Click(Sender: TObject); begin F1_F8(6); end; procedure TForm1.RzBtnF7Click(Sender: TObject); begin F1_F8(7); end; procedure TForm1.RzBtnF8Click(Sender: TObject); begin F1_F8(8); end; procedure TForm1.Button1Click(Sender: TObject); begin F1_9(1); end; procedure TForm1.Button2Click(Sender: TObject); begin F1_9(2); end; procedure TForm1.Button3Click(Sender: TObject); begin F1_9(3); end; procedure TForm1.Button4Click(Sender: TObject); begin F1_9(4); end; procedure TForm1.Button5Click(Sender: TObject); begin F1_9(5) end; procedure TForm1.Button6Click(Sender: TObject); begin F1_9(6); end; procedure TForm1.Button7Click(Sender: TObject); begin F1_9(7); end; procedure TForm1.Button8Click(Sender: TObject); begin F1_9(8); end; procedure TForm1.Button9Click(Sender: TObject); begin F1_9(9); end; procedure TForm1.Button10Click(Sender: TObject); begin F1_9(10); end; procedure TForm1.Button12Click(Sender: TObject); begin useGoods(1); //第一格物品 end; procedure TForm1.Button13Click(Sender: TObject); begin useGoods(2); //第一格物品 end; procedure TForm1.Button14Click(Sender: TObject); begin skillNum(2);//清风破 技能号 2 end; procedure TForm1.Button15Click(Sender: TObject); begin skillNum($3);//震烈击 3 end; procedure TForm1.Button16Click(Sender: TObject); begin //双燕斩 技能号 5 //冰燕斩 技能号 6 //落燕斩 技能号 7 //轻功 技能号 63 skillNum($5); end; procedure TForm1.Button17Click(Sender: TObject); begin skillnum($63); //等价于 //skillnum(99); //轻功 end; procedure TForm1.Button18Click(Sender: TObject); begin PickGoods; end; procedure TForm1.Button19Click(Sender: TObject); var num:Dword; begin num:=round(self.RzNumericEdit1.Value); usebiaoqing(num); end; procedure TForm1.Button20Click(Sender: TObject); begin sendTxt(Pchar(self.RzMemo1.Text)); end; //////////// procedure walkroad; var c1,c2,c3,c4:Dword; xhy,xhy2 :array[1..3] of single; begin xhy[1]:=-181.01; xhy[2]:=-11.1; xhy[3]:=72.3; xhy2[1]:=0.01; xhy2[2]:=0.1; xhy2[3]:=0.3; c1:=$0046C800; c2:=$00470FD0; c3:=$00471100; c4:=$0046CC70; asm mov ebx,$95E800 add ebx,$1C mov ebx,[ebx] mov ebx,[ebx+$24] //取出角色对象 mov ecx,[ebx+$918] push 1 call c1; mov esi,eax XOR EDI,EDI lea ecx,xhy push ecx //目的地地址 push edi mov ecx,esi call c2; lea edx,xhy2 lea eax,xhy push edx push eax mov ecx,esi call c3 mov ecx,[ebx+$918] push 0 push 1 push esi push 1 call c4 end; end; procedure TForm1.btnWalkRoadClick(Sender: TObject); begin walkroad(); end; procedure TForm1.Btn_GoRoadClick(Sender: TObject); begin goRoad(-347,219); end; procedure TForm1.RzButton3Click(Sender: TObject); begin self.Caption:=intToHex(self.autoSelmonId(),8); selmon( autoSelmonId); end; /////////过滤选怪 Function TForm1.autoSelmonId():integer; var i,MonNum,start,endaddr:Dword; Vecx, monId,monNum2,P:^Dword; monName:PwideChar; saddr,s,sName:string; begin //dd [[[[95AD3c]+1c]+8]+20]+18 self.RzListBox_Mon.Clear;//清空怪列表 MonNum:=round(self.rzNum.Value); asm mov ecx,$95ad3c mov ecx,[ecx] mov ecx,[ecx+$1c] mov ecx,[ecx+$8] mov ecx,[ecx+$20] mov ebx,[ecx+$18] mov start,ebx //数组起始地址 add ebx,[ecx+$18+4] mov endaddr,ebx;//结束地址 end; for i:=1 to $300 do begin try vecx:=Pointer(start); start:=start+4;//指针移到下一个怪对象 if Vecx^=0 then continue; monID:=Pointer(Vecx^+$8); //读怪ID p:=Pointer(Vecx^+$4); //指向怪物基址指针 saddr:=intToHex(p^,8); //显示地址 monNum2:=Pointer(P^+$128); p:=Pointer(p^+ $21c); //指向怪物名字的指针 monName:=Pointer(p^); //怪名字 s:=intToHex(monID^,$8); sname:=WideCharTostring(monName); if (sname= RzEdit_sel.Text) then begin result:= monID^; exit; end; except continue ; //出错处理 end; end; end; procedure Tform1.PickGoods2(); var monid, Goods:PDWORD; i,pi:DWord; goodsName:PWideChar; strName:string; begin memo1.Clear; for i:=1 to $300 do //物品列表遍历 begin //[[[[[95E800+1c]+8]+24]+10+8]+I*4] Goods:=Pointer($95E800+$1c); Goods:=Pointer(Goods^+$8); Goods:=Pointer(Goods^+$24); Goods:=Pointer(Goods^+$18); Goods:=Pointer(Goods^+I*4);//[[[[95E800+1c]+8]+24]+10+8]+I*4 pi:=Goods^; if pi>0 then begin monid:=Pointer(Goods^+8); memo1.Lines.Add(intToHex(monid^,8)); Goods:=Pointer(Goods^+4);//读物品对象基址 Goods:=Pointer(Goods^+$168); //读出了名字 GoodsName:=Pointer(Goods^); strName:= WideCharTostring(GoodsName); //宽字符转string if strNameinList(strName) then continue else pickgoods(monid^); memo1.lines.add(strName); end; end; // end; procedure TForm1.Button21Click(Sender: TObject); var i:integer; playBase,pt,curRole:PDWORD;//^integer ^Dword; ws:pwidechar; s:string; begin //dd [[ [[[[GameBase+1c]+24]+138]+18] +I*4]+4] //i=0..$300 playBase:=Pointer(GameBase+$1c); playBase:=Pointer(Dword(playbase^)+$24); playBase:=Pointer(Dword(playbase^)+$138); playBase:=Pointer(Dword(playbase^)+$18); for i:=0 to $300 do begin curRole:=Pointer(playBase^+i*4); if (curRole=nil) then continue; if (curRole^=0) then continue; curRole:=Pointer(curRole^+4); pt:=Pointer(curRole^+$3A8); ws:=Pointer(pt^);//字串指针 s:=WideCharTostring(ws); self.Memo2.Lines.Add(s); end; end; procedure TForm1.Button22Click(Sender: TObject); begin self.RzListBox_Npicklist.Add(Edit_GoodsName.Text); end; procedure TForm1.Button23Click(Sender: TObject); begin JoinTeam();/// end; procedure TForm1.Button27Click(Sender: TObject); begin beat();//普攻测试 end; procedure TForm1.btn_selMonClick(Sender: TObject); begin selmon();//选怪测试 end; procedure TForm1.Button11Click(Sender: TObject); begin useRed();//使用金创药 end; procedure TForm1.Button26Click(Sender: TObject); begin ExitTeam(); end; procedure TForm1.Button25Click(Sender: TObject); begin acceptToJoin(); end; procedure TForm1.Timer_AutoUseGoodsTimer(Sender: TObject); var curRoleBlood,curMagicValue:PDWORD; begin //当前角色血值<RzHp 使用F1 //[[[GameBase+1c]+24]+25C] curRoleBlood:=Pointer(GameBase+$1C); curRoleBlood:=Pointer(CurRoleBlood^+$24); curMagicValue:= curRoleBlood;//当前角色基址 curRoleBlood:=Pointer(CurRoleBlood^+$25c);//当前HP curMagicValue:=Pointer(curMagicValue^+$260);//当前MP //是否达到血值保护下限 if (ChkBox_HP.Checked and (curRoleBlood^<RzHp.IntValue)) then begin F1_F8(RzCB_HP.ItemIndex+1); end; if (ChkBox_MP.Checked and (curMagicValue^<RzMp.IntValue)) then begin F1_F8(RzCB_MP.ItemIndex+1); end; //物品用尽提示 // if [[[[[[PGameBase]+1c]+24]+1*4+908]+0c]+0]=0 //then MesssageBox(0,'F1_上物品用尽, 'Error',MB_ICONERROR or MB_OK); end; var PF1F8:PDWORD; procedure TForm1.Timer_AutoPlayTimer(Sender: TObject); begin ///////自动打怪////////////// if self.ckbox_AutoPlay.Checked then begin //dd [[[[[PGameBase]+1c]+24]+1*4+908]+0c]+4*0 //0表示数组下标 F1-F8F1 <>0 F1_F8( PF1F8:=Pointer(PGameBase); PF1F8:=Pointer(PF1F8^+$1C); PF1F8:=Pointer(PF1F8^+$24); PF1F8:=Pointer(PF1F8^+$90c); PF1F8:=Pointer(PF1F8^+$c); PF1F8:=Pointer(PF1F8^+4*self.RzComBoSkill.ItemIndex); if ( PF1F8^=0) then exit; ///////如果选中怪死亡 则重新选怪 ///如果怪死亡 选中怪ID 就是0 角色属性+7E4 //dd [[GameBase+1c]+24]+7e4 //选中怪ID=0 PF1F8:=Pointer(PGameBase); PF1F8:=Pointer(PF1F8^+$1C); PF1F8:=Pointer(PF1F8^+$24); PF1F8:=Pointer(PF1F8^+$7e4); if (( PF1F8^=0) or ((PF1F8^ and $80000000)<>$80000000)) then //是否选中的是自己 PF1F8^<>ID begin //是否超出范围 if self.CheckFix() then goRoad(self.RzNumFix_X.Value,self.RzNumFix_Y.Value) else begin if RzCheckBox_SelmonID.Checked then selmon(self.autoSelmonId()) else selmon(); end; //重新选怪 end else f1_F8(self.RzComBoSkill.ItemIndex+1);//怪未死亡 end; ///////范围检测 定点打怪////////////// end; procedure TForm1.Button28Click(Sender: TObject); begin selmon($8000330A); end; procedure TForm1.Button24Click(Sender: TObject); begin self.RzListBox_Npicklist.DeleteSelectedItems; end; procedure TForm1.TimerAutoPickTimer(Sender: TObject); begin if self.CheckBox_PickYN.Checked then pickgoods2() else pickGoods(); end; procedure TForm1.CheckBox_AutoPickClick(Sender: TObject); begin TimerAutoPick.Enabled:=self.CheckBox_AutoPick.Checked; end; end.