2.4.3: cast ground target AoE spell to specific spots / interact with dynamic objects menu

User Tag List

Results 1 to 5 of 5
  1. #1
    elip's Avatar Member
    Reputation
    1
    Join Date
    Oct 2016
    Posts
    2
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    2.4.3: cast ground target AoE spell to specific spots / interact with dynamic objects

    Hello everyone,

    I'm trying to reverse-engineer the Burning Crusade client mouse handling code. The two problems I'm trying to solve specifically are:

    1) casting "ground target" AoE spells programmatically (e.g. Blizzard) to a specific spot. The approaches that have crossed my mind are
    a) calling CastSpellByName(), and then synthesizing a mouse click from WINAPI, after which I hook the function that inputs the coordinates after the perspective un-transform etc. (I have found the address for this) and fill up with my own values - (not really feasible, since I'm dealing with a multibox scenario here).
    b) skipping mouse input altogether and trying to find the top-level function that immediate follows from the mouse click (hooking the win32 event loop was a dead-end, as far as I could tell)
    c) socket/packet injection

    2) clicking dynamic objects, such as mage tables, summoning portals or Manticron Cubes in Magtheridon's Lair - click-to-move kinda works, but only from a very specific angle and distance, so not reliable.

    Would anyone have any insight on these topics, or general advice/RE techniques for researching this stuff? Any version will do

    Thanx,

    -Elip

    2.4.3: cast ground target AoE spell to specific spots / interact with dynamic objects
  2. #2
    Corthezz's Avatar Elite User Authenticator enabled
    Reputation
    386
    Join Date
    Nov 2011
    Posts
    325
    Thanks G/R
    183/98
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Some input:
    If I remember right Bots which triggered CTM by just mem writes had a problem if you didnt do a legit CTM before because some values werent initialized. If you can you should try to call the internal CTM function of WoW.

    There is also an internal functions for casting AOE's which takes the spell ID and a struct with the X, Y, Z coordinates (at work right now and guessing so I might be wrong).
    Some easy steps to get you going finding the function yourself:
    Activate the AOE selection circle with a spell.
    Scan for unknown initial value.
    Do random stuff which doesnt change the state of the circle
    Scan for unchanged values a few times
    Cancel AOE
    Cast for changed
    Do random stuff
    Cast for unchanged a few times
    Rinse and repeat

    Same can be done with the spell ID used to trigger the AOE circle.
    After some time you should find two memory addresses which hold the AOE circle state aswell the AOE spell by ID which is about to being cast when you select the spot with the circle.
    Check xrefs to those addresses and write down possible functions.

    Tinker around. NOP out some instructions and see if shit is stil working etc.

    Thats atleast how I found it on 1.12.1
    Check my blog: https://zzuks.blogspot.com

  3. #3
    namreeb's Avatar Legendary

    Reputation
    658
    Join Date
    Sep 2008
    Posts
    1,023
    Thanks G/R
    7/215
    Trade Feedback
    0 (0%)
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    How I usually find functions which send a particular opcode is to use OllyDbg to put a conditional breakpoint on the packet send function for when the opcode matches the one you're interested in. Then you can walk up the call stack to find which function called the packet send function. If you're lucky, you'll find a function that takes a spell id and a position as its parameters, and you can just call it.

  4. Thanks elip (1 members gave Thanks to namreeb for this useful post)
  5. #4
    elip's Avatar Member
    Reputation
    1
    Join Date
    Oct 2016
    Posts
    2
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    namreeb: excellent advice! I wasn't able to find a function that would take spellID and coords as parameters, but I managed to find the static address where the socket handle is stored, and reverse the packet "encryption" (lolz ) function. Then I just WSOCK2::send() synthesized packets through that socket

    Thanks!

  6. #5
    namreeb's Avatar Legendary

    Reputation
    658
    Join Date
    Sep 2008
    Posts
    1,023
    Thanks G/R
    7/215
    Trade Feedback
    0 (0%)
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    You're welcome. But if you're going to build a packet yourself, you should use WoW's packet send function. It will handle the header encryption for you (including update state so the next legit packet is encrypted correctly as well) and avoid having to call any WinSock2 functions.

    NetClient::SendPacket is at 0x55F8A0 in 2.4.3.

  7. Thanks Corthezz (1 members gave Thanks to namreeb for this useful post)

Similar Threads

  1. AOE spell casting, terrain click without CTM
    By Sednogmah in forum WoW Memory Editing
    Replies: 8
    Last Post: 07-14-2011, 06:32 PM
  2. How to Cast AOE Spell like Blizzard?
    By phthegreat in forum WoW Memory Editing
    Replies: 9
    Last Post: 07-14-2011, 04:44 PM
  3. OOP - Casting AOE Spells (Protected LUA)
    By Tanaris4 in forum WoW Memory Editing
    Replies: 8
    Last Post: 04-04-2011, 02:39 PM
  4. How to Cast AOE Spell like Blizzard by memorywrite?
    By j_clairol in forum WoW Memory Editing
    Replies: 0
    Last Post: 02-16-2011, 10:27 PM
  5. Help! Cast aoe Spells
    By starfish99 in forum WoW Memory Editing
    Replies: 1
    Last Post: 11-21-2008, 04:36 AM
All times are GMT -5. The time now is 07:20 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search