Sending packets menu

Shout-Out

User Tag List

Results 1 to 7 of 7
  1. #1
    LogicWin's Avatar Master Sergeant
    Reputation
    51
    Join Date
    Mar 2011
    Posts
    103
    Thanks G/R
    4/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Sending packets

    Hello, I've made this thread because I'm tired of the endless wow errors.

    What I'm trying to do is to call the ClientService_SendPacket function.
    As you will notice I'm using AutoIt for this.

    I'm successfully called the function using:

    Code:
     
      AsmAdd($asm, "mov ecx, [" & $base + $ClientConnection &"]")
      AsmAdd($Asm, "push " & $DataStore)
      AsmAdd($asm, "mov ebx, " & $base + $SendPacket)
      AsmAdd($asm, "call ebx")
    I've have hooked the EndScene function, the hook allows me to run a code anytime of simple write to a flag.

    I'm using the offsets:

    Code:
    $ClientConnection = 0x980558
    $SendPacket = 0x87BF0        
    $DataStore1 = 0x75A8A8
    Now for the packet that i'm trying to send is a simple CMSG_CAST_SPELL packet.

    Here's the datastore code/what i write to the address that I'm pushing.

    Code:
    _memorywrite($DataStore	    , $wow, $base + $DataStore1, "int"); ptrDataStore
    _memorywrite($DataStore + 0x4 , $wow, $SpellPacket,"int")	; ptrPacketData
    _memorywrite($DataStore + 0x8 , $wow, 0x0 ,"int")						; UnKnown1
    _memorywrite($DataStore + 0xC , $wow, 0x100, "int")					; MayType; // 0x100 for normal, 0x300 for warden
    _memorywrite($DataStore + 0x10, $wow, 0x5, "int")					; PacketLen
    _memorywrite($DataStore + 0x14, $wow, 0x0, "int")						; UnKnown3
    The spellpacket is build like this:

    Code:
    _memorywrite($SpellPacket, $wow, 0x5E4E, "int");OPCODE
    _memorywrite($SpellPacket + 0x4, $wow, 0x01  , "byte")
    _memorywrite($SpellPacket + 0x5, $wow, 0x1438, "ushort")
    I've also tried to do like this:

    Code:
    _memorywrite( $Spellpacket, $wow, "4E 5E 00 00 1E 38 14" , "byte[12]")
    And I've allocated the memory before i wrote of with this code:

    Code:
    $SpellPacket = _MemVirtualAllocEx( $wow[1], 0, 0x12, $MEM_COMMIT, $PAGE_EXECUTE_READWRITE )
    $DataStore   = _MemVirtualAllocEx( $wow[1], 0, 0x18, $MEM_COMMIT, $PAGE_EXECUTE_READWRITE )



    The issues I'm having is that wow gives me an error like:
    The instruction at "0x774A8C19" referenced memory at "0x00000024".
    The memory could not be "written".



    So could any nice non-trolling person help me ?

    Sending packets
  2. #2
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1515
    Join Date
    May 2008
    Posts
    2,433
    Thanks G/R
    81/336
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    This:
    Code:
    _memorywrite($DataStore + 0x10, $wow, 0x5, "int")
    Should be this:
    Code:
    _memorywrite($DataStore + 0x10, $wow, 0x7, "int")
    0x10 is packet length. Also, you need to fix up your spell packet structure, it's way wrong.


    Edit: And stop using AutoIt. Damn.

  3. #3
    Aftiagouras's Avatar Member
    Reputation
    2
    Join Date
    Mar 2008
    Posts
    22
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also, isnt ClientConnection 0x98056C ?

  4. #4
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1515
    Join Date
    May 2008
    Posts
    2,433
    Thanks G/R
    81/336
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Aftiagouras View Post
    Also, isnt ClientConnection 0x98056C ?
    They point to the same place. It's always been like that.

  5. #5
    LogicWin's Avatar Master Sergeant
    Reputation
    51
    Join Date
    Mar 2011
    Posts
    103
    Thanks G/R
    4/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Jadd View Post
    This:
    Code:
    _memorywrite($DataStore + 0x10, $wow, 0x5, "int")
    Should be this:
    Code:
    _memorywrite($DataStore + 0x10, $wow, 0x7, "int")
    0x10 is packet length. Also, you need to fix up your spell packet structure, it's way wrong.


    Edit: And stop using AutoIt. Damn.
    I've been using the spellpacket struct from the example @ http://www.ownedcore.com/forums/worl...endpacket.html ([SourceCode & Question] CastSpell by ID with SendPacket)

    Code:
     
                SpellPacket spellPacket = new SpellPacket();
                spellPacket.OpCode = CMSG_CAST_SPELL;
                spellPacket.Count = 0;
                spellPacket.SpellID = (ushort)spellId;
    
    [StructLayout(LayoutKind.Explicit, Size = 0x12)]
        public struct SpellPacket
        {
            [FieldOffset(0x0)]
            public int OpCode;
            [FieldOffset(0x4)]
            public byte Count;
            [FieldOffset(0x5)]
            public ushort SpellID;
        }
    Is the structure wrong?

  6. #6
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1515
    Join Date
    May 2008
    Posts
    2,433
    Thanks G/R
    81/336
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by LogicWin View Post
    I've been using the spellpacket struct from the example @ http://www.ownedcore.com/forums/worl...endpacket.html ([SourceCode & Question] CastSpell by ID with SendPacket)

    Code:
     
                SpellPacket spellPacket = new SpellPacket();
                spellPacket.OpCode = CMSG_CAST_SPELL;
                spellPacket.Count = 0;
                spellPacket.SpellID = (ushort)spellId;
    
    [StructLayout(LayoutKind.Explicit, Size = 0x12)]
        public struct SpellPacket
        {
            [FieldOffset(0x0)]
            public int OpCode;
            [FieldOffset(0x4)]
            public byte Count;
            [FieldOffset(0x5)]
            public ushort SpellID;
        }
    Is the structure wrong?
    Yes.

    Code:
        [StructLayout(LayoutKind.Explicit, Size = 0x18)]
        public struct Spell_Cast_AOE
        {
            [FieldOffset(0x0)] public uint OpCode; // 0x00005E4E
            [FieldOffset(0x4)] public byte Unknown1; // 0x00
            [FieldOffset(0x5)] public uint SpellID;
            [FieldOffset(0x9)] public uint Unknown2; // 0x00000000
            [FieldOffset(0xD)] public byte Unknown3; // 0x00
            [FieldOffset(0xE)] public uint SpellType; // 0x00000000 = AOE or cast on target
        }
    You're gonna need to change it for cast on GUID and AOE on location and that, but I can't be bothered spoonfeeding anymore. What I've given you will work for both AOE and cast on target.

    Edit: Don't use packets for casting unless your bot is clientless. Don't even bother.
    Last edited by Jadd; 10-31-2011 at 10:01 PM.

  7. #7
    LogicWin's Avatar Master Sergeant
    Reputation
    51
    Join Date
    Mar 2011
    Posts
    103
    Thanks G/R
    4/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Jadd View Post
    Yes.

    Code:
        [StructLayout(LayoutKind.Explicit, Size = 0x18)]
        public struct Spell_Cast_AOE
        {
            [FieldOffset(0x0)] public uint OpCode; // 0x00005E4E
            [FieldOffset(0x4)] public byte Unknown1; // 0x00
            [FieldOffset(0x5)] public uint SpellID;
            [FieldOffset(0x9)] public uint Unknown2; // 0x00000000
            [FieldOffset(0xD)] public byte Unknown3; // 0x00
            [FieldOffset(0xE)] public uint SpellType; // 0x00000000 = AOE or cast on target
        }
    You're gonna need to change it for cast on GUID and AOE on location and that, but I can't be bothered spoonfeeding anymore. What I've given you will work for both AOE and cast on target.

    Edit: Don't use packets for casting unless your bot is clientless. Don't even bother.

    Thanks, i appreciate that you're helping me

    As for the record I'm not trying to create a clientless bot (too complicated), but I'm trying to create the teleport hack you guys have already done

Similar Threads

  1. sending packet to wow client
    By norowen in forum WoW Memory Editing
    Replies: 3
    Last Post: 02-02-2010, 05:50 PM
  2. [Help] Send Packet
    By rat50 in forum WoW Memory Editing
    Replies: 13
    Last Post: 12-19-2009, 05:01 PM
  3. Cast spell by Sending Packets
    By starfish99 in forum WoW Memory Editing
    Replies: 1
    Last Post: 12-23-2008, 11:56 AM
  4. Send packet ,No response to the game
    By metalqiang in forum WoW Memory Editing
    Replies: 5
    Last Post: 10-01-2008, 06:05 AM
  5. where is send packets call address
    By metalqiang in forum WoW Memory Editing
    Replies: 9
    Last Post: 08-19-2008, 04:30 PM
All times are GMT -5. The time now is 05:24 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search