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 


Multi-Line repeater code

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

Joined: 29 Dec 2013
Posts: 3

PostPosted: Sun Dec 29, 2013 4:42 am    Post subject: Multi-Line repeater code Reply with quote

Hi there, I'm new to all this so I don't know if this is the right place for this, if it's been asked and answered answered before, etc, but I was wondering if someone could help me.

I was wondering if it's possible for the Cheat Engine to do a multi-line serial repeater code akin to the ones used on Gamesharks for PS1 games in the old days.

For example the following code:

50000802 0001
80077EBC 6401

would be the same as

80077EBC 6401
80077EBE 6402
80077EC0 6403
80077EC2 6404
80077EC4 6405
80077EC6 6406
80077EC8 6407
80077ECA 6408

without having to right all those lines out, made even more effective with even more instances of the code. So, is there a way for the cheat engine to do the same (start at an address and add to the address and value by a set amount for a set number of times)? It might be something simple, like I said I'm new to all this so please be patient with me Razz

Cheers
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Sun Dec 29, 2013 5:44 am    Post subject: Reply with quote

This lua script would do what you want
Code:

for i=0,7 do
  writeBytes(0x00400500+i*2, wordToByteTable(6401+i))
end


You can also put this into a function
Code:

function FillWordsPlus1(address, value, count)
  local i
  for i=0,count-1 do
    writeBytes(address+i*2, wordToByteTable(value+i))
  end
end


And then in an auto assembler script you can do:
Code:

luacall(FillWordsPlus1(0x00400600, 6401, 8))

_________________
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
aeonlord92
How do I cheat?
Reputation: 0

Joined: 29 Dec 2013
Posts: 3

PostPosted: Sun Dec 29, 2013 6:37 am    Post subject: Reply with quote

Thanks for that,

I get all that pretty much - the only thing I don't get is where you got the 0x00400500 part from (I'm guessing that's the base address or something). Once I have that sused I should be able to sort out these codes as and when I need them myself.

Cheers

EDIT: Did some testing of my own and it complains about ' attempt to call global 'wordToByteTable' (a nil value)'
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Sun Dec 29, 2013 7:24 am    Post subject: Reply with quote

Are you using Cheat Engine 6.3? (I'm not sure wordToByteTable is a 6.3 or a 6.3+ function)

(The 00400500 is just an example base address I usually use to write random data to as it's generally unused)

_________________
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
aeonlord92
How do I cheat?
Reputation: 0

Joined: 29 Dec 2013
Posts: 3

PostPosted: Mon Dec 30, 2013 1:49 pm    Post subject: Reply with quote

Got it to work, was simply because I was still running on 6.2 rather than 6.3. Worked a treat, thank you 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 -> General Gamehacking 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