View previous topic :: View next topic |
Author |
Message |
the rose Newbie cheater
Reputation: 0
Joined: 28 Mar 2012 Posts: 19
|
Posted: Fri Apr 27, 2012 6:26 am Post subject: cttrainer.exe in lua, with error |
|
|
my ctrainer.exe in lua, appears to run :Error:Access violation.
I am using, the following script:
function replaceAOB1()
r=AOBScan("62 06 66 ?? ?? 24 03 a1 4f ?? ?? ?? d0 4f ?? ?? ?? d0 4f ?? ?? ?? 47")
if (r~=nil) then
c=strings_getCount(r)
if (c>0) then
resultlist1=nil
resultlist1={}
for i=0,c-1 do
a=strings_getString(r,i);
resultlist1[i+1]={}
resultlist1[i+1][1]=a
resultlist1[i+1][2]=readBytes(a, 23, true)
for j=12,21 do
writeBytes(tonumber("0x"..a)+j, 2)
end
end
else
print("No results");
end
else
print("Scan error")
end
end
function restoreAOB1()
for i=1,#resultlist1 do
local a=tonumber("0x"..resultlist1[i][1])
local orig=resultlist1[i][2];
for j=12,22 do
writeBytes(a+j,orig[j])
end
end
end
function activatetick(mr, before, currentstate)
if (before==false) and (currentstate==true) then
replaceAOB1()
end
return true
end
function deactivatetick(mr, before, currentstate)
if (before==false) and (currentstate==false) then
restoreAOB1()
end
return true
end
al=getAddressList()
mr=addresslist_getMemoryRecordByID(al,0);
memoryrecord_onActivate(mr,activatetick)
memoryrecord_onDeactivate(mr,deactivatetick)
-----------------------------------------------------------------------
this error in my script? or will be a bug in the cheat engine?
thank you
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25796 Location: The netherlands
|
Posted: Fri Apr 27, 2012 8:11 am Post subject: |
|
|
Test it without saving it as a .exe, add some debug prints and execute the script yourself
Also, if that is all of the script, it won't work. there is no command to open the process
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
the rose Newbie cheater
Reputation: 0
Joined: 28 Mar 2012 Posts: 19
|
Posted: Fri Apr 27, 2012 11:29 am Post subject: |
|
|
I put the command to open the process.
was thus:
function myattach(timer)
if getProcessIDFromProcessName("Transformice.exe") ~= nil then
object_destroy(timer)
openProcess("Transformice.exe")
end
end
t=createTimer(nil);
timer_setInterval(t,100)
timer_onTimer(t,myattach)
function replaceAOB1()
r=AOBScan("62 06 66 ?? ?? 24 03 a1 4f ?? ?? ?? d0 4f ?? ?? ?? d0 4f ?? ?? ?? 47")
if (r~=nil) then
c=strings_getCount(r)
if (c>0) then
resultlist1=nil
resultlist1={}
for i=0,c-1 do
a=strings_getString(r,i);
resultlist1[i+1]={}
resultlist1[i+1][1]=a
resultlist1[i+1][2]=readBytes(a, 23, true)
for j=12,21 do
writeBytes(tonumber("0x"..a)+j, 2)
end
end
else
print("No results");
end
else
print("Scan error")
end
end
function restoreAOB1()
for i=1,#resultlist1 do
local a=tonumber("0x"..resultlist1[i][1])
local orig=resultlist1[i][2];
for j=12,22 do
writeBytes(a+j,orig[j])
end
end
end
function activatetick(mr, before, currentstate)
if (before==false) and (currentstate==true) then
replaceAOB1()
end
return true
end
function deactivatetick(mr, before, currentstate)
if (before==false) and (currentstate==false) then
restoreAOB1()
end
return true
end
al=getAddressList()
mr=addresslist_getMemoryRecordByID(al,0);
memoryrecord_onActivate(mr,activatetick)
memoryrecord_onDeactivate(mr,deactivatetick)
-----------------------------
works as .ct
as .exe (display the following error)
An unhandled exception occured at $0042208f:
Edecompressionerrror: buffer error
$0042208F
$0041A68D
(I can not create a cttrainer.exe in the moon)
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25796 Location: The netherlands
|
Posted: Fri Apr 27, 2012 12:15 pm Post subject: |
|
|
save your trainer with a lesser level of compression (or none at all) and then test it.
If the size is an issue, then compress the generated exe yourself
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
misha-cs Newbie cheater
Reputation: 0
Joined: 02 Jul 2012 Posts: 12
|
Posted: Mon Jul 02, 2012 7:01 am Post subject: |
|
|
I'm making a trainer in the format .exe, where i'm using debug functions (ondebagger, pause, unpause). During the functions activation there is a mistake:
Code: | Error: Access violation |
At when i make the trainer in format .cetrainer without Protection for editing, there no such mistakes.
How can I generate the trainer in the format .exe without such mistakes?
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25796 Location: The netherlands
|
Posted: Mon Jul 02, 2012 8:12 am Post subject: |
|
|
Yes, there is a bug in cheat engine 6.2 regarding pause/unpause in protected trainers. Because it is protected some gui elements have been destroyed, but pause/unpause make use of that without checking if they exist or not
See if you can do an alternate method of pause. (speedhack speed 0, or set a breakpoint and wait for it to trigger)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
misha-cs Newbie cheater
Reputation: 0
Joined: 02 Jul 2012 Posts: 12
|
Posted: Mon Jul 02, 2012 10:48 am Post subject: |
|
|
Thanks! I do it!
|
|
Back to top |
|
 |
shadowwolf How do I cheat?
Reputation: 0
Joined: 01 Apr 2013 Posts: 9 Location: The netherlands
|
Posted: Sun Apr 07, 2013 8:54 am Post subject: |
|
|
what does this error mean?
Error:[string "autoAssemble([[aobscan(bla, 89 08 8B 0D ?? ..."]:13: attempt to call global 'autoAssamble' (a nil value)
|
|
Back to top |
|
 |
Mohsen Advanced Cheater
Reputation: 1
Joined: 04 Apr 2013 Posts: 69 Location: PE
|
Posted: Sun Apr 07, 2013 8:56 am Post subject: |
|
|
This means autoAssamble is not found..
Post your while script if possible
|
|
Back to top |
|
 |
shadowwolf How do I cheat?
Reputation: 0
Joined: 01 Apr 2013 Posts: 9 Location: The netherlands
|
Posted: Sun Apr 07, 2013 2:23 pm Post subject: |
|
|
ok, i`ll try it out, hope it works with some changes
|
|
Back to top |
|
 |
|