8th April Offsets

A forum for the general posts relating to MacroQuest. *DEPRECATED: This forum is no longer in public use, but remains here for your reading pleasure. Enjoy

Moderator: MacroQuest Developers

lostinspace
decaying skeleton
decaying skeleton
Posts: 5
Joined: Wed Apr 09, 2003 7:42 am

Post by lostinspace » Wed Apr 09, 2003 7:49 am

Yes, field offsets changed within TspawnInfo. I'm not using MQ, so I listed only some of offsets that I use :

name= 28
type= 102
class= 103
race= 104
level= 109
speed= 120
dir= 124
y= 128
z= 140
x= 144
spawnID= 172
guild= 184
vistype= 224
pNext= 236

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Wed Apr 09, 2003 8:54 am

I think you lost me Megaton, but then I just got home from working all night... are you saying that this is the NEW correct code for _SPAWNINFO?

OLD code from MQ.h:

Code: Select all

typedef struct _SPAWNINFO {
	BYTE Unknown0000;      // 3?
	CHAR Name[30];
	BYTE Unknown0031[37];
	DWORD Zone;
	FLOAT Y;
	FLOAT X;
	FLOAT Z;
	FLOAT Heading;
	FLOAT Unknown0068;
	FLOAT SpeedRun;
	FLOAT SpeedY;
	FLOAT SpeedX;
	FLOAT SpeedZ;
	FLOAT SpeedHeading;
	FLOAT Unknown0088;
	FLOAT CameraAngle; // 128=up -128=down
	struct _SPAWNINFO *pPrev;
	struct _SPAWNINFO *pNext;
	PVOID pUnknown0108;    // Unknown... pointer? always 0000000
	PACTORINFO pActorInfo;
	PCHARINFO pCharInfo;
	FLOAT CameraHeightOffset;
	FLOAT ModelHeightOffset;
	DWORD SpawnID;
	DWORD MasterID;
	DWORD HPMax;
	DWORD HPCurrent;
	WORD GuildID;
	BYTE Unknown0162[6];
	BYTE Type;
	BYTE Class;
	BYTE Unknown0172[2];
	DWORD Race;
	BYTE Gender;
	BYTE Level;
	BYTE Unknown0174[2];
	BYTE Charmed;
	BYTE StandState;
	BYTE Light;
	BYTE Unknown0179[93];
	BYTE UnkFlag0230;
	BYTE Unknown0231[11];
	BYTE Linkdead;
	BYTE Guide;
	BYTE Unknown0244;
	BYTE GM;
	BYTE VisType;
	BYTE Unknown0247[7];
	DWORD Anon;
	BYTE Unknown0257[4];
	BYTE AFK;
	BYTE Unknown0285[7];
	WORD AARank;
	BYTE Unknown0294[6];
	CHAR Lastname[22];
	BYTE Unknown0298[12];
	WORD Deity;
} SPAWNINFO, *PSPAWNINFO;
Yours is quite a bit shorter... I'm assuming you are saying that just a certain part needs to be changed... or... sheesh, I really need some sleep =)

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Post by grimjack » Wed Apr 09, 2003 9:54 am

The application he is using does not need all the other stuff that is why it is much shorter. I would guess he is working on leqm or some other similar application.

megaton
decaying skeleton
decaying skeleton
Posts: 5
Joined: Mon Aug 05, 2002 4:10 am

Post by megaton » Wed Apr 09, 2003 10:05 am

Yeah, as I don't have all the offsets yet, the struct is a lot shorter than it really is.

I have no idea which fields MQ actually uses, but you can probably get away with removing all those references temporarily ;).

The reason MQ crashed was because pNext was in the wrong place so it couldn't traverse the link list of spawns.

Lyenu X`Arie
decaying skeleton
decaying skeleton
Posts: 4
Joined: Thu Mar 13, 2003 5:40 pm

Post by Lyenu X`Arie » Wed Apr 09, 2003 10:47 am

Here is what I have figured out on the new struct so far, a little different than the one posted before.

Code: Select all

typedef struct _SPAWNINFO { 
/*000*/	BYTE Unknown000[28];
/*028*/	CHAR Name[64];
/*092*/	DWORD ZoneID;
/*096*/	BYTE Unknown096[6];
/*102*/	BYTE Type;
/*103*/	BYTE Class;
/*104*/	DWORD Race;
/*108*/	BYTE Unknown106;
/*109*/	BYTE Level;
/*110*/	BYTE Unknown108[14]; 
/*124*/	FLOAT Heading; 
/*128*/	FLOAT Y;
/*132*/	BYTE Unknown132[8];
/*140*/	FLOAT Z;
/*144*/	FLOAT X;
/*148*/	BYTE Unknown148[24];
/*172*/	DWORD SpawnID;
/*176*/	BYTE Unknown176[60];
/*236*/	DWORD pNext;

} SPAWNINFO, *PSPAWNINFO;

Nesu
orc pawn
orc pawn
Posts: 10
Joined: Tue Mar 11, 2003 11:12 am

Post by Nesu » Wed Apr 09, 2003 10:50 am

GUILDS=006BC7C4 is an address I just cannot find in the old EQGAME.EXE to find a comparison in the new.
In the old .exe look for 0x006BC778 rather than 0x006BC7C4. When you find the replacement offset for 0x006BC778, add 0x4C to it and that is the GUILD offset.

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Wed Apr 09, 2003 11:22 am

The extra code in _SPAWNINFO appears to be for the SuperWho and SuperTarget functions. So yes, errors there would cause a crash, or possibly just be nonresponsive, if the struct is wrong and you do a /who or /target.

The problem is that removing them as you have done would cripple the information our version of /who gives out. You won't see GM, Guide, etc info, last names, etc. I'm guessing here, would have to take apart the /who function to say for sure, and I've got too many other segments I'm working on as it is.

Granted, a few of those functions I don't think ever worked, like "charmed", and I don't think "gender" really matters either, but you run into the potential for causing other functions/variables in eqlib.cpp to screw up. This may or may not be a problem depending on what you are using MQ for.

User avatar
ap50
a snow griffon
a snow griffon
Posts: 425
Joined: Sun Aug 18, 2002 2:29 pm

Post by ap50 » Wed Apr 09, 2003 12:41 pm

In the old .exe look for 0x006BC778 rather than 0x006BC7C4. When you find the replacement offset for 0x006BC778, add 0x4C to it and that is the GUILD offset.
In that case, it's 006EDE68 + C4

Therefore: GUILDS=006EDEB4
[color=yellow][size=92][b]Just because you're paranoid, it doesn't mean everyone isn't out to get you![/b][/size][/color]

NealThorpayt
Developer
Developer
Posts: 66
Joined: Thu Mar 13, 2003 2:14 pm
Location: Miskatonic University
Contact:

Post by NealThorpayt » Wed Apr 09, 2003 2:53 pm

Greetings Constructs,

I have verified that the new offsets for:
[DirectInput8]
Main=00772DDC
Keyboard=00772DE0
Mouse=00772DE4
are correct.

End of line...
By the pricking of my thumb, something wicked this way comes...

Vaft
a lesser mummy
a lesser mummy
Posts: 69
Joined: Fri Mar 07, 2003 6:39 am

Post by Vaft » Wed Apr 09, 2003 8:52 pm

I guess we're dealing with struct changes and/or a change in the offset checking. Anyway, these offsets agree with those ap50 posted..

Verified:

Code: Select all

Main=772DDC
Keyboard=772DE0
Mouse=772DE4

Zoning=759B5C
Zones=759B70
SpawnHeader=759B74
Items=759B78
Doors=759B90
SpawnFooter=759B9C
Char=759BB0
CharInfo=759BB8
Target=759BBC

Mouse=772DE8
Attack=72BA6C
Spells=767340

DoAbilityList=73078C
DoAbilityAvailable=72BA08
Group=6A9CF8
GroupCount=6A9BB0
clsItems=759BE0
clsSpawns=759B68

clsMainNewUI=772F78
EncryptPad=5C1A7C

NealThorpayt
Developer
Developer
Posts: 66
Joined: Thu Mar 13, 2003 2:14 pm
Location: Miskatonic University
Contact:

Post by NealThorpayt » Thu Apr 10, 2003 2:57 am

Greetings Constructs,

I have confirmed the following:
[Function Locations]
WriteChatColor=004DB0EB
GetRaceByID=004D09EE
GetClassByID=004D0399
GetDeityByID=004D1E90
ScreenItem=0045C8B7
ScreenSpawn=004E4A41
NewUIINI=0044759C
MaxMana=00464CE8
Commands=004E3B79
are correct.

Please note that 'LeftClick' and 'RightClick' should be removed as they are not compatible with the new UI.

End of line...
By the pricking of my thumb, something wicked this way comes...