zoukankan      html  css  js  c++  java
  • 0,5挖矿

     
    1 范围___
    2 跑去挖
     
     
    {此段代码需要hook的支持}
    /// <summary>
    /// 挖矿
    /// </summary>
    /// <param name="_EDX">矿铲所在包裹的位置/param>
    /// <param name="_ECX">地面系统物品ID/param>
    procedure wakuang(_EDX:DWORD;_ECX:DWORD);
    begin
       ASM
         PUSH 0
         PUSH $0C01 //矿产ID号  
         PUSH _EDX  // 包裹ID号(矿铲所在包裹的位置)
         PUSH 0
         PUSH _ECX  //石矿 地面系统物品ID  EDX=00000000 
         MOV EBX,$005A73A0
         CALL EBX
         ADD ESP,$14
       END;
    end;

    {此段代码需要hook的支持}
    /// <summary> 
    /// {人物是在游戏当中还是小退} 
    /// </summary> 
    function InGame():Boolean; 
    var gameretn:DWORD; 
    begin 
      asm 
       mov eax,[$00924D48] 
       mov gameretn,eax 
      end; 
      if gameretn=0  then Result:=true{在游戏当中} 
      else if gameretn>=1 then  Result:=False; {人物在角色选择界面} 
    end; 

    procedure TForm1.Button1Click(Sender: TObject); 
    {采集材料,需要排序否则程序挖的不是最近那个和 和选怪一样 捡物}
    var
      I:Integer;
      L:Integer;
      pGds           :PDWORD;
      gdsTmp         :DWORD;
      Gds_id1        :PDWORD;
      Gds_id2        :PDWORD;
      Gds_distance   :PSingle;
      Gds_name       :PDWORD;
      Gds_name1      :PWideChar;
      gds_posx       :PSingle;
      gds_posy       :PSingle;
      gds_posz       :PSingle;
      Gds_A_B        :Single;
      Gds_id1tmp     :DWORD;
      Gds_id2tmp     :DWORD;
      Gds_distance0  :PSingle;
      Gds_id3        :PDWORD;//
      Gds_id3tmp     :DWORD;//用于挖框
      Gds_distance2  :Single; //用于挖框
      Gds_distance1  :Single;
    begin
       if InGame=False then  Exit;
      asm
       mov eax,[$924E0C]
       mov eax,[eax+$1c]
       mov eax,[eax+$8]
       mov eax,[eax+$28]
       mov ecx,[eax+$18]
       mov gdsTmp,ecx
      end;
      for I:=0 to 768 do
      begin
        pGds:=pointer(gdsTmp+I*4);
        if pGds^>0 then
        begin
          pGds         :=Pointer(pGds^+$4);
          Gds_id3      :=Pointer(pGds^+$10C); {系统物品ID}
          Gds_name     :=Pointer(pGds^+$164);
          Gds_name1    :=Pointer(Gds_name^);
          Gds_distance :=Pointer(pGds^+$154);
          for L:=0 to  ListBox1.Count-1 do  {}
          begin               {}
            if Gds_name1<>ListBox1.Items[L] then continue;
            Gds_id3tmp:=Gds_id3^;
            Gds_distance1:=Gds_distance^;
            //  Memo1.Lines.Add(Format('%x',[Gds_id3tmp]));
          end;
        end;
      end;
     if Gds_distance1<=8 then wakuang(pckId,Gds_id3tmp);
    end;



    procedure TForm1.Timer1Timer(Sender: TObject);
    {返回 矿铲 所在包裹的ID号}
    var
      I: Integer;
      packsack  :PDWORD;
      pckTmp    :DWORD;
      pck_amount:DWORD;
      pck_kind  :PDWORD;
      pckObjId  :PDWORD;
      pck_name  :PDWORD;
      pck_name1 :PWideChar;
    begin
     if InGame=False then  Exit;
      asm
        mov eax,[$924E0C]
        mov eax,[eax+$1c]
        mov eax,[eax+$20]
        mov eax,[eax+$b4c]
        mov ecx,[eax+$10]
        mov pck_amount,ecx//
        mov ecx,[eax+$c]
        mov pckTmp,ecx //
      end;
      for I := 0 to pck_amount - 1 do
      begin
        packsack := pointer(pckTmp + I*4);
        pck_kind := Pointer(packsack^ + $4);
        pckObjId := Pointer(packsack^ + $8);
        if packsack^ > 0 then
        begin
         if pckObjId^ = $C01 then pckId:=I;{返回 矿铲 所在包裹的ID号} {pckID需要公共声明}
         {如果包里没有发现矿铲,...}
        end;
      end;
    end;
     





    附件列表

  • 相关阅读:
    CF1327D Infinite Path 抽象代数
    CF1426 ABCDEF 数学+思维+DP
    CF1332E Height All the Same 计数
    CF1327E Count The Blocks 简单计数
    【CF1304】Codeforces Round #620 (Div. 2) 【思维+回文+构造+ST表】
    【CF1301】Codeforces Round #619 (Div. 2) 【思维+贪心+模拟+构造+二维ST表】
    【CF1255A】Changing Volume【思维】
    Json Master masters JSON!
    Polyglot Translators: Let's do i18n easier! 一款国际化插件小助手!
    mns: Money Never Sleeps! 自己开发的一款 IDEA 插件介绍.
  • 原文地址:https://www.cnblogs.com/xe2011/p/2524195.html
Copyright © 2011-2022 走看看