Cheat Engine simple script for attach process
Started by nirvada




0 posts in this topic
nirvada
Member


0
1 posts 1 threads Joined: Aug 2024
Thumbs Up  08-15-2024, 04:29 AM -
#1
Code:
<?xml version="1.0" encoding="utf-8"?>
<CheatTable>
  <CheatEntries>
    <CheatEntry>
      <ID>0</ID>
      <Description>"&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; ATTACH PROCESS"</Description>
      <LastState Activated="1"/>
      <Color>C08080</Color>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{$lua}
function checkProcessList()
    slStringList=createStringlist()
    processList=createStringlist()
    slHexList=createStringlist()
    getProcesslist(processList)
    slStringID=strings_getCount(processList)
    for y=0,slStringID-1 do
       slHexID=nil
       slStringID=strings_getString(processList, y)
       slHexID=string.find(slStringID, "rpcs3")
       if slHexID~=nil then strings_add(slStringList, slStringID); end
    end
    slStringID=strings_getCount(slStringList)
    if slStringID&lt;1 then
       print("Failed to detect RPCS3 process.")
    else
       if slStringID&gt;1 then
        print("Warning: you had more than one RPCS3 process opened, attaching to the first one.")
       end
       for y=0,slStringID-1 do
           slHexID=nil
           slStringID=strings_getString(slStringList, y)
           slHexID=string.sub(slStringID, string.find(slStringID, "%x%x%x%x%x%x%x%x"))
           if slHexID~=nil then  strings_add(slHexList, slHexID); end
           slHexID=strings_getCount(slHexList)
       end
       Mooo=strings_getString(slHexList, 0)
       Moo=tonumber(Mooo,16)
    end
end

function attach()
    checkProcessList()
    openProcess(Moo)
    -- Additional Cheat Engine modifications
    MainForm.FromAddress.Text = '300000000'
    MainForm.ToAddress.Text = '301FFFFFF'
end
{$asm}
luaCall(attach())
[ENABLE]
[DISABLE]



</AssemblerScript>
    </CheatEntry>
  </CheatEntries>
</CheatTable>

1st one just past onto cheat engine
2nd one need to open memory view and press CTRL+A to open Auto assemble paste that code and click file then Assign to current cheat table

Code:
{$lua}
function checkProcessList()
    slStringList=createStringlist()
    processList=createStringlist()
    slHexList=createStringlist()
    getProcesslist(processList)
    slStringID=strings_getCount(processList)
    for y=0,slStringID-1 do
       slHexID=nil
       slStringID=strings_getString(processList, y)
       slHexID=string.find(slStringID, "rpcs3")
       if slHexID~=nil then strings_add(slStringList, slStringID); end
    end
    slStringID=strings_getCount(slStringList)
    if slStringID<1 then
       print("Failed to detect RPCS3 process.")
    else
       if slStringID>1 then
        print("Warning: you had more than one RPCS3 process opened, attaching to the first one.")
       end
       for y=0,slStringID-1 do
           slHexID=nil
           slStringID=strings_getString(slStringList, y)
           slHexID=string.sub(slStringID, string.find(slStringID, "%x%x%x%x%x%x%x%x"))
           if slHexID~=nil then  strings_add(slHexList, slHexID); end
           slHexID=strings_getCount(slHexList)
       end
       Mooo=strings_getString(slHexList, 0)
       Moo=tonumber(Mooo,16)
    end
end

function attach()
    checkProcessList()
    openProcess(Moo)
    -- Additional Cheat Engine modifications
    MainForm.FromAddress.Text = '300000000'
    MainForm.ToAddress.Text = '301FFFFFF'
end
{$asm}
luaCall(attach())
[ENABLE]
[DISABLE]

   


Forum Jump:


Users browsing this thread: 1 Guest(s)