/
cycle player addresses - step 9 - PW 31337157.CT
160 lines (160 loc) · 6.58 KB
/
cycle player addresses - step 9 - PW 31337157.CT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="26">
<CheatEntries>
<CheatEntry>
<ID>2</ID>
<Description>"Player Base"</Description>
<LastState Value="005AA550" RealAddress="08500080"/>
<ShowAsHex>1</ShowAsHex>
<VariableType>4 Bytes</VariableType>
<Address>"Tutorial-i386.exe"+1FD670</Address>
<Offsets>
<Offset>0</Offset>
<Offset>4D4</Offset>
</Offsets>
<CheatEntries>
<CheatEntry>
<ID>4</ID>
<Description>"Health (offsets come from struct created in Dissect Data/Structures)"</Description>
<LastState Value="500" RealAddress="08500084"/>
<VariableType>Float</VariableType>
<Address>+PlayerStruct.Health</Address>
</CheatEntry>
<CheatEntry>
<ID>6</ID>
<Description>"Name"</Description>
<LastState RealAddress="08500095"/>
<VariableType>String</VariableType>
<Length>10</Length>
<Unicode>0</Unicode>
<CodePage>0</CodePage>
<ZeroTerminate>1</ZeroTerminate>
<Address>+PlayerStruct.Name</Address>
</CheatEntry>
</CheatEntries>
</CheatEntry>
<CheatEntry>
<ID>7</ID>
<Description>"Next Player"</Description>
<LastState Activated="1"/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>// lua code runs before any asm, but this is all lua so :)
// having it before both sections causes it to run for both
{$lua}
local mr = getAddressList().getMemoryRecordByDescription('Player Base')
local OffsetDiff = 4 -- probably just the size of a pointer 4 in 32bit 8 in 64 but...
-- could be different for some reason
local firstPlayerOffset = 0x4CC
local lastPlayerOffset = firstPlayerOffset+OffsetDiff*3
local OffsetIndex = 1
mr.Offset[OffsetIndex] = mr.Offset[OffsetIndex]+OffsetDiff
if mr.Offset[OffsetIndex] > lastPlayerOffset then mr.Offset[OffsetIndex] = firstPlayerOffset end
{$asm}
[ENABLE]
[DISABLE]
</AssemblerScript>
<Hotkeys>
<Hotkey>
<Action>Toggle Activation</Action>
<Keys>
<Key>39</Key>
</Keys>
<ID>0</ID>
</Hotkey>
</Hotkeys>
</CheatEntry>
<CheatEntry>
<ID>8</ID>
<Description>"Prev Player"</Description>
<LastState/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>// lua code runs before any asm, but this is all lua so :)
// having it before both sections causes it to run for both
{$lua}
local mr = getAddressList().getMemoryRecordByDescription('Player Base')
local OffsetDiff = 4 -- probably just the size of a pointer 4 in 32bit 8 in 64 but...
-- could be different for some reason
local firstPlayerOffset = 0x4CC
local lastPlayerOffset = firstPlayerOffset+OffsetDiff*3
local OffsetIndex = 1
mr.Offset[OffsetIndex] = mr.Offset[OffsetIndex] - OffsetDiff
if mr.Offset[OffsetIndex] < firstPlayerOffset then mr.Offset[OffsetIndex] = lastPlayerOffset end
{$asm}
[ENABLE]
[DISABLE]
</AssemblerScript>
<Hotkeys>
<Hotkey>
<Action>Toggle Activation</Action>
<Keys>
<Key>37</Key>
</Keys>
<ID>0</ID>
</Hotkey>
</Hotkeys>
</CheatEntry>
<CheatEntry>
<ID>9</ID>
<Description>"Player Base - example of struct abuse for player specific offsets"</Description>
<LastState Value="005AA550" RealAddress="08500080"/>
<ShowAsHex>1</ShowAsHex>
<VariableType>4 Bytes</VariableType>
<Address>"Tutorial-i386.exe"+1FD670</Address>
<Offsets>
<Offset>0</Offset>
<Offset>players.Hal</Offset>
</Offsets>
<CheatEntries>
<CheatEntry>
<ID>10</ID>
<Description>"Health (offsets come from struct created in Dissect Data/Structures)"</Description>
<LastState Value="500" RealAddress="08500084"/>
<VariableType>Float</VariableType>
<Address>+PlayerStruct.Health</Address>
</CheatEntry>
<CheatEntry>
<ID>11</ID>
<Description>"Name"</Description>
<LastState RealAddress="08500095"/>
<VariableType>String</VariableType>
<Length>10</Length>
<Unicode>0</Unicode>
<CodePage>0</CodePage>
<ZeroTerminate>1</ZeroTerminate>
<Address>+PlayerStruct.Name</Address>
</CheatEntry>
</CheatEntries>
</CheatEntry>
<CheatEntry>
<ID>12</ID>
<Description>"31337157"</Description>
<LastState Value="" RealAddress="00000000"/>
<GroupHeader>1</GroupHeader>
</CheatEntry>
</CheatEntries>
<UserdefinedSymbols/>
<Structures StructVersion="2">
<Structure Name="PlayerStruct" AutoFill="0" AutoCreate="1" DefaultHex="0" AutoDestroy="0" DoNotSaveLocal="0" RLECompression="1" AutoCreateStructsize="4096">
<Elements>
<Element Offset="0" Vartype="Pointer" Bytesize="4" DisplayMethod="Unsigned Integer"/>
<Element Offset="4" Vartype="Float" Bytesize="4" Description="Health" DisplayMethod="Unsigned Integer"/>
<Element Offset="8" Vartype="4 Bytes" Bytesize="4" DisplayMethod="Unsigned Integer"/>
<Element Offset="12" Vartype="4 Bytes" Bytesize="4" DisplayMethod="Hexadecimal"/>
<Element Offset="16" Vartype="4 Bytes" Bytesize="4" Description="TeamID" DisplayMethod="Unsigned Integer"/>
<Element Offset="20" Vartype="Byte" Bytesize="1" Description="NameLength" DisplayMethod="Unsigned Integer"/>
<Element Offset="21" Vartype="String" Bytesize="5" Description="Name" DisplayMethod="Unsigned Integer"/>
<Element Offset="26" Vartype="Byte" Bytesize="1" RLECount="2" DisplayMethod="Unsigned Integer"/>
<Element Offset="28" Vartype="4 Bytes" Bytesize="4" RLECount="14" DisplayMethod="Unsigned Integer"/>
<Element Offset="84" Vartype="Pointer" Bytesize="4" Description="NextTeamPlayer" DisplayMethod="Unsigned Integer"/>
</Elements>
</Structure>
<Structure Name="players" AutoFill="0" AutoCreate="1" DefaultHex="0" AutoDestroy="0" DoNotSaveLocal="0" RLECompression="1" AutoCreateStructsize="4096">
<Elements>
<Element Offset="1228" Vartype="4 Bytes" Bytesize="4" Description="Dave" DisplayMethod="Unsigned Integer"/>
<Element Offset="1232" Vartype="4 Bytes" Bytesize="4" Description="Eric" DisplayMethod="Unsigned Integer"/>
<Element Offset="1236" Vartype="4 Bytes" Bytesize="4" Description="Hal" DisplayMethod="Unsigned Integer"/>
<Element Offset="1240" Vartype="4 Bytes" Bytesize="4" Description="Kitt" DisplayMethod="Unsigned Integer"/>
</Elements>
</Structure>
</Structures>
</CheatTable>