[HELP] cant get Obj->Interact() to work. menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    cenron's Avatar Member
    Reputation
    12
    Join Date
    Mar 2008
    Posts
    93
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [HELP] cant get Obj->Interact() to work.

    I have managed to get all the other functions working except for Interact(). I have no idea why this works for others but not me.

    Its function34, as specified by Cypher.

    Code:
        virtual void Function32() = 0;
        virtual void Function33() = 0;
    public:
        virtual void Interact() = 0;                    // Function34
    private:
    	virtual void Function35() = 0;
        virtual void Function36() = 0;
    and I have it declared like this.

    Code:
    m_pCurMgr =  (CGCurMgr_C*)( dwCurMgr );
    and I call it like this

    Code:
    If(TargetObj)
       TargetObj->Interact();
    I have no idea what I am doing wrong here. Any guidance would be appreciated.

    [HELP] cant get Obj->Interact() to work.
  2. #2
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its function 36 currently. You must have outdated information, or have missed my correction. Apologies if I didn't apply the correction to the original post but there are countless threads about it.

  3. #3
    cenron's Avatar Member
    Reputation
    12
    Join Date
    Mar 2008
    Posts
    93
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Cypher View Post
    Its function 36 currently. You must have outdated information, or have missed my correction. Apologies if I didn't apply the correction to the original post but there are countless threads about it.

    Thanks for the correction. I must have missed the update.

    But its still no go. This is so weird.

    GetObjectName works great. It cant be an alignment issue?

    Code:
        virtual void Function34() = 0;                    // Function34
    	virtual void Function35() = 0;
    public:
        virtual void Interact() = 0;					 // Function36
    private:
        virtual void Function37() = 0;
        virtual void Function38() = 0;

  4. #4
    goderion's Avatar Active Member
    Reputation
    25
    Join Date
    Oct 2008
    Posts
    54
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @cenron:

    I had the same problem.
    Read this: http://www.mmowned.com/forums/wow-me...ways-null.html

    Originally Posted by kynox View Post
    GetObjectByGUID references s_curMgr via the Thread Local Storage. If you want to use GetObjectByGUID, you have two options.

    1) Call it from WoW's main thread.
    2) Set the value of your TLS variable, index 0 to the s_curMgr pointer.
    As i solved the problem with GetObjectByGUID, Object->Interact works too.

  5. #5
    cenron's Avatar Member
    Reputation
    12
    Join Date
    Mar 2008
    Posts
    93
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by goderion View Post
    @cenron:

    I had the same problem.
    Read this: http://www.mmowned.com/forums/wow-me...ways-null.html



    As i solved the problem with GetObjectByGUID, Object->Interact works too.

    I dont know if this would apply to me. I use the g_clientConnection method and dump the VTable into my own VTable. I also inject, I dont read process memory.

  6. #6
    Xarg0's Avatar Member
    Reputation
    61
    Join Date
    Jan 2008
    Posts
    389
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    cenron, do any of the Virtual Funktions work for you?
    If not it might be a compiler issue
    I hacked 127.0.0.1

  7. #7
    cenron's Avatar Member
    Reputation
    12
    Join Date
    Mar 2008
    Posts
    93
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Xarg0 View Post
    cenron, do any of the Virtual Funktions work for you?
    If not it might be a compiler issue

    Ya, all the other functions work. I am using GetPostion() // Function 8

    and I am using GetObjectName() // Function 47

    But Interact() // Function 36 dosen't seem to work for me.

    I get the curMgr from [[g_clientConnection] + OFFSET]

    Code:
    // Pseudo Code
    CGCurMgr_C *curMgr = (CGCurMgr_C *)[[g_clientConnection] + OFFSET]
    
    CGObject_C * PlayerObj = GetObjectByGUID(curMgr->wLocal)
    
    if(PlayerObj)
    {
      CGObject_C * TargetObj = GetObjectByGUID(PlayerObj->GetKnownField(TARGET_DESCRIPTOR))
    
    if(TargetObj)
       TargetObj->Interact();
    }
    This isnt exactly how my code look, I got wrappers which streamline the code, but thats how it works.

    I even have ClickToMove turned on just in case I am to far away. I get nothing. It dosent crash or error in any way. It just does nothing.

    I thought it might have been an alignment issue so I tested it by directly calling the function.

    Code:
    tyepdef void (* tInteract ) (void);
    tInteract oInteract = (tInteract)((DWORD *)TargetObj + 4 * 36);
    
    oInteact();

    I still get nothing!

    Here is an exact copy of my VTable. Maybe someone can see what I cant.

    Code:
        virtual void Function0() = 0;
        virtual void Function1() = 0;
        virtual void Function2() = 0;
        virtual void Function3() = 0;
        virtual void Function4() = 0;
        virtual void Function5() = 0;
        virtual void Function6() = 0;
    public:
        virtual CGContainer_C * GetBagPtr() = 0;        // Function7
        virtual void GetPosition(WOWPOS & MyPos) = 0;   // Function8
        virtual float GetFacing() = 0;                  // Function9
        virtual float GetScale() = 0;					// Function10
    private:
        virtual void Function11() = 0;
        virtual void Function12() = 0;
        virtual void Function13() = 0;
        virtual void Function14() = 0;
        virtual void Function15() = 0;
    public:
        virtual const char * GetModel() = 0;            // Function16
    private:
        virtual void Function17() = 0;
        virtual void Function18() = 0;
        virtual void Function19() = 0;
        virtual void Function20() = 0;
        virtual void Function21() = 0;
        virtual void Function22() = 0;
        virtual void Function23() = 0;
    public:
        virtual float GetFacingAngle() = 0;                // Function24
    private:    
    	virtual void Function25() = 0;
        virtual void Function26() = 0;
        virtual void Function27() = 0;
        virtual void Function28() = 0;
        virtual void Function29() = 0;
        virtual void Function30() = 0;
        virtual void Function31() = 0;
        virtual void Function32() = 0;
        virtual void Function33() = 0;
        virtual void Function34() = 0;                    // Function34
    	virtual void Function35() = 0;
    public:
        virtual void Interact() = 0;					 // Function36
    private:
        virtual void Function37() = 0;
        virtual void Function38() = 0;
        virtual void Function39() = 0;
        virtual void Function40() = 0;
        virtual void Function41() = 0;
        virtual void Function42() = 0;
        virtual void Function43() = 0;
        virtual void Function44() = 0;
        virtual void Function45() = 0;
        virtual void Function46() = 0;
    public:
        virtual const char * GetObjectName() = 0;        // Function47
    private:
        virtual void Function48() = 0;
        virtual void Function49() = 0;
        virtual void Function50() = 0;
        virtual void Function51() = 0;
        virtual void Function52() = 0;
        virtual void Function53() = 0;
        virtual void Function54() = 0; 
        virtual void Function55() = 0;
        virtual void Function56() = 0;
        virtual void Function57() = 0; 
        virtual void Function58() = 0;
        virtual void Function59() = 0;
        virtual void Function60() = 0;
        virtual void Function61() = 0;
    Last edited by cenron; 12-03-2008 at 08:59 PM.

  8. #8
    kynox's Avatar Account not activated by Email
    Reputation
    830
    Join Date
    Dec 2006
    Posts
    888
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sigh, did you even read what he quoted?

    Originally Posted by kynox
    GetObjectByGUID references s_curMgr via the Thread Local Storage. If you want to use GetObjectByGUID, you have two options.

    1) Call it from WoW's main thread.
    2) Set the value of your TLS variable, index 0 to the s_curMgr pointer.

  9. #9
    cenron's Avatar Member
    Reputation
    12
    Join Date
    Mar 2008
    Posts
    93
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by kynox View Post
    Sigh, did you even read what he quoted?

    [/I]

    I see what your saying....I think.

    Code:
    
    dwCurMgr = [ [g_ClientConnection] + offset ]
    m_pCurMgr =  (CGCurMgr_C*)( dwCurMgr );
    
    DWORD* dwTemp = 0;
    
    __asm
    {
          mov eax, DWORD PTR FS:[0x2C]
          mov eax, DWORD PTR DS:[eax]
         mov pTmp, dwTemp
    }
    
    *(DWORD*)((DWORD)pTmp + 0x08) = dwCurMgrr;  // Has the TLS Slot changed?

    EDIT: Never mind got it to work! The above code is valid. THX for the help man. Your the shit.
    Last edited by cenron; 12-03-2008 at 11:02 PM.

  10. #10
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Where did you get that class for ObjectManager? I haven't seen any on these forums or on EoN. I haven't looked much at the ObjMgr part of WoW in IDA, I could probably figure it out. It'd be nice to share though.

  11. #11
    cenron's Avatar Member
    Reputation
    12
    Join Date
    Mar 2008
    Posts
    93
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by lanman92 View Post
    Where did you get that class for ObjectManager? I haven't seen any on these forums or on EoN. I haven't looked much at the ObjMgr part of WoW in IDA, I could probably figure it out. It'd be nice to share though.
    Read the stickies.

  12. #12
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, I can't figure out why this code is crashing WoW without even a message...

    Code:
     
    if(GetAsyncKeyState(VK_F11))
    {
    UpdateTLS();
    curObj = (CGObject_C*)(s_curMgr + 0xAC);
    MessageBox(NULL, L"1st curObj: " + (DWORD)&curObj, L"curObj", MB_OK);
    while(curObj != 0)
    {
    if(curObj->GetObjectName() == "Young Thistle Boar")
    {
    MessageBox(NULL, L"We got the name right.", L"Yipee!", MB_OK);
    curObj->Interact();
    }
    nextObj = curObj->m_nextObj;
    curObj = nextObj;
    Sleep(100);
    }
    //FreeLibrary(hThis);
    exit = true;
    return;
    }

  13. #13
    Shynd's Avatar Contributor
    Reputation
    97
    Join Date
    May 2008
    Posts
    393
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does it show the message box? And I do believe that you are comparing strings incorrectly.

  14. #14
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was pretty sure that I was doing the strings wrong, don't I have to dereference it or something? The Messagebox doesn't show when I run it. I think it's in the part where I get the first object. It seems to crash right there.

  15. #15
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rofl fail.

    You can't compare C-style strings with the equality operator. Either use a C++-style string with the equality operator overloaded (ie std::string) or use the appropriate C function to do your string comparisons (strstr, stricmp, etc).

    Protip: Learn the language before you try to use it, your code is ****ing retarded.

Page 1 of 2 12 LastLast

Similar Threads

  1. [HELP] Cant get PVP Scripts to work(REPOST)
    By Darksid in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 07-04-2008, 01:16 PM
  2. [HELP] Cant get GM ticket's to work
    By Summer in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 02-12-2008, 07:06 PM
  3. [help] cant get model edit fix to work
    By Masterkenshin in forum WoW ME Questions and Requests
    Replies: 7
    Last Post: 02-08-2008, 03:07 AM
  4. Need osme help cant get first part makign a server SS shot!!!!!
    By 30480 in forum World of Warcraft Emulator Servers
    Replies: 11
    Last Post: 10-17-2007, 07:40 PM
  5. I need help, cant get the right IDs on my server
    By xn00bpwn3rx in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 09-08-2007, 06:02 PM
All times are GMT -5. The time now is 03:47 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