Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/iano/public_html/tpforums-vb5/forum/includes/class_core.php on line 5842

PHP Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_BOTH - assumed 'MYSQL_BOTH' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 588

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 612

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 85

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6
Why does not attacking my function? packet
Results 1 to 10 of 10

Thread: Why does not attacking my function? packet

  1. #1
    Member
    Join Date
    Oct 2012
    Location
    brazil
    Posts
    36

    Why my function does not Attacking?? packet

    VERSION 9.70
    ThID := GetWindowThreadProcessId(TibiaHandle, @PID);
    PH := OpenProcess(PROCESS_ALL_ACCESS, FALSE, PID);

    Code:
    procedure SendPacket(ProcessID: Cardinal; Packet: Pointer); stdcall; external 'packet.dll';
    The new code i try to use to make a target if hp < variable

    Edit4 is name from player/monster

    The player/monster recive a RedSquare but i can only shoot runes with this on combobox...

    if press f7 = exori frigo, she go on the floor.

    And my attack from rod/sword don't work

    Code:
    procedure TMain.MenuItem1Click(Sender: TObject);
       var
    List : TListItem;
    aux: string;
    begin
      List := ListView1.Items.add;
      aux := (BL.Selected.Text);
      List.Caption:= (aux);
    end;
    
    procedure TMain.ComboTargetTimer(Sender: TObject);
    var
    v1: integer;
    v4: String;
    i: integer;
    auxTarget, i2, auxvalor: integer;
    ler : Dword;
    PacketBuffer: array  [0..200] of byte;
    begin
    v4:= Edit4.Text;
    v1 := StrToInt(ComboBox29.Text);
    auxTarget := Integer(LastTarget);
    
    
        Updateworld; // Chama a função
        for i := 0 to MaxCreatures - 1 do
         begin
          if (BattleList[i].isVisible = 1) then
          begin
          if ((BattleList[i].Name = v4)) then
           begin
           auxValor :=BattleList[i].ID;
            if ((auxValor = BattleList[i].ID) and (BattleList[i].HPBar <= v1)) then
             begin
              WriteProcessMemory(PH, Ptr(RedSquare), @auxvalor, 4, ler);
                PacketBuffer[0] := $05;
                PacketBuffer[1] := $00;
                PacketBuffer[2] := $A1;
                copymemory(@ PacketBuffer[3],@auxValor,4);
                PacketBuffer[8] := $00;
                PacketBuffer[9] := $00;
                PacketBuffer[10] := $00;
                SendPacket(PID, @PacketBuffer);
                hotkey(ComboBox30.Text);
             end;
             end;
           end;
        end;
       end;
    I make a debugline and give-me error on this part: SendPacket(PID, @PacketBuffer);




    I still using a packet.dll in my paste, my ASLR are disable, windows 7

    What i doing wrong? i trying in version tibia 9.70
    Last edited by duuhleon; 02-09-2013 at 01:10 AM.

  2. #2
    Super Moderator
    Join Date
    May 2007
    Posts
    1,191
    You're missing attack count, I think

  3. #3
    Member
    Join Date
    Oct 2012
    Location
    brazil
    Posts
    36
    Quote Originally Posted by Blaster_89 View Post
    You're missing attack count, I think
    how? where?

  4. #4

  5. #5
    Member
    Join Date
    Oct 2012
    Location
    brazil
    Posts
    36

    Ok but i not using tibiaAPI...

    i still using packet.dll to send packet

  6. #6
    Super Moderator
    Join Date
    May 2007
    Posts
    1,191
    Quote Originally Posted by duuhleon View Post
    Ok but i not using tibiaAPI...

    i still using packet.dll to send packet
    The packet structure is still the same

  7. #7
    Senior Member
    Join Date
    Apr 2008
    Posts
    689
    also copymemory(@ PacketBuffer[3],@id,4);

    I'm not sure, but length(inttostr(id)) looks like you are converting the id to string and then getting the string's length -_-

  8. #8
    Member
    Join Date
    Oct 2012
    Location
    brazil
    Posts
    36
    Quote Originally Posted by Farsa View Post
    also copymemory(@ PacketBuffer[3],@id,4);

    I'm not sure, but length(inttostr(id)) looks like you are converting the id to string and then getting the string's length -_-


    don't work =/

  9. #9
    Quote Originally Posted by duuhleon View Post
    don't work =/
    I'm cracking up

  10. #10
    Senior Member
    Join Date
    Jan 2010
    Location
    Venezuela
    Posts
    366
    You start copying monster id in buffer pos 2 and then end in position 6, then you move to add data in position 8, you are leaving empty 2 buffer options with 0x00.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •