Return 0 in Get X,Y,Z of an Obj menu

Shout-Out

User Tag List

Results 1 to 6 of 6
  1. #1
    luciferc's Avatar Contributor
    Reputation
    90
    Join Date
    Jul 2008
    Posts
    373
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Return 0 in Get X,Y,Z of an Obj

    *From Cypher*
    [07:14:51]: GAMEOBJECT_POS_X = 0x10
    [07:14:51]: GAMEOBJECT_POS_Y = 0x11
    [07:14:51]: GAMEOBJECT_POS_Z = 0x12
    Code:
          
    //The Getting name & type of the Object works so its not that the base addr is wrong
    //Curobj = Base addr of Object in question         
    tempObject.OBJECT_X = Memory.ReadFloat(hProcess, (curObj + (long)eObjectFields.OBJECT_FIELD_X)); // 0x10 * 4
    tempObject.OBJECT_Y = Memory.ReadFloat(hProcess, (curObj + (long)eObjectFields.OBJECT_FIELD_Y)); // 0x11 * 4
    tempObject.OBJECT_Z = Memory.ReadFloat(hProcess, (curObj + (long)eObjectFields.OBJECT_FIELD_Z)); // 0x12 * 4
    EX:

    Found a new node Fel Iron Deposit
    Go to <0,0,0>

    Tryed other things than just nodes and returned the same thing

    I had it working a while ago but i must've done something wrong and i didn't catch it.

    To people who think *4 is wrong i also didn't do any *4 and still is a 0.
    Last edited by luciferc; 11-26-2008 at 10:33 PM.

    Return 0 in Get X,Y,Z of an Obj
  2. #2
    typedef's Avatar Banned
    Reputation
    8
    Join Date
    Nov 2008
    Posts
    96
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Whats your question? I dont know if its maby a pointer to that memory, that wouldnt make sense, looks like it A Operator * multiplication.
    Now that I noticed it, thats just a comment, nothing really there

    // Means there is a comment
    Last edited by typedef; 11-26-2008 at 11:39 PM.

  3. #3
    argh44z's Avatar Member
    Reputation
    19
    Join Date
    Nov 2007
    Posts
    93
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Those are indices in the descriptors (pointed to by objectptr + 0x. So [objectptr+0x8]+GAMEOBJECT_POS_X*4 is what you're looking for.

    For other kinds of objects, there are other pointers to inside the descriptors (for units for example, there's objectptr+0x10, which point to an address past the common descriptors relating to the objects and get to the specific descriptors of the subclass of CGObject. All of the ones in Cypher's post are relative to the address of the 0x8 pointer, which should work for all objects.

    Originally Posted by typedef View Post
    Whats your question? I dont know if its maby a pointer to that memory, that wouldnt make sense, looks like it A Operator * multiplication.
    Now that I noticed it, thats just a comment, nothing really there

    // Means there is a comment

    If you don't know what you're talking about, then don't bother answering. It doesn't really do anyone any good.
    Last edited by argh44z; 11-27-2008 at 01:50 AM.

  4. #4
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1356
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, the values I've posted are indexes into the array, if you're not accessing it as an array you need to do the multiplication manually.

    Furthermore, the VMT is easier to use to get an objects location/heading.

  5. #5
    luciferc's Avatar Contributor
    Reputation
    90
    Join Date
    Jul 2008
    Posts
    373
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nvm Fixed <see Below
    Last edited by luciferc; 11-27-2008 at 09:40 AM.

  6. #6
    luciferc's Avatar Contributor
    Reputation
    90
    Join Date
    Jul 2008
    Posts
    373
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


    <1st Line of display = Misc Info
    <2nd Line = X Float
    <3rd Line = X Addr
    <4th Line = Y Addr
    <5th Line = Z Addr

    Last edited by luciferc; 11-27-2008 at 09:39 AM.

Similar Threads

  1. [Story] Getting an Item returned
    By CuT in forum World of Warcraft General
    Replies: 3
    Last Post: 06-05-2010, 10:08 PM
  2. Getting hook-returned results to another process
    By xpl0itz in forum Programming
    Replies: 0
    Last Post: 03-24-2010, 12:09 PM
  3. [WoW][3.0.9] A way to get return values from Lua Functions
    By ramey in forum WoW Memory Editing
    Replies: 6
    Last Post: 03-22-2009, 10:09 PM
  4. Getting the return value of Lua_DoString()
    By Nesox in forum WoW Memory Editing
    Replies: 43
    Last Post: 01-15-2009, 06:06 AM
All times are GMT -5. The time now is 05:16 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