A forum for feature requests/discussions and user submitted patches that improve MQ2
Moderator: MacroQuest Developers
-
iluvseq
- Clueless Mudslinger
- Posts: 269
- Joined: Mon Apr 14, 2003 10:05 am
Post
by iluvseq » Thu May 22, 2003 3:05 am
I've been digging around trying to figure out where the list of items on a looted corpse are stored in memory.
In doing so, I've found out that 0x00760134 points to a "corpse" structure of the currently being looted corpse.
However, I have yet to figure out much about this corpse structure at all. I've definately not found any pointers to item structs or a pointer to a list of pointers to items or anything nice and handy like that.
I'm posting this hoping that knowledge of what this offset points to might be helpful to someone, and hopeing that someone might have more luck decifering the corpsestruct.
My main goal is to be able to grab the itemstructs for all items on a corpse, even if they don't get looted.
I've written a "magelo style" item collector that reads charinfo and grabs all the items from inventory and bank, and I'm trying to expand it to also get all items seen on corpses, and eventually items seen on merchants and in item links.
Thank you.
-
Amadeus
- The Maestro

- Posts: 2036
- Joined: Sat Jun 29, 2002 3:51 pm
Post
by Amadeus » Thu May 22, 2003 3:31 am
I'll look into it tomorrow..sounds fun. I'd like to eventually have the entire memory mapped out...who cares if it's useful or not ..hehe
-
EqMule
- Developer

- Posts: 2697
- Joined: Fri Jan 03, 2003 9:57 pm
-
Contact:
Post
by EqMule » Thu May 22, 2003 6:15 am
I will help if your program will be open source

o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received

donations for this month's patches.
Bitcoin: 1Aq8ackjQ4f7AUvbUL7BE6oPfT8PmNP4Zq
Krono: PM me.
I can always use characters for testing, PM me if you can donate one.
-
iluvseq
- Clueless Mudslinger
- Posts: 269
- Joined: Mon Apr 14, 2003 10:05 am
Post
by iluvseq » Thu May 22, 2003 11:23 am
The source is available at:
http://www.cyberdeck.org/CoI_Collector-2.0.src.zip
It is currently hard coded to send item and profile information to our web site, but that is fairly trivial to change.
The perl script that runs on the server to accept the collected info is available at:
http://www.cyberdeck.org/charpost.src
The current offset file (used to dynamically update structure info in the collector) is available at:
http://www.cyberdeck.org/offset.txt
You should be able to duplicate the SQL schema used for the backend database by looking at the perl script, but if not, I can post a schema if you like.
-
dont_know_at_all
- Developer

- Posts: 5450
- Joined: Sun Dec 01, 2002 4:15 am
- Location: Florida, USA
-
Contact:
Post
by dont_know_at_all » Thu May 22, 2003 2:47 pm
you might want to modify/copy the /updateitems command...
-
iluvseq
- Clueless Mudslinger
- Posts: 269
- Joined: Mon Apr 14, 2003 10:05 am
Post
by iluvseq » Thu May 22, 2003 3:20 pm
/updateitems just does what my code can already do, it walks through the characters inventory and bank and collects all the items.
I'm looking to move beyond that, to gathering items seen on corpses (but not looted) and eventually to items on merchants and sent via itemlinks in chat.
It looks like the /merchant command might help me figure out how to capture merchant items, except that EQADDR_CLSMAIN_MERCHANTITEMBASE is an unknown offset at this time.
-
Mckorr
- Developer

- Posts: 2326
- Joined: Fri Oct 18, 2002 1:16 pm
- Location: Texas
Post
by Mckorr » Thu May 22, 2003 5:14 pm
Not completely unkown... another thread, don't remember which one, they are finding an extra gazillion offsets for a bunch of things including the merchants.
MQ2: Think of it as Evolution in action.
-
Amadeus
- The Maestro

- Posts: 2036
- Joined: Sat Jun 29, 2002 3:51 pm
Post
by Amadeus » Thu May 22, 2003 6:56 pm
Ok...this is what I have so far. I honestly don't think that the items are stored in this structure, but I have yet to test it on a Player Character corpse, so I should be updating this after I have a chance to kill myself in arena or something :)
Code: Select all
typedef struct _LOOTCORPSE {
/*0x000*/ BYTE Unknown0x000; // 03 seems very common (for NPC anyway)
/*0x001*/ CHAR Name[75];
/*0x04c*/ FLOAT Timer; //Uncertain the equation used here, but fairly certain it's the timer
/*0x050*/ FLOAT X;
/*0x054*/ BYTE Unknown0x054[4];
/*0x058*/ FLOAT Y;
/*0x05c*/ FLOAT Z;
/*0x060*/ BYTE Unknown0x060[36];
/*0x084*/ DWORD Flags;
/*0x088*/ BYTE Unknown0x088[4];
/*0x08c*/ DWORD Unknown0x08c; //256 seems very common
// possible pointers at 0x0e0, 0x0e4, 0x0f0 ..but nothing obvious
} LOOTCORPSE, *PLOOTCORPSE;
Example:
Code: Select all
Unknown0x000 = 3 (offset 0x0)
Name = a_diseased_drogmor's_corpse0 (offset 0x1)
Timer = 144.250000 (offset 0x4c)
X = 1331.389771 (offset 0x50)
Y = -2164.811035 (offset 0x58)
Z = -21.538729 (offset 0x5c)
Flags = 290492088 [8 16 32 128 512 1024 2048 32768 1048576 4194304 16777216 268435456 ] (Offset: 0x84)
Unknown0x08c = 256 (offset 0x8c)
-
Jay
- a lesser mummy

- Posts: 59
- Joined: Tue Jan 28, 2003 11:37 am
Post
by Jay » Fri May 23, 2003 2:50 am
[8 16 32 128 512 1024 2048 32768 1048576 4194304 16777216 268435456 ]
Is posting binary flags like this a standard, because I would just a well rather see it in binary or hex
I.E.
DEC 290492088
HEX 0x11 50 8E B8
BIN 0001 0001 0101 0000 1000 1110 1011 1000
I just hate digging out my calculator all the time =)
I would bet that first digit would be a corpse type... Die and tell us what you are =) Also kill fennin ro or something and tell us what he is. =)
-
Mckorr
- Developer

- Posts: 2326
- Joined: Fri Oct 18, 2002 1:16 pm
- Location: Texas
Post
by Mckorr » Fri May 23, 2003 9:51 am
I think it should all be done in trinary. You know, "yes", "no", and "you've just done something stupid."
MQ2: Think of it as Evolution in action.
-
Amadeus
- The Maestro

- Posts: 2036
- Joined: Sat Jun 29, 2002 3:51 pm
Post
by Amadeus » Fri May 23, 2003 3:33 pm
I don't know..I like seeing it like that, it lets me know instantly that, for example, that corpse has 12 flags on it. I mean, there's no way of knowing right now what those flags are, but we know that this particular coprse has 12 attributes that have been "set" on it.
It comes from my time coding for text based MUDs in c. We used this concept ALL the time in setting flags for zones, mobs, objects, etc...