<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="39">
  <CheatEntries>
    <CheatEntry>
      <ID>56</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>57</ID>
          <Description>"GameMemory"</Description>
          <LastState Value="" RealAddress="0AB9D020"/>
          <GroupHeader>1</GroupHeader>
          <Address>GameMemoryStart</Address>
          <CheatEntries>
            <CheatEntry>
              <ID>67</ID>
              <Description>"Name"</Description>
              <LastState RealAddress="0AC01E08"/>
              <VariableType>String</VariableType>
              <Length>10</Length>
              <Unicode>0</Unicode>
              <CodePage>0</CodePage>
              <ZeroTerminate>1</ZeroTerminate>
              <Address>+64DE8</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>33</ID>
              <Description>"========= The Important Ones ========="</Description>
              <LastState Value="" RealAddress="00000000"/>
              <GroupHeader>1</GroupHeader>
            </CheatEntry>
            <CheatEntry>
              <ID>10</ID>
              <Description>"Current Health"</Description>
              <LastState Value="33" RealAddress="0AC1B487"/>
              <Color>0000FF</Color>
              <VariableType>Byte</VariableType>
              <Address>+7E467</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>68</ID>
              <Description>"Current Mana"</Description>
              <LastState Value="35" RealAddress="0AC01E3F"/>
              <Color>FF0000</Color>
              <VariableType>Byte</VariableType>
              <Address>+64E1F</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>34</ID>
              <Description>"========= Character Stats ========="</Description>
              <LastState Value="" RealAddress="00000000"/>
              <GroupHeader>1</GroupHeader>
            </CheatEntry>
            <CheatEntry>
              <ID>69</ID>
              <Description>"Strength"</Description>
              <LastState Value="17" RealAddress="0AC001A7"/>
              <VariableType>Byte</VariableType>
              <Address>+63187</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>11</ID>
              <Description>"Dexterity"</Description>
              <LastState Value="17" RealAddress="0AC001A8"/>
              <VariableType>Byte</VariableType>
              <Address>+63188</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>12</ID>
              <Description>"Intelligence"</Description>
              <LastState Value="26" RealAddress="0AC001A9"/>
              <VariableType>Byte</VariableType>
              <Address>+63189</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>35</ID>
              <Description>"========= Skills ========="</Description>
              <LastState Value="" RealAddress="00000000"/>
              <GroupHeader>1</GroupHeader>
            </CheatEntry>
            <CheatEntry>
              <ID>13</ID>
              <Description>"Attack"</Description>
              <LastState Value="10" RealAddress="0AC01E29"/>
              <VariableType>Byte</VariableType>
              <Address>+64E09</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>14</ID>
              <Description>"Defense"</Description>
              <LastState Value="10" RealAddress="0AC01E2A"/>
              <VariableType>Byte</VariableType>
              <Address>+64E0A</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>15</ID>
              <Description>"Unarmed"</Description>
              <LastState Value="10" RealAddress="0AC01E2B"/>
              <VariableType>Byte</VariableType>
              <Address>+64E0B</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>16</ID>
              <Description>"Sword"</Description>
              <LastState Value="10" RealAddress="0AC01E2C"/>
              <VariableType>Byte</VariableType>
              <Address>+64E0C</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>17</ID>
              <Description>"Axe"</Description>
              <LastState Value="10" RealAddress="0AC01E2D"/>
              <VariableType>Byte</VariableType>
              <Address>+64E0D</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>70</ID>
              <Description>"Mace"</Description>
              <LastState Value="10" RealAddress="0AC01E2E"/>
              <VariableType>Byte</VariableType>
              <Address>+64E0E</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>19</ID>
              <Description>"Missile"</Description>
              <LastState Value="10" RealAddress="0AC01E2F"/>
              <VariableType>Byte</VariableType>
              <Address>+64E0F</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>20</ID>
              <Description>"Mana"</Description>
              <LastState Value="10" RealAddress="0AC01E30"/>
              <VariableType>Byte</VariableType>
              <Address>+64E10</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>21</ID>
              <Description>"Lore"</Description>
              <LastState Value="10" RealAddress="0AC01E31"/>
              <VariableType>Byte</VariableType>
              <Address>+64E11</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>22</ID>
              <Description>"Casting"</Description>
              <LastState Value="10" RealAddress="0AC01E32"/>
              <VariableType>Byte</VariableType>
              <Address>+64E12</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>23</ID>
              <Description>"Traps"</Description>
              <LastState Value="10" RealAddress="0AC01E33"/>
              <VariableType>Byte</VariableType>
              <Address>+64E13</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>24</ID>
              <Description>"Search"</Description>
              <LastState Value="10" RealAddress="0AC01E34"/>
              <VariableType>Byte</VariableType>
              <Address>+64E14</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>25</ID>
              <Description>"Track"</Description>
              <LastState Value="10" RealAddress="0AC01E35"/>
              <VariableType>Byte</VariableType>
              <Address>+64E15</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>26</ID>
              <Description>"Sneak"</Description>
              <LastState Value="10" RealAddress="0AC01E36"/>
              <VariableType>Byte</VariableType>
              <Address>+64E16</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>27</ID>
              <Description>"Repair"</Description>
              <LastState Value="10" RealAddress="0AC01E37"/>
              <VariableType>Byte</VariableType>
              <Address>+64E17</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>28</ID>
              <Description>"Charm"</Description>
              <LastState Value="10" RealAddress="0AC01E38"/>
              <VariableType>Byte</VariableType>
              <Address>+64E18</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>29</ID>
              <Description>"Picklock"</Description>
              <LastState Value="10" RealAddress="0AC01E39"/>
              <VariableType>Byte</VariableType>
              <Address>+64E19</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>30</ID>
              <Description>"Acrobat"</Description>
              <LastState Value="10" RealAddress="0AC01E3A"/>
              <VariableType>Byte</VariableType>
              <Address>+64E1A</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>31</ID>
              <Description>"Appraise"</Description>
              <LastState Value="10" RealAddress="0AC01E3B"/>
              <VariableType>Byte</VariableType>
              <Address>+64E1B</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>32</ID>
              <Description>"Swimming"</Description>
              <LastState Value="10" RealAddress="0AC01E3C"/>
              <VariableType>Byte</VariableType>
              <Address>+64E1C</Address>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols>
    <SymbolEntry>
      <Name>GameMemoryStart</Name>
      <Address>AB9D020</Address>
    </SymbolEntry>
    <SymbolEntry>
      <Name>VideoMemory</Name>
      <Address>BBAF020</Address>
    </SymbolEntry>
    <SymbolEntry>
      <Name>GameOtherMemoryStart</Name>
      <Address>BDCC020</Address>
    </SymbolEntry>
  </UserdefinedSymbols>
</CheatTable>
