<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="17">
  <CheatEntries>
    <CheatEntry>
      <ID>0</ID>
      <Description>"Replace 11 11 11 11 by 22 22 22 22"</Description>
      <LastState Activated="0"/>
      <Color>80000008</Color>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
luacall(AOBSwap('11 11 11 11', '22 22 22 22'))
 
[DISABLE]
</AssemblerScript>
    </CheatEntry>
  </CheatEntries>
  <LuaScript>--made by mgr.inz.Player, http://forum.cheatengine.org/viewtopic.php?p=5524847
function AOBSwap(aobIn,aobOut)
  aobOut = aobOut:gsub('[^%w]','') -- remove all spaces

  local _aobOut=''
  for i=1,#aobOut,2 do
   _aobOut = _aobOut..aobOut:sub(i,i+1)..' '  -- add spaces (only the needed ones)
  end

  local address = 0

  --AOBScan("aobstring", protectionflags OPTIONAL, alignmenttype OPTIONAL, alignmentparam HALFOPTIONAL)


  local aobs = AOBScan(aobIn, '+W*X-C') -- consult main.lua for the meaning of '+W*X-C'
  if(aobs ~= nil) then
    for i = 0,aobs.Count-1 do
      address = aobs.String[i]
      autoAssemble(address..[[:
                   db ]].._aobOut)
    end
    aobs.destroy()
  end
end
</LuaScript>
</CheatTable>
