<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="42">
  <CheatEntries>
    <CheatEntry>
      <ID>2</ID>
      <Description>"Locate Player Values (Enable and Disable every time stage starts)"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
//aobscan(PlayerBaseAddress,F0 B8 0F 33 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40) // should be unique
aobscan(PlayerBaseAddress,F0 B8 0F 33 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * FF 00 00 00)
registersymbol(PlayerBaseAddress)

[DISABLE]
unregistersymbol(PlayerBaseAddress)
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>6</ID>
          <Description>"Health"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>4 Bytes</VariableType>
          <Address>"PlayerBaseAddress"+A0</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>5</ID>
          <Description>"Armor"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>4 Bytes</VariableType>
          <Address>"PlayerBaseAddress"+A4</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>7</ID>
          <Description>"Ammo"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>4 Bytes</VariableType>
          <Address>"PlayerBaseAddress"+A8</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>8</ID>
          <Description>"Clip"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>4 Bytes</VariableType>
          <Address>"PlayerBaseAddress"+AC</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>9</ID>
          <Description>"Grenades"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>4 Bytes</VariableType>
          <Address>"PlayerBaseAddress"+B0</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>10</ID>
          <Description>"Stamina"</Description>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>Float</VariableType>
          <Address>"PlayerBaseAddress"+14C</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>11</ID>
          <Description>"DEBUG - PlayerBaseAddress"</Description>
          <ShowAsHex>1</ShowAsHex>
          <ShowAsSigned>0</ShowAsSigned>
          <VariableType>4 Bytes</VariableType>
          <Address>"PlayerBaseAddress"</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>14</ID>
      <Description>"Set All Mob HP to Zero"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$lua}
--Scan for static vtable pointer address
local scan = createMemScan(true);
scan.setOnlyOneResult(false);
scan.firstScan(soExactValue,vtDword,nil,"856668400",nil,0,0xffffffffffffffff,"+W-C",fsmNotAligned,nil,false,false,false,false);
scan.waitTillDone();

--Fetch result list
local FoundList=createFoundList(scan);
FoundList.initialize();

--Iterate through list of found addresses
for i=0,FoundList.Count-1 do
  local baseAddress = FoundList.Address[i]
  local healthAddress = tonumber(baseAddress,16)+160
  local typeValue = readInteger(tonumber(baseAddress,16)+224)

  --Do not kill Player or Val
  if typeValue == 255 then
     goto continue
  end

  --Set Trash mob HP to zero
  writeInteger(healthAddress,0)
  ::continue::
end

[DISABLE]
</AssemblerScript>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols/>
</CheatTable>
