TODO: Player upgrades

Code

NOTE: Verified on Windows-based unmodded (loading hacks is considered modding) clients as of patch 1.16.1. This uses the EPD format (Memory condition in SCMDraft 2). All addresses are local unless otherwise stated. Variables are 0-based unless otherwise stated. Constants prefixed with "0x" are hexadecimal numerals.

VARIABLES:

a: Generic

c: Cooldown

e: Unit entry

f: First unit index address

h: Hotkey

k: Virtual key code

o: Clockwise offset

p: Player ID

u: Unit index

x: X coordinate

y: Y coordinate

[ADDR BASE] [EP FORMULA] [DESC]: [CONDITION/ACTION FORMULA]

0x51C000 -112857 DATA SEGMENT START

0x57FE60 -10561+216*p+12*h+e HOTKEYED UNIT (SHARED): (Unit alpha ID)

0x58A364 0 DEATH TABLE START

0x58CE24 2736 DEATH TABLE END

0x5968AC 12626 LEFT CLICK: AtLeast 1

0x596A18 12717+k/4 SINGLE KEYPRESS: Exactly 256^(k%4)

***FIRST UNIT INDEX START (SHARED)***

0x59CCA8 19025

0x59CCAC 19026

0x59CCB0 19027 HEALTH POINTS: AtLeast 256*a, AtMost 256*a + 255

0x59CCB4 19028

0x59CCB8 19029

0x59CCBC 19030

0x59CCC0 19031

0x59CCC4 19032

0x59CCC8 19033

0x59CCCC 19034

0x59CCD0 19035 CURRENT COORDINATE: Exactly x + 65536*y

0x59CCD4 19036 CURRENT X COORDINATE: Exactly 256*x

0x59CCD8 19037 CURRENT Y COORDINATE: Exactly 256*y

0x59CCDC 19038

0x59CCE0 19039

0x59CCE4 19040

0x59CCE8 19041

0x59CCEC 19042

0x59CCF0 19043 DIRECTION: AtLeast 16777216*o, AtMost 16777216*o + 16777215

0x59CCF4 19044 PLAYER ID: (Only when unit is still) Exactly 768 + p

0x59CCF8 19045

0x59CCFC 19046 ATTACK COOLDOWN: AtLeast 65536*c

0x59CD00 19047 ORDER COORDINATE: Exactly x + 65536*y

0x59CD04 19048 TARGET ID: (Unit index pointer)

0x59CD08 19049 SHIELD POINTS: AtLeast 256*a, AtMost 256*a + 255

0x59CD0C 19050

0x59CD10 19051

0x59CD14 19052

0x59CD18 19053

0x59CD1C 19054

0x59CD20 19055

0x59CD24 19056

0x59CD28 19057

0x59CD2C 19058

0x59CD30 19059

0x59CD34 19060 KILL COUNT: AtLeast 16777216*a, AtMost 16777216*a + 16777215

0x59CD38 19061

0x59CD3C 19062

0x59CD40 19063

0x59CD44 19064

0x59CD48 19065 ENERGY POINTS: AtLeast 16777216*a, AtMost 16777216*a + 16777215

0x59CD4C 19066

0x59CD50 19067

0x59CD54 19068

0x59CD58 19069

0x59CD5C 19070

0x59CD60 19071

0x59CD64 19072

0x59CD68 19073

0x59CD6C 19074

0x59CD70 19075

0x59CD74 19076

0x59CD78 19077

0x59CD7C 19078

0x59CD80 19079

0x59CD84 19080

0x59CD88 19081

0x59CD8C 19082

0x59CD90 19083

0x59CD94 19084

0x59CD98 19085

0x59CD9C 19086

0x59CDA0 19087 RALLY COORDINATE: Exactly x + 65536*y

0x59CDA4 19088

0x59CDA8 19089

0x59CDAC 19090

0x59CDB0 19091

0x59CDB4 19092

0x59CDB8 19093 MATRIX DAMAGE ABSORPTION Exactly a*16777216

0x59CDBC 19094 MATRIX/STIM/ENSNARE/LOCKDOWN TIMER: Exactly a; Exactly 256*a; Exactly 65536*a; Exactly 16777216*a; (Detection) AtLeast 1; AtLeast 256; AtLeast 65536; AtLeast 16777216

0x59CDC0 19095

0x59CDC4 19096

0x59CDC8 19097 BLIND STATE: AtLeast 16777216

0x59CDCC 19098 MAELSTROM TIMER: Exactly a; (Detection) AtLeast 1

0x59CDD0 19099

0x59CDD4 19100

0x59CDD8 19101

0x59CDDC 19102

0x59CDE0 19103

0x59CDE4 19104

0x59CDE8 19105

0x59CDEC 19106

0x59CDF0 19107

0x59CDF4 19108

***FIRST UNIT INDEX END (SHARED)***

0x628438 161845 NEXT UNIT INDEX POINTER: (Unit index pointer)

0x628448 161849 SCREEN X COORDINATE: (Locked on an 8px grid) Exactly x

0x628470 161859 SCREEN Y COORDINATE: (Locked on an 8px grid) Exactly y

0x6284E8 161889+12*p+e SELECTED UNIT (SHARED): (Unit index pointer)

0x6CDDC4 331416 MOUSE X COORDINATE: (Relative to screen) Exactly x

0x6CDDC8 331417 MOUSE Y COORDINATE: (Relative to screen) Exactly y

0x6DE000 347943 DATA SEGMENT END

Converting to other unit indices:

u > 0: f + 142716 - 84*(u-1)

Unit index pointer:

u = 0: 5885096

u > 0: 6455960 - 336*(u-1)

Unit alpha ID:

u = 0: 2049

u > 0: 3748 - (u-1)

VARIABLES:

a: Generic

c: Cooldown

e: Unit entry

f: First unit index address

h: Hotkey

k: Virtual key code

o: Clockwise offset

p: Player ID

u: Unit index

x: X coordinate

y: Y coordinate

[ADDR BASE] [EP FORMULA] [DESC]: [CONDITION/ACTION FORMULA]

0x51C000 -112857 DATA SEGMENT START

0x57FE60 -10561+216*p+12*h+e HOTKEYED UNIT (SHARED): (Unit alpha ID)

0x58A364 0 DEATH TABLE START

0x58CE24 2736 DEATH TABLE END

0x5968AC 12626 LEFT CLICK: AtLeast 1

0x596A18 12717+k/4 SINGLE KEYPRESS: Exactly 256^(k%4)

***FIRST UNIT INDEX START (SHARED)***

0x59CCA8 19025

0x59CCAC 19026

0x59CCB0 19027 HEALTH POINTS: AtLeast 256*a, AtMost 256*a + 255

0x59CCB4 19028

0x59CCB8 19029

0x59CCBC 19030

0x59CCC0 19031

0x59CCC4 19032

0x59CCC8 19033

0x59CCCC 19034

0x59CCD0 19035 CURRENT COORDINATE: Exactly x + 65536*y

0x59CCD4 19036 CURRENT X COORDINATE: Exactly 256*x

0x59CCD8 19037 CURRENT Y COORDINATE: Exactly 256*y

0x59CCDC 19038

0x59CCE0 19039

0x59CCE4 19040

0x59CCE8 19041

0x59CCEC 19042

0x59CCF0 19043 DIRECTION: AtLeast 16777216*o, AtMost 16777216*o + 16777215

0x59CCF4 19044 PLAYER ID: (Only when unit is still) Exactly 768 + p

0x59CCF8 19045

0x59CCFC 19046 ATTACK COOLDOWN: AtLeast 65536*c

0x59CD00 19047 ORDER COORDINATE: Exactly x + 65536*y

0x59CD04 19048 TARGET ID: (Unit index pointer)

0x59CD08 19049 SHIELD POINTS: AtLeast 256*a, AtMost 256*a + 255

0x59CD0C 19050

0x59CD10 19051

0x59CD14 19052

0x59CD18 19053

0x59CD1C 19054

0x59CD20 19055

0x59CD24 19056

0x59CD28 19057

0x59CD2C 19058

0x59CD30 19059

0x59CD34 19060 KILL COUNT: AtLeast 16777216*a, AtMost 16777216*a + 16777215

0x59CD38 19061

0x59CD3C 19062

0x59CD40 19063

0x59CD44 19064

0x59CD48 19065 ENERGY POINTS: AtLeast 16777216*a, AtMost 16777216*a + 16777215

0x59CD4C 19066

0x59CD50 19067

0x59CD54 19068

0x59CD58 19069

0x59CD5C 19070

0x59CD60 19071

0x59CD64 19072

0x59CD68 19073

0x59CD6C 19074

0x59CD70 19075

0x59CD74 19076

0x59CD78 19077

0x59CD7C 19078

0x59CD80 19079

0x59CD84 19080

0x59CD88 19081

0x59CD8C 19082

0x59CD90 19083

0x59CD94 19084

0x59CD98 19085

0x59CD9C 19086

0x59CDA0 19087 RALLY COORDINATE: Exactly x + 65536*y

0x59CDA4 19088

0x59CDA8 19089

0x59CDAC 19090

0x59CDB0 19091

0x59CDB4 19092

0x59CDB8 19093 MATRIX DAMAGE ABSORPTION Exactly a*16777216

0x59CDBC 19094 MATRIX/STIM/ENSNARE/LOCKDOWN TIMER: Exactly a; Exactly 256*a; Exactly 65536*a; Exactly 16777216*a; (Detection) AtLeast 1; AtLeast 256; AtLeast 65536; AtLeast 16777216

0x59CDC0 19095

0x59CDC4 19096

0x59CDC8 19097 BLIND STATE: AtLeast 16777216

0x59CDCC 19098 MAELSTROM TIMER: Exactly a; (Detection) AtLeast 1

0x59CDD0 19099

0x59CDD4 19100

0x59CDD8 19101

0x59CDDC 19102

0x59CDE0 19103

0x59CDE4 19104

0x59CDE8 19105

0x59CDEC 19106

0x59CDF0 19107

0x59CDF4 19108

***FIRST UNIT INDEX END (SHARED)***

0x628438 161845 NEXT UNIT INDEX POINTER: (Unit index pointer)

0x628448 161849 SCREEN X COORDINATE: (Locked on an 8px grid) Exactly x

0x628470 161859 SCREEN Y COORDINATE: (Locked on an 8px grid) Exactly y

0x6284E8 161889+12*p+e SELECTED UNIT (SHARED): (Unit index pointer)

0x6CDDC4 331416 MOUSE X COORDINATE: (Relative to screen) Exactly x

0x6CDDC8 331417 MOUSE Y COORDINATE: (Relative to screen) Exactly y

0x6DE000 347943 DATA SEGMENT END

Converting to other unit indices:

u > 0: f + 142716 - 84*(u-1)

Unit index pointer:

u = 0: 5885096

u > 0: 6455960 - 336*(u-1)

Unit alpha ID:

u = 0: 2049

u > 0: 3748 - (u-1)

Post has been edited 19 time(s), last time on Oct 6 2011, 5:54 pm by yoonkwun.

None.