How to get a valid Z coordinate menu

Shout-Out

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    starfish99's Avatar Corporal
    Reputation
    31
    Join Date
    May 2008
    Posts
    24
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to get a valid Z coordinate

    I tried to find valid coordinates surrounding player in memory, but I failed...

    I read from client databases such as DBClient_Map, and got some results:

    first, get the map entry

    //offset
    ptrGetRow_DBClient = 0x005AF0D0; //function GetRow_DBClient
    ptrDBClient_Map = 0x00FCF408; //DBClient_Map entry

    //get current MapIndex and CurrentMap entry
    asm
    mov eax, [ptrCurrentConnection]
    mov eax, [eax+2864h]
    mov eax, [eax+0CCh]
    mov MapIndex,eax
    mov ecx, ptrDBClient_Map
    push eax
    mov ebx,ptrGetRow_DBClient
    call ebx
    mov ptrCurrentMap, eax
    end;

    second, list the address and values from ptrCurrentMap :


    MapIndex=542,ptrMap=4E36FD0
    Offset= 0, intValue= 21E, fltValue=0.000000
    Offset= 4, intValue= 4F417A0, fltValue=0.000000, sValue=HellfireDemon
    Offset= 8, intValue= 1, fltValue=0.000000
    Offset= C, intValue= 0, fltValue=0.000000,
    Offset= 10, intValue= 4F417AE, fltValue=0.000000, sValue=HellfireDemon
    Offset= 14, intValue= E81, fltValue=0.000000
    Offset= 18, intValue= 4F40DD8, fltValue=0.000000,
    Offset= 1C, intValue= 4F40DD8, fltValue=0.000000,
    Offset= 20, intValue= C7, fltValue=0.000000
    Offset= 24, intValue=3F800000, fltValue=1.000000
    Offset= 28, intValue= 4F40DD8, fltValue=0.000000,
    Offset= 2C, intValue= 4F41772, fltValue=0.000000,
    Offset= 30, intValue= 4F40DD8, fltValue=0.000000,
    Offset= 34, intValue= 212, fltValue=0.000000
    Offset= 38, intValue=C393B5AD, fltValue=-295.419342
    Offset= 3C, intValue=4544FFE2, fltValue=3151.992676
    Offset= 40, intValue= 0, fltValue=0.000000,
    Offset= 44, intValue= 15180, fltValue=0.000000
    Offset= 48, intValue= 0, fltValue=0.000000,
    Offset= 4C, intValue=FFFFFFFF, fltValue= NAN
    Offset= 50, intValue= 1, fltValue=0.000000
    Offset= 54, intValue= 0, fltValue=0.000000,
    Offset= 58, intValue= 21F, fltValue=0.000000

    Offset= 5C, intValue= 4F417CD, fltValue=0.000000,sValue=HellfireRampart
    Offset= 60, intValue= 1, fltValue=0.000000
    Offset= 64, intValue= 0, fltValue=0.000000,
    Offset= 68, intValue= 4F417DD, fltValue=0.000000,sValue=HellfireRampart
    Offset= 6C, intValue= DEA, fltValue=0.000000
    Offset= 70, intValue= 4F40DD8, fltValue=0.000000,
    Offset= 74, intValue= 4F40DD8, fltValue=0.000000,
    Offset= 78, intValue= C7, fltValue=0.000000
    Offset= 7C, intValue=3F800000, fltValue=1.000000
    Offset= 80, intValue= 4F40DD8, fltValue=0.000000,
    Offset= 84, intValue= 4F41772, fltValue=0.000000,
    Offset= 88, intValue= 4F40DD8, fltValue=0.000000,
    Offset= 8C, intValue= 212, fltValue=0.000000
    Offset= 90, intValue=C3B40662, fltValue=-360.049866
    Offset= 94, intValue=453FBE54, fltValue=3067.895508
    Offset= 98, intValue= 0, fltValue=0.000000,
    Offset= 9C, intValue= 15180, fltValue=0.000000
    Offset= A0, intValue= 0, fltValue=0.000000,
    Offset= A4, intValue=FFFFFFFF, fltValue= NAN
    Offset= A8, intValue= 1, fltValue=0.000000
    Offset= AC, intValue= 0, fltValue=0.000000,
    Offset= B0, intValue= 220, fltValue=0.000000

    Offset= B4, intValue= 4F417F6, fltValue=0.000000,sValue=HellfireRaid
    ....

    these informations are about mapid,mapname,etc, and then I read other dbs,
    but there are no values I need.
    (When I looked into wmo,m2, I was confused...:confused
    So I just want to know, is there any address stored valid coordinates around me?
    And, is there any function can return a valid Z coordinate if x,y is knowned?

    Appreciate for any help!

    How to get a valid Z coordinate
  2. #2
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What exactly are you trying to do?

  3. #3
    starfish99's Avatar Corporal
    Reputation
    31
    Join Date
    May 2008
    Posts
    24
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am doing some research on teleporting, and I simply change my postion to teleport on a private server.
    If I want to teleport to a point 10 yards in front of me, it's easy to calculate x,y,
    but I have no idea of Z.
    I find that if I set a invalid Z coordiate, for example, beneath ground, I will
    fall down and then die.

  4. #4
    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)
    So you want to read the map height at an arbitrary location so you can automatically calculate your Z axis to be set above ground?

  5. #5
    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)
    If you want to do what Cypher assumes (probably correctly) you want to do, then you may want to look into loading WoW's ADT files, which are contained in its MPQ data files. Each ADT file contains 256 chunks of terrain data, including a heightmap, with each chunk representing (100 / 3) x (100 / 3) coordinates. You can figure out which chunk governs the x/y coordinate of where you want to jump, then check its height map to figure out where to place yourself.

    The ADT file format is documented here.

  6. #6
    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)
    Wouldn't that make you lag like shit parsing through all those offsets whenever you want to teleport? I think I might try this, seems cool...

  7. #7
    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)
    Well, you can pretty easily figure out where you are. Each MCNK section of each ADT file has the starting x/y coordinate of that chunk, and we know that it is (100 / 3) x (100 / 3) units (33.3334), so we can easily loop through each chunk and figure out which one applies to where we are. Hell, can even narrow it down to which ADT file by checking the start value of the first MCNK section and the start value of the last MCNK section + 33.3334. Then, once you've found which ADT file to load, you loop through its MCNK sections until you find the one you need. Maximum of ~300 loops / recursive calls until you find where you need to be, not a huge deal.

  8. #8
    starfish99's Avatar Corporal
    Reputation
    31
    Join Date
    May 2008
    Posts
    24
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    shynd, thanks for your replies.
    I have looked into adt files, and I think your way is working.
    But I notice that instance map data is not stored in adt files, but wmo files.
    So, if I want to teleport in instances, I should read the corresponding
    wmo files?
    Another hand,I read from UnknOwned 's post on terrain edit,
    to know that, he can do terrain edit just by Cheat Engine.
    So I am sure that, all these map data, including height map, must have been loaded
    by wow.exe and stored in memory, the only thing I should do is just to read them.
    Am I right?
    In fact, wherever I stay inside or outside an instance, once I left-click a terrain , the x,y,z coordiates of the terrain's surface will be immediately stored in memory.
    But I don't know where the coordiates get from.

  9. #9
    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)
    You know, you should look at the MangOS source to check if the code for blink is in there. That would be an awesome starting point, IMO. Just an idea.

  10. #10
    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)
    Originally Posted by lanman92 View Post
    You know, you should look at the MangOS source to check if the code for blink is in there. That would be an awesome starting point, IMO. Just an idea.
    Nope, last time I checked blink was implemented with a "kick" rather than a teleport. ie It throws you into the air, as if you've been kicked in the ass.

  11. #11
    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'm not really sure if you're joking or being serious o.O

  12. #12
    Opalis's Avatar Member
    Reputation
    10
    Join Date
    Dec 2008
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think he is being serious, if you watch blink you don't actually teleport. You move in something of a projectile motion

  13. #13
    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)
    On a private server, you get thrown. On live, you teleport. I guess the creators of MangOS can't even solve the problem that this guy's having. They just let the physics engine take care of it. Lol.

  14. #14
    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)
    Originally Posted by Opalis View Post
    I think he is being serious, if you watch blink you don't actually teleport. You move in something of a projectile motion

    Correct, I was being serious (just phrasing things humorously).

  15. #15
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Kay, since you're having trouble with terrain data, I guess I'll clear a little bit up.

    (This is all from BC knowledge, as I haven't messed with the new WotLK files yet)

    You'll want to read the WDT file first and foremost. This will tell you if that specific area has ADT's attached, or just a set of WMOs. (If it's just WMOs, it's most likely an instance)

    The very first byte of the header in WDTs shows whether that WDT has terrain or not (whether it contains references to ADTs or just WMOs), then in the MWMO, MODF chunks it'll tell you exactly which files to look for. (Skip the MODF chunk if the WDT has no terrain, as it will only contain a blank MODF chunk)

    From there, you can parse all the info you need out of them, (which is no small task) to get a valid Z for some X/Y. You can get incredibly accurate results, although the performance is kind of bad. If you can read it all directly from memory, you'd be much better off.

Page 1 of 2 12 LastLast

Similar Threads

  1. how to get coordinate by cursor position
    By starfish99 in forum WoW Memory Editing
    Replies: 10
    Last Post: 12-04-2008, 10:58 PM
  2. How to get to the outlands on a live blizzard server
    By Matt in forum World of Warcraft Exploits
    Replies: 4
    Last Post: 06-16-2006, 05:27 PM
  3. How to get behind Orgrimmar (pics)
    By Matt in forum World of Warcraft Guides
    Replies: 16
    Last Post: 05-03-2006, 01:33 AM
  4. How to get rid of 1.10 patch?
    By Bossman4 in forum World of Warcraft General
    Replies: 1
    Last Post: 05-02-2006, 01:36 AM
All times are GMT -5. The time now is 09:50 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