Quote Originally Posted by wxh View Post
Okay...there have been a few requests for a writeup on how to find offsets, so I threw something together. I'm sure this can be improved upon, but it works.

Code:
Preparation:

To prepare to find your own offsets, you'll need to start with correct offsets the first time.  Run the
debug version of the server, click the icon in the upper left of the server.exe window, and select 
"properties".  Select the "Layout" tab, and in the "Screen Buffer Size" box, change "Height" to 3000.
Use the "es" command to display info about yourself.  Then, go through all of the secondary offsets and
find what values are stored at the indicated addresses (for example, the secondary offset "NameOffset" is
0xa4, so at 0xa4, you should see your character's first name).  Write down the values you find at each
of the secondary offsets listed below- this will help you know what to search for when trying to find
your own offsets later on.  For HideOffset, do this with some form of invisibility on your character, and
remember what form of invisibility you used.

HideOffset (4 bytes):                        (invis type:                    )
LevelOffset (1 byte):
ClassOffset (2 bytes):
RaceOffset (2 bytes):
PrimaryOffset (4 bytes):
OffhandOffset (4 bytes):

Note that you can also target an NPC that always has the same items equipped in their main and off hand,
and use the values you get from the "et" command to find all of the secondary offsets except OwnerID and
Hide.  Also note that it might be useful to get some cheap items that you can keep in your bank and
equip in your primary and off hands during offset search, since if you upgrade your equipment, the values
you'll need to search for will probably change.

So what do you do if you don't know any of the offsets to start with? On test the only offset that the normal server finds is the one that loads the map. When i try finding offsets following above and use ES i get:
> es
Display Raw Memory from 0x340000 to 0x340800
Failed to obtain valid memory pointer for offset pSelf
?) display main menu