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 


Dont know what is wrong with the code

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

Joined: 06 Aug 2022
Posts: 3

PostPosted: Sat Aug 06, 2022 10:47 am    Post subject: Dont know what is wrong with the code Reply with quote

How do I teleport the ball above me??
I tried to do this below but I think the problem is that the coords are a float and I think Im working with intiger commands, but I have no idea at this point
Am I even moving the value stored in the adress pointed by the pointer??


Code:

loadlibrary(luaclient-x86_64.dll)
luacall(openLuaServer('CELUASERVER'))

CELUA_ServerName:
db 'CELUASERVER',0

[ENABLE]
alloc(main,2048,"UnityPlayer.dll"+12E0647)
//code from here to '[DISABLE]' will be used to enable the cheat
/*
pointer stuff

------car y pointer------------
"UnityPlayer.dll"+0195BD40
18
88
0
10
58
28
CA0
------------------------

----------ball y pointer---------
"UnityPlayer.dll"+01A81CE8
14
0
1f0
498
4d0
30
8e8
--------------------------
*/
main:
//car x pointer ----------------
mov r14,"UnityPlayer.dll"+0195C800
mov r14,[r14+10]
mov r14,[r14+88]
mov r14,[r14+0]
mov r14,[r14+10]
mov r14,[r14+58]
mov r14,[r14+28]
mov r14,[r14+CA0]
//----------------------------------

//ball x pointer--------------------
mov r13,"UnityPlayer.dll"+01A81CE8
mov r13,[r13+10]
mov r13,[r13+0]
mov r13,[r13+1f0]
mov r13,[r13+498]
mov r13,[r13+4d0]
mov r13,[r13+30]
mov r13,[r13+8e8]
//---------------------------------


mov r13,r14
add [r13+4],A
mov rdx, [r13+4]
mov rdi, [r13+8]
mov [r14+4],rdx
mov [r14+8],rdi

{$lua}
createNativeThread(function(t)
    local rec = getAddressList().getMemoryRecordByDescription("test")
    rec.active=false
end)
{$asm}
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(main)

_________________
Im new cheat engine user
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Sun Aug 07, 2022 12:49 am    Post subject: Reply with quote

1: main does not return so the target will crash if executed (add a ret)
2: main does not get executed (try executeCode or aa createthread)
3: createNativeThread accesses the addresslist without synchronize, you're going to get unexpected behaviour (better use a one time run timer. createTimer(1, function() memrec.Active=false end) )

4: this code can be rewritten using 2 memory records
one record named "main.x" and one "ball.x"
now freeze main.x and set the value of it to
Code:

(ball.x)

_________________
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
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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