<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="39">
  <CheatEntries>
    <CheatEntry>
      <ID>58</ID>
      <Description>"Automatic Memory Address Finder by mgr.inz.Player"</Description>
      <LastState Activated="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{
  Source: https://fearlessrevolution.com/viewtopic.php?f=11&amp;t=7264&amp;p=129713#p129522

  mgr.inz.Player has been so kind to provide us with a lua script which
  automatiscally finds the correct addresses for DOSBox.
  The great thing is, that our tables are auto-adapting to new versions
  using this great script.
}

[ENABLE]
{$Lua}
if syntaxcheck then return end

for i,v in ipairs(enumMemoryRegions()) do
  if v.RegionSize==0x1001000 and v.AllocationProtect==4 then
    unregisterSymbol('GameMemoryStart') registerSymbol('GameMemoryStart',v.BaseAddress+0x20)
  end
  if v.RegionSize==0x201000 and v.AllocationProtect==4 then
    unregisterSymbol('VideoMemory') registerSymbol('VideoMemory',v.BaseAddress+0x20)
  end
  if v.RegionSize==0x402000 and v.AllocationProtect==4 then
    unregisterSymbol('GameOtherMemoryStart') registerSymbol('GameOtherMemoryStart',v.BaseAddress+0x20)
  end
end
{$Asm}

[DISABLE]
{$Lua}
unregisterSymbol('GameMemoryStart')
unregisterSymbol('VideoMemory')
unregisterSymbol('GameOtherMemoryStart')
{$Asm}

</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>59</ID>
          <Description>"GameMemory"</Description>
          <LastState Value="" RealAddress="0AB6A020"/>
          <GroupHeader>1</GroupHeader>
          <Address>GameMemoryStart</Address>
          <CheatEntries>
            <CheatEntry>
              <ID>4</ID>
              <Description>"Name"</Description>
              <LastState RealAddress="0ABDB1F4"/>
              <ShowAsSigned>0</ShowAsSigned>
              <VariableType>String</VariableType>
              <Length>10</Length>
              <Unicode>0</Unicode>
              <CodePage>0</CodePage>
              <ZeroTerminate>1</ZeroTerminate>
              <Address>+711d4</Address>
              <CheatEntries>
                <CheatEntry>
                  <ID>10</ID>
                  <Description>"Current Health"</Description>
                  <LastState Value="35" RealAddress="0ABDB229"/>
                  <Color>0000FF</Color>
                  <VariableType>Byte</VariableType>
                  <Address>+35</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>6</ID>
                  <Description>"Normal Health"</Description>
                  <LastState Value="35" RealAddress="0ABDB22A"/>
                  <VariableType>Byte</VariableType>
                  <Address>+36</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>8</ID>
                  <Description>"Current Mana"</Description>
                  <LastState Value="1" RealAddress="0ABDB22B"/>
                  <Color>FF0000</Color>
                  <VariableType>Byte</VariableType>
                  <Address>+37</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>7</ID>
                  <Description>"Normal Mana"</Description>
                  <LastState Value="1" RealAddress="0ABDB22C"/>
                  <VariableType>Byte</VariableType>
                  <Address>+38</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>5</ID>
                  <Description>"Strength"</Description>
                  <LastState Value="25" RealAddress="0ABDB212"/>
                  <VariableType>Byte</VariableType>
                  <Address>+1e</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>11</ID>
                  <Description>"Dexterity"</Description>
                  <LastState Value="21" RealAddress="0ABDB213"/>
                  <VariableType>Byte</VariableType>
                  <Address>+1f</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>12</ID>
                  <Description>"Intelligence"</Description>
                  <LastState Value="14" RealAddress="0ABDB214"/>
                  <VariableType>Byte</VariableType>
                  <Address>+20</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>13</ID>
                  <Description>"Attack"</Description>
                  <LastState Value="10" RealAddress="0ABDB215"/>
                  <VariableType>Byte</VariableType>
                  <Address>+21</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>14</ID>
                  <Description>"Defense"</Description>
                  <LastState Value="6" RealAddress="0ABDB216"/>
                  <VariableType>Byte</VariableType>
                  <Address>+22</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>15</ID>
                  <Description>"Unarmed"</Description>
                  <LastState Value="0" RealAddress="0ABDB217"/>
                  <VariableType>Byte</VariableType>
                  <Address>+23</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>16</ID>
                  <Description>"Sword"</Description>
                  <LastState Value="7" RealAddress="0ABDB218"/>
                  <VariableType>Byte</VariableType>
                  <Address>+24</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>17</ID>
                  <Description>"Axe"</Description>
                  <LastState Value="0" RealAddress="0ABDB219"/>
                  <VariableType>Byte</VariableType>
                  <Address>+25</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>18</ID>
                  <Description>"Mace"</Description>
                  <LastState Value="0" RealAddress="0ABDB21A"/>
                  <VariableType>Byte</VariableType>
                  <Address>+26</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>19</ID>
                  <Description>"Missile"</Description>
                  <LastState Value="0" RealAddress="0ABDB21B"/>
                  <VariableType>Byte</VariableType>
                  <Address>+27</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>20</ID>
                  <Description>"Mana"</Description>
                  <LastState Value="0" RealAddress="0ABDB21C"/>
                  <VariableType>Byte</VariableType>
                  <Address>+28</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>21</ID>
                  <Description>"Lore"</Description>
                  <LastState Value="0" RealAddress="0ABDB21D"/>
                  <VariableType>Byte</VariableType>
                  <Address>+29</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>22</ID>
                  <Description>"Casting"</Description>
                  <LastState Value="0" RealAddress="0ABDB21E"/>
                  <VariableType>Byte</VariableType>
                  <Address>+2a</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>23</ID>
                  <Description>"Traps"</Description>
                  <LastState Value="8" RealAddress="0ABDB21F"/>
                  <VariableType>Byte</VariableType>
                  <Address>+2b</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>24</ID>
                  <Description>"Search"</Description>
                  <LastState Value="0" RealAddress="0ABDB220"/>
                  <VariableType>Byte</VariableType>
                  <Address>+2c</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>25</ID>
                  <Description>"Track"</Description>
                  <LastState Value="0" RealAddress="0ABDB221"/>
                  <VariableType>Byte</VariableType>
                  <Address>+2d</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>26</ID>
                  <Description>"Sneak"</Description>
                  <LastState Value="0" RealAddress="0ABDB222"/>
                  <VariableType>Byte</VariableType>
                  <Address>+2e</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>27</ID>
                  <Description>"Repair"</Description>
                  <LastState Value="9" RealAddress="0ABDB223"/>
                  <VariableType>Byte</VariableType>
                  <Address>+2f</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>28</ID>
                  <Description>"Charm"</Description>
                  <LastState Value="0" RealAddress="0ABDB224"/>
                  <VariableType>Byte</VariableType>
                  <Address>+30</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>29</ID>
                  <Description>"Picklock"</Description>
                  <LastState Value="0" RealAddress="0ABDB225"/>
                  <VariableType>Byte</VariableType>
                  <Address>+31</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>30</ID>
                  <Description>"Acrobat"</Description>
                  <LastState Value="0" RealAddress="0ABDB226"/>
                  <VariableType>Byte</VariableType>
                  <Address>+32</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>31</ID>
                  <Description>"Appraise"</Description>
                  <LastState Value="0" RealAddress="0ABDB227"/>
                  <VariableType>Byte</VariableType>
                  <Address>+33</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>32</ID>
                  <Description>"Swimming"</Description>
                  <LastState Value="0" RealAddress="0ABDB228"/>
                  <VariableType>Byte</VariableType>
                  <Address>+34</Address>
                </CheatEntry>
              </CheatEntries>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols>
    <SymbolEntry>
      <Name>GameMemoryStart</Name>
      <Address>AB6A020</Address>
    </SymbolEntry>
    <SymbolEntry>
      <Name>VideoMemory</Name>
      <Address>BB79020</Address>
    </SymbolEntry>
    <SymbolEntry>
      <Name>GameOtherMemoryStart</Name>
      <Address>BD8B020</Address>
    </SymbolEntry>
  </UserdefinedSymbols>
</CheatTable>
