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 


Problem with writeFloat

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Woza
Newbie cheater
Reputation: 0

Joined: 08 Sep 2012
Posts: 12

PostPosted: Wed Sep 04, 2013 1:53 pm    Post subject: Problem with writeFloat Reply with quote

Code:
addys = {}
addys.player = "66 0F D6 AB 00 01 00 00 F3 0F 7E 6E 18 66 0F D6 AB 08 01 00 00" -- accesses the players position
player = {}
player.x = 0xFC -- offsets, these ARE correct
player.y = 0x104
player.z = 0x10C

function debugger_onBreakpoint()
         if (EIP == addys.player) then
             writeFloat(EBX+player.x, 2.0) -- does work
             writeFloat(EBX+player.y, 2.0) -- doesn't work
             writeFloat(EBX+player.z, 2.0) -- doesn't work
             readFloat(EBX+player.y) -- this would return 2 but my actual position isnt changed
         end
         debug_continueFromBreakpoint(co_run) -- continue execution
end

for k,v in pairs(addys) do
addys[k] = AOBScan(v)
if addys[k] == nil then print("Error: couldnt find AOB " .. v) else addys[k] = tonumber(addys[k][0],16)
end
end
print("Found AOBs")

debugProcess()
debug_setBreakpoint(addys.player)



This is my code which is supposed to lock the player. However only my X coordinate is locked and other than that I can move freely. I have checked the offsets, they should be correct. print(EBX) on the debug loop only returns 1 address. I can't figure it out.

Edit:
Darn, this is probably in the wrong section :/
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Wed Sep 04, 2013 2:58 pm    Post subject: Reply with quote

Perhaps the instructions after the breakpoint set the y and z coordinates

E.g. if your breakpoint is at the location that writes your x coordinate, then it's likely the following instructions write y and z, overwriting your modified coordinates

_________________
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
Woza
Newbie cheater
Reputation: 0

Joined: 08 Sep 2012
Posts: 12

PostPosted: Thu Sep 05, 2013 8:56 am    Post subject: Reply with quote

Yes, that was the problem. Thank you very much! Very Happy
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