[Question] Finding function paramaters 2.4.3 (BC) menu

User Tag List

Results 1 to 5 of 5
  1. #1
    prospectingemu's Avatar Member
    Reputation
    15
    Join Date
    Mar 2014
    Posts
    49
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Question] Finding function paramaters 2.4.3 (BC)

    Hey guys,

    I'm working on a bot for BC client, So far i've hooked the endscene (for some reason it doesn't work on windows 8 though, and dll must be attached at startup) and have call doString with this.

    (Thanks to SKU for helping me get this far)
    Code:
     
    typedef int(__cdecl *tDoString)(char const*, char const*);
    tDoString originalDoString = reinterpret_cast<tDoString>(0x00706C80);
    Now im trying to get 'click to move' working via the function call. I found the function here 0x00612A90 and using the page here Click To Move - WoWDev attemped to get it to work.

    ive defined it like this
    Code:
     typedef int(__cdecl *clickToMove)(float, float, float, float, INT, long, float, float, float);
    clickToMove originalClickToMove = reinterpret_cast<clickToMove>(0x00612A90);
    But all attempts to call it (even from the main thread, although I'm pretty sure this function is threadsafe) have resulted in a crash.

    [Question] Finding function paramaters 2.4.3 (BC)
  2. #2
    xalcon's Avatar Contributor ふたなり
    Authenticator enabled
    Reputation
    198
    Join Date
    Oct 2008
    Posts
    291
    Thanks G/R
    20/58
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    lol.. do you even understand what they wrote there or did you just copy everthing? Your ctm signature is just wrong. It looks like you've tried copying the memory structure and trying to invoke it like a function
    Code:
    Memory Click To Move Block by By Malu05 - 2007
    Offset		Type	Description		Additional Details
    0x0 =		float	?			?
    0x4 =		float	TURN_SCALE		Value determining the scale of the turn (only when turning more than 180 degrees?),
    0x8 =		float	?			?
    0xC = 		float	INTERACTION_DISTANCE	Value determining how far from the targeted position the player should stop.
    0x1C = 	INT	ACTION_TYPE		The action trigger. See details about Action Type Below.
    0x20 = 	8int	InteractGUID
    0x74 =		float	X move to
    0x78 =		float	Y move to
    0x7C =		float	Z move to
    THIS is a struct, not a function signature... and just look at the numbers on the left... they arent just for fun. They are the offsets into the struct because all values in between are mostly unknown or not important.

    The ctm call is (at least in 5.4.7+) a thiscall and I doubt it has changed much since CTM got implemented into the game.
    I'm using the following definition
    Code:
    [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
    public delegate bool CGPlayer_C__ClickToMoveDelegate(IntPtr thisPlr, ClickToMoveType type, ulong* GUID, WoWPosition* clickPos, float precision);
    which should translate to something like this (I'm not a C++ coder so this might be wrong!)
    Code:
    typedef bool(__thiscall *clickToMove)(CGPlayer_C* playerPtr, int type, long long* GUID, WOWPOS* position, float precision);
    I dont know about the offset though, you might want to take a look into my CTM Tutorial. http://www.ownedcore.com/forums/worl...icktomove.html ([HowTo] Find ClickToMove)
    Last edited by xalcon; 06-12-2014 at 02:35 AM.
    "Threads should always commit suicide - they should never be murdered" - DirectX SDK

  3. #3
    prospectingemu's Avatar Member
    Reputation
    15
    Join Date
    Mar 2014
    Posts
    49
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah you're right I assumed I was looking at the function paramaters not a struct. Thanks for your calling convention i'll take a closer look and try to get it figured.

    How do you find the function definitions? Im trying to find/follow so guides but there is nothing with an example as complex/big as this CTM one

  4. #4
    xalcon's Avatar Contributor ふたなり
    Authenticator enabled
    Reputation
    198
    Join Date
    Oct 2008
    Posts
    291
    Thanks G/R
    20/58
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    The function definition was just posted several hundred times in this board - also with some asm knowledge you can look into IDA and just reverse the function itself. Shouldnt be hard.
    "Threads should always commit suicide - they should never be murdered" - DirectX SDK

  5. #5
    Corthezz's Avatar Elite User Authenticator enabled
    Reputation
    386
    Join Date
    Nov 2011
    Posts
    325
    Thanks G/R
    191/98
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Lookup how the functions calling convention stores parameter and then grab them via OllyDBG and a breakpoint at the function?
    Last edited by Corthezz; 06-12-2014 at 03:33 AM.
    Check my blog: https://zzuks.blogspot.com

Similar Threads

  1. [Question] Finding this specific beam model
    By [Soul Eater] in forum WoW ME Questions and Requests
    Replies: 6
    Last Post: 09-24-2008, 04:37 PM
  2. [ Question ] Find the right Texture Files
    By Chaoty in forum WoW ME Questions and Requests
    Replies: 5
    Last Post: 05-18-2008, 01:37 PM
  3. [Question] Lua functions
    By Lich King in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 04-10-2008, 07:39 PM
  4. [Question] Finding Ip's
    By Hellson in forum World of Warcraft General
    Replies: 8
    Last Post: 01-14-2008, 07:43 PM
  5. [Question] Finding textures assosicated with a m2?
    By merfed in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 10-15-2007, 09:09 AM
All times are GMT -5. The time now is 02:13 AM. 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