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 


Someone help me with my project?

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

Joined: 23 Mar 2015
Posts: 1

PostPosted: Mon Mar 23, 2015 2:11 pm    Post subject: Someone help me with my project? Reply with quote

Someone help me with code lua:

Aobscan(_aob1, ?? 00 00 00 00 00 F0 BF ?? ?? ?? ?? ?? ?? ?? ?? 9A)

_aob1:

db 00 00 00 00 00 74 42 42

]])

end



hkey=createHotkey("doscript4",VK_9)



function replaceAOB3()



r=AOBScan("00 00 00 00 00 74 42 42")



if (r~=nil) then

c=strings_getCount(r)

if (c>0) then

resultlist3=nil

resultlist3={}

for i=0,c-1 do

a=strings_getString(r,i);

resultlist3[i+1]={}

resultlist3[i+1][1]=a

resultlist3[i+1][2]=readBytes(a, 11, true)

end

end

end

end



function restoreAOB3()

for i=1,#resultlist3 do

local a=tonumber("0x"

resultlist3[i][1])

local orig=resultlist3[i][2];

for j=0,11 do

writeBytes(a+j,orig[j])

end

end

end



function activatetick(mr, before, currentstate)

if (before==false) and (currentstate==true) then

replaceAOB3()

end



return true

end



hkey=createHotkey("replaceAOB3",VK_9)



function deactivatetick(mr, before, currentstate)

if (before==false) and (currentstate==false) then

restoreAOB3()

end



return true

end



hkey=createHotkey("restoreAOB3",VK_SPACE)



al=getAddressList()



mr=addresslist_getMemoryRecord(al,0);

memoryrecord_onActivate(mr,activatetick)

memoryrecord_onDeactivate(mr,deactivatetick)







Whenever I try to use the error does not know why.

_________________
Creation hack for games.
Back to top
View user's profile Send private message AIM Address
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Mon Mar 23, 2015 7:42 pm    Post subject: Reply with quote

Edit your post and surround everything with [ code ] tags.

Also, post the error you're getting.

Skimming through it, I believe you're using tonumber incorrectly.

Should be tonumber(resultlist3[i][1],16) assuming that holds a hex string representation.
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