function replaceAOB() r=AOBScan("d0 4f ?? 61 ?? ?? d0") if (r~=nil) then c=strings_getCount(r) if (c>0) then resultlist=nil resultlist={} for i=0,c-1 do a=strings_getString(r,i); resultlist[i+1]={} resultlist[i+1][1]=a resultlist[i+1][2]=readBytes(a, 15, true) end end end end function restoreAOB() for i=1,#resultlist do local a=tonumber("0x"..resultlist[i][1]) local orig=resultlist[i][2]; for j=0,15 do writeBytes(a+j,orig[j]) end end end function activatetick(mr, before, currentstate) if (before==false) and (currentstate==true) then replaceAOB() end return true end function deactivatetick(mr, before, currentstate) if (before==false) and (currentstate==false) then restoreAOB() end return true end al=getAddressList() mr=addresslist_getMemoryRecordByDescription(al,"bla3") memoryrecord_onActivate(mr,activatetick) memoryrecord_onDeactivate(mr,deactivatetick)