Announcement

Collapse
No announcement yet.

[OTClient] Map Reading

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • [OTClient] Map Reading

    good afternoon
    i have trouble in step of reading map (last step to finish a bot), i don't know how and where i can start searching in CE, i tried find the addresses of vector map (with 15 indexes of every floor) but not success.

    anyone can help help me? (OTClient)

  • #2
    Originally posted by cjaker View Post
    good afternoon
    i have trouble in step of reading map (last step to finish a bot), i don't know how and where i can start searching in CE, i tried find the addresses of vector map (with 15 indexes of every floor) but not success.

    anyone can help help me? (OTClient)
    It's been a while since I dealt with OTClients map but here's the general outline of how it works.

    The tiles are stored in unordered_maps with one for each floor. The different maps for the floors are stored after each other in contigious memory so if you can find one, you can easily find the others. When it comes to the unordered maps themselves they are using a quite simple function to map the x and y values of the tile down to one single integer that is used for the key for the unordered_maps.

    The structure in memory for the unordered_maps themselves are quite simple if you know the theory behind hash maps. Basically it's an object with 3 members, size, capacity and a pointer to the elements. The tricky part is to deal with the collisions but for this implementation they're just stored as a singly linked list.

    I know this is a very high level description so if there's something that I wrote that is weird please let me know

    Comment


    • #3
      Thanks for the help!

      Floor Addresses
      all_floors_addresses.jpg

      My Floor Address
      my_floor.png

      Address to Tiles (i think)
      address_to_tiles.png

      Address to Tiles (part 2)
      address_tiles.jpg

      First Tile
      tiles.jpg

      But now i need to understand how i can get exactly items from this 'first tile' i am lost in this, thanks for help

      Comment


      • #4
        Seems to be on the right path. The value in the key value pair is a pointer to a Tile object which in turn has a vector of items in it. The 0x3F80000 you see in the unordered_map is the load factor. If you treat it as a float value you'll see that it is 1.0 which can tell you something about how many collisions in the hash table you'll find.

        Comment

        Working...
        X