Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Unable to toggle the script on and off

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
The7uphero
How do I cheat?
Reputation: 0

Joined: 05 Dec 2021
Posts: 3

PostPosted: Sun Dec 05, 2021 1:06 am    Post subject: Unable to toggle the script on and off Reply with quote

Hello!
I am unable to toggle the cheats on or off when playing the game.
The option that i want to toggle has 2 question marks "??" under the value tab.
Please help me

Game - Assassin's Creed Odyssey
Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 82

Joined: 14 Jul 2007
Posts: 2870

PostPosted: Sun Dec 05, 2021 6:56 am    Post subject: Reply with quote

Two question marks means that a pointer is broken so CE can't get the address.
So, you are trying to toggle something that's broken.
Back to top
View user's profile Send private message
The7uphero
How do I cheat?
Reputation: 0

Joined: 05 Dec 2021
Posts: 3

PostPosted: Sun Dec 05, 2021 9:06 am    Post subject: Unable to toggle the script on and off Reply with quote

UH, so could you please help me fix the file?
Any help would be really appreciated
I have attached the code below:

Code:
<?xml version="1.0" encoding="utf-8"?>
<CheatTable>
  <CheatEntries>
    <CheatEntry>
      <ID>24110</ID>
      <Description>"[Enable] InventoryList Enumerator {lua}"</Description>
      <Options moHideChildren="1" moDeactivateChildrenAsWell="1"/>
      <LastState/>
      <Color>0000FF</Color>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
aobscanmodule(INJECT_getinv,ACOdyssey.exe,41 C1 EF 11 41 C1 E7 05 4C 03 FB 49 3B DF 0F)
alloc(newmem_getinv,0x1000)

label(code_getinv)
label(return_getinv)
registersymbol(INJECT_getinv)
registersymbol(InvStart)
registersymbol(InvEnd)

newmem_getinv:

  code_getinv:
    shr r15d,11
    shl r15d,05
    add r15,rbx
    cmp rbx,r15
  //inject
    je @f
      mov [InvStart], rbx
      mov [InvEnd], r15
//10 20 8 10
//000001506FB5C137 Ancient Tablets
//00000150408F900F Iron Metal
//00000150408F9013 Obsidian Glass
//00000150408F7320 Olive Wood
//000001994CED835F ??? (multiple objects)
//000001506FB5C133 Precious Gems
//000001506FB5C135 Soft Leather
//0000001BFDB9F655 Drachmae

    @@:
      jmp return_getinv
      align 10 CC

InvStart:
 dq baadf00d
 align 10 CC

InvEnd:
 dq baadf00d
 align 10 CC

INJECT_getinv:
  jmp far newmem_getinv //#14 bytes
  return_getinv:

{$lua}
if not syntaxcheck then
  memrec.color = 0x008000;
  --global
  tablets    = nil; metal = nil;
  glass      = nil; wood = nil;
  gems       = nil; leather = nil;
  money      = nil; bearfur = nil;
  spartanseal= nil; athenianseal=nil;
end;
{$asm}

[DISABLE]
INJECT_getinv:
  db 41 C1 EF 11 41 C1 E7 05 4C 03 FB 49 3B DF

unregistersymbol(INJECT_getinv)
unregistersymbol(InvStart)
unregistersymbol(InvEnd)

dealloc(newmem_getinv)

{$lua}
memrec.color = 0x0000ff
{$asm}

{
// ORIGINAL CODE - INJECTION POINT: "ACOdyssey.exe"+24AC319

"ACOdyssey.exe"+24AC2FF: CC                          -  int 3
"ACOdyssey.exe"+24AC300: 40 53                       -  push rbx
"ACOdyssey.exe"+24AC302: 41 54                       -  push r12
"ACOdyssey.exe"+24AC304: 41 55                       -  push r13
"ACOdyssey.exe"+24AC306: 41 57                       -  push r15
"ACOdyssey.exe"+24AC308: 48 83 EC 28                 -  sub rsp,28
"ACOdyssey.exe"+24AC30C: 44 8B 79 08                 -  mov r15d,[rcx+08]
"ACOdyssey.exe"+24AC310: 4D 8B E0                    -  mov r12,r8
"ACOdyssey.exe"+24AC313: 48 8B 19                    -  mov rbx,[rcx]
"ACOdyssey.exe"+24AC316: 4C 8B EA                    -  mov r13,rdx
// ---------- INJECTING HERE ----------
"ACOdyssey.exe"+24AC319: 41 C1 EF 11                 -  shr r15d,11
"ACOdyssey.exe"+24AC31D: 41 C1 E7 05                 -  shl r15d,05
"ACOdyssey.exe"+24AC321: 4C 03 FB                    -  add r15,rbx
"ACOdyssey.exe"+24AC324: 49 3B DF                    -  cmp rbx,r15
// ---------- DONE INJECTING  ----------
"ACOdyssey.exe"+24AC327: 0F 84 0C 01 00 00           -  je ACOdyssey.exe+24AC439
"ACOdyssey.exe"+24AC32D: 65 48 8B 04 25 58 00 00 00  -  mov rax,gs:[00000058]
"ACOdyssey.exe"+24AC336: 8B 0D 0C 7E A8 03           -  mov ecx,[ACOdyssey.exe+5F34148]
"ACOdyssey.exe"+24AC33C: 48 89 74 24 58              -  mov [rsp+58],rsi
"ACOdyssey.exe"+24AC341: 48 89 7C 24 60              -  mov [rsp+60],rdi
"ACOdyssey.exe"+24AC346: 4C 89 74 24 20              -  mov [rsp+20],r14
"ACOdyssey.exe"+24AC34B: 4C 8B 34 C8                 -  mov r14,[rax+rcx*8]
"ACOdyssey.exe"+24AC34F: B8 E0 2C 00 00              -  mov eax,00002CE0
}
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>24128</ID>
          <Description>"==Re-open ACOD Inventory to refresh values"</Description>
          <LastState Value="" RealAddress="00000000"/>
          <Color>FF0000</Color>
          <GroupHeader>1</GroupHeader>
        </CheatEntry>
        <CheatEntry>
          <ID>24111</ID>
          <Description>"pInventoryStart"</Description>
          <ShowAsHex>1</ShowAsHex>
          <Color>C0C0C0</Color>
          <VariableType>8 Bytes</VariableType>
          <Address>InvStart</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>24112</ID>
          <Description>"pInventoryEnd"</Description>
          <ShowAsHex>1</ShowAsHex>
          <Color>C0C0C0</Color>
          <VariableType>8 Bytes</VariableType>
          <Address>InvEnd</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>24118</ID>
          <Description>"[Enable] toggle to refresh the list"</Description>
          <Options moHideChildren="1" moDeactivateChildrenAsWell="1"/>
          <LastState/>
          <Color>0000FF</Color>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if not syntaxcheck then
  ------------------------------------
  erase = "no"  -- "yes" or "no"
  hash_to_wipe = 0x00000151B972C5CF
  ------------------------------------
--global
  tablets    = nil; metal = nil;
  glass      = nil; wood = nil;
  gems       = nil; leather = nil;
  money      = nil; bearfur = nil;
  spartanseal= nil; athenianseal=nil;
  artfragment= nil

  local s, s1, s2, s3, s4, s5, s6
  local cReplaced, cFound;
  local startaddr = readQword( GetAddress("InvStart") )
  local endaddr = readQword( GetAddress("InvEnd") )

  cReplaced = 0; cFound = 0;

  print("pInventoryListSlot\tpSlotSettings\tpItem\thash\tcount\tCategory\tSubCategory")
  for p = startaddr, endaddr-0x20, 0x20 do

    s1 = readQword(p+0x10) or 0;
    s2 = readQword(s1+0x38) or 0; --TODO: fix
    s3 = readQword(s2+0x10) or 0; --hash
    s4 = readInteger(p) or -1;    --count

    t1 = readQword(s2) or 0 ;  t2 = readQword(t1+0x28) or 0;
    t3 = readQword(t2) or 0;  t4 = readQword(t3+0x10) or 0;
    s5 = readString(t4) or "0";  --CategoryStr  --0 28 0 10 0
    s5 = s5:gsub("\n", ""); s5 = s5:gsub("\r", ""); s5 = s5:gsub("\t", "")

    t1 = readQword(s2) or 0 ;  t2 = readQword(t1+0x30) or 0;
    t3 = readQword(t2) or 0;  t4 = readQword(t3+0x00) or 0;
    t5 = readQword(t4+0x10) or 0;
    s6 = readString(t5) or "0";  -- SubCategoryStr 0 30 0 0 10 0
    s6 = s6:gsub("\n", ""); s6 = s6:gsub("\r", ""); s6 = s6:gsub("\t", "");

    if s3 == hash_to_wipe then
      cFound = cFound + 1;
      if erase == "yes" then
        writeInteger(p, 0);
        cReplaced = cReplaced + 1;
      end;
    end;

    if s3 == 0x000001506FB5C137 then  --Ancient Tablets
      tablets = p;
      elseif s3==0x00000150408F900F then --Iron Metal
        metal = p;
      elseif s3==0x00000150408F9013 then --Obsidian Glass
        glass = p;
      elseif s3==0x00000150408F7320 then --Olive Wood
        wood = p;
      elseif s3==0x000001506FB5C133 then --Precious Gems
        gems = p;
      elseif s3==0x000001506FB5C135 then --Soft Leather
        leather = p;
      elseif s3==0x0000001BFDB9F655 then --Drachmae
        money = p;
      elseif s3==0x00000169714164EF then --Chios Bear Skin
        bearfur = p;
      elseif s3==0x00000181110363A6 then -- Athenian Polemarch Military Seal
        athenianseal = p;
      elseif s3==0x00000180E5F4A238 then --Fort Polemarch Spartan Seal
        spartanseal = p;
      elseif s3==0x0000015BD3E6413B then -- Artifact Fragment
        artfragment = p;
    end;

    s = string.format("%016X\t%016X\t%016X\t%016X\t%4d\t%s\t%s",p,s1,s2,s3,s4,s5,s6)
    print(s);
    outputDebugString("::"..s);
  end;

 print("deleted:",cReplaced, "found:",cFound)

 for i=1, memrec.Count,1 do
  memrec.Child[i-1].reinterpret();
 end

 memrec.color = 0x008000;
end
{$asm}

[DISABLE]
{$lua}
  if not syntaxcheck then
    memrec.color = 0x0000ff;
    tablets    = nil; metal = nil;
    glass      = nil; wood = nil;
    gems       = nil; leather = nil;
    money      = nil; bearfur = nil;
    spartanseal= nil; athenianseal=nil;
  end;
{$asm}
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>24124</ID>
              <Description>"Drachmae"</Description>
              <VariableType>4 Bytes</VariableType>
              <Address>money</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>24123</ID>
              <Description>"Soft Leather"</Description>
              <VariableType>4 Bytes</VariableType>
              <Address>leather</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>24122</ID>
              <Description>"Iron Metal"</Description>
              <VariableType>4 Bytes</VariableType>
              <Address>metal</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>24120</ID>
              <Description>"Olive Wood"</Description>
              <VariableType>4 Bytes</VariableType>
              <Address>wood</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>24115</ID>
              <Description>"Ancient Tablets"</Description>
              <VariableType>4 Bytes</VariableType>
              <Address>tablets</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>24121</ID>
              <Description>"Obsidian Glass"</Description>
              <VariableType>4 Bytes</VariableType>
              <Address>glass</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>24119</ID>
              <Description>"Precious Gems"</Description>
              <VariableType>4 Bytes</VariableType>
              <Address>gems</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>24125</ID>
              <Description>"Quest: Chios Bear Skin"</Description>
              <VariableType>4 Bytes</VariableType>
              <Address>bearfur</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>24127</ID>
              <Description>"Quest: Athenian Polemarch Military Seal"</Description>
              <VariableType>4 Bytes</VariableType>
              <Address>athenianseal</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>24126</ID>
              <Description>"Quest: Fort Polemarch Spartan Seal"</Description>
              <VariableType>4 Bytes</VariableType>
              <Address>spartanseal</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>24276</ID>
              <Description>"Quest: Artefact Fragment"</Description>
              <VariableType>4 Bytes</VariableType>
              <Address>artfragment</Address>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
</CheatTable>


If you could provide with a script or ct or trainer that could alter the number of Ancient Fragments in Assassin's Creed Odyssey, It would be preferred.
Thanks
Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 82

Joined: 14 Jul 2007
Posts: 2870

PostPosted: Mon Dec 06, 2021 1:51 pm    Post subject: Re: Unable to toggle the script on and off Reply with quote

The7uphero wrote:
UH, so could you please help me fix the file?

You should contact the author that made the cheat in the first place.
Back to top
View user's profile Send private message
The7uphero
How do I cheat?
Reputation: 0

Joined: 05 Dec 2021
Posts: 3

PostPosted: Tue Dec 07, 2021 1:38 am    Post subject: Reply with quote

that dude has left cheat engine 2 years ago
Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 82

Joined: 14 Jul 2007
Posts: 2870

PostPosted: Tue Dec 07, 2021 12:37 pm    Post subject: Reply with quote

Or, just moved to FRF.
Good luck, either way!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites