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 


I need help creating scripts that work

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Fraternity
Newbie cheater
Reputation: 0

Joined: 13 Apr 2009
Posts: 15

PostPosted: Sat Aug 20, 2011 12:48 pm    Post subject: I need help creating scripts that work Reply with quote

Hi guys I was wondering if anyone had the time to write up a through tutorial for me on how to successfully write scripts. I am not completely new I can hack to a decent amount however I am really not good at writing asm code. Can someone please give me a tutorial with any game, showing me step by step on how to go about writing a script that works perfectly. When I write scripts they work but I wanted to add 200 to my gold amount for example instead somehow it added 64 it's strange I am not good with scripts. So please if anyone could write up a tutorial I would really appreciate it. I would really love to learn to code asm correctly myself.
Back to top
View user's profile Send private message
SwaggaJackin'
Master Cheater
Reputation: 2

Joined: 06 Nov 2009
Posts: 312

PostPosted: Sat Aug 20, 2011 3:40 pm    Post subject: Reply with quote

It'd be better if you posted your script with a description of what you want it to do. That way we can help you by telling you what is wrong with it, what it should look like, and why it should be that way.

Also, read up on x86 ASM. Find out how the registers work and what they are used for. The stack. And instruction set.
Back to top
View user's profile Send private message
Fraternity
Newbie cheater
Reputation: 0

Joined: 13 Apr 2009
Posts: 15

PostPosted: Sat Aug 20, 2011 4:29 pm    Post subject: Reply with quote

Well since I can't post URL's yet... I'll add it under attachments, This picture shows the address that hold the value of the bullets. The total bullet count in one clip is 12. Is it possible to write a script from this address that would give me +1 ammo everytime I fire 1 shot, therefore in the end giving me unlimited ammo


Capture.PNG
 Description:
 Filesize:  400.95 KB
 Viewed:  9233 Time(s)

Capture.PNG


Back to top
View user's profile Send private message
SwaggaJackin'
Master Cheater
Reputation: 2

Joined: 06 Nov 2009
Posts: 312

PostPosted: Sat Aug 20, 2011 5:23 pm    Post subject: Reply with quote

That's easy.

Since we know the bullet address is at [ecx + 0000013C], you can replace that MOV instruction with a increment instruction if all you want to do is make your bullet count go up by 1 everytime you fire the weapon. Since that MOV instruction is six bytes, there is nothing to NOP out either, because the replacement INC instruction will also be six bytes.

Change:
Code:

MOV [ecx+0000013C],eax


To:
Code:

INC [ecx+0000013C]


INC increases the target by a value of 1. So this will do exactly what you want.

Here's a nice instruction set list with description of each opcode:

http://www.cs.virginia.edu/~evans/cs216/guides/x86.html

http://home.comcast.net/~fbui/intel.html

You can also view the auto assembly functions by pressing F1 in the auto assembler to see the help file.
Back to top
View user's profile Send private message
Fraternity
Newbie cheater
Reputation: 0

Joined: 13 Apr 2009
Posts: 15

PostPosted: Sat Aug 20, 2011 8:37 pm    Post subject: Reply with quote

Wow but I thought doing that would be instant crash because you are completely removing an adress that does something, you are allowed to do that?

It didn't work Sad, also I just realized the code reads the samething exactly I found the code again but this time the address changed. It is now, 0BA11920
I was reading the forum about this that you could use AOB to find the address automatically in your script so the script always works. Do you know how?
Back to top
View user's profile Send private message
SwaggaJackin'
Master Cheater
Reputation: 2

Joined: 06 Nov 2009
Posts: 312

PostPosted: Sun Aug 21, 2011 4:17 am    Post subject: Reply with quote

Fraternity wrote:
Wow but I thought doing that would be instant crash because you are completely removing an adress that does something, you are allowed to do that?

It didn't work Sad, also I just realized the code reads the samething exactly I found the code again but this time the address changed. It is now, 0BA11920
I was reading the forum about this that you could use AOB to find the address automatically in your script so the script always works. Do you know how?


It depends on the game, if the game only uses that instruction to write to the remaining bullets address and doesn't do any other calculations with it, more than likely it won't crash the game.

If you mean the instruction changed to 0BA11920, you can do a AOB scan in this format:

Code:

aobscan(_bulletwrite,89 81 3C 01 00 00 8B CA  8B 41 14 D9 80 XX XX XX XX D9 EE)

_bulletwrite:
// Write your instructions to replace what is at that AOB here


Assuming the instructions you found again at 0BA11920 are the same as your screenshot. Just verify that AOB finds the address you want. In the cases that your AOB is a common piece of code, you can find nearby instructions that are unique and add a offset such as:

Code:

aobscan(_bulletwrite,E8 F1 15 00 00 E9 78 FE FF FF 8B FF 55 8B EC)

_bulletwrite+9: // this is not hex

// or

_bulletwrite-5: // this is not hex


'XX' is a wild card.
Back to top
View user's profile Send private message
Cielos
Grandmaster Cheater
Reputation: 64

Joined: 10 Jan 2008
Posts: 981

PostPosted: Sun Aug 21, 2011 7:00 am    Post subject: Reply with quote

alternately you can just nop this, thus doing nothing when firing. (assuming you've checked if this code is being accessed only when the player is firing a weapon)

that would be sth like this:

Code:
aobscan(_bulletwrite,89 81 3C 01 00 00 8B CA  8B 41 14 D9 80 XX XX XX XX D9 EE)

_bulletwrite:
nop
nop
nop
nop
nop
nop


or simply:

Code:
aobscan(_bulletwrite,89 81 3C 01 00 00 8B CA  8B 41 14 D9 80 XX XX XX XX D9 EE)

_bulletwrite:
db 90 90 90 90 90 90


Edit:
oh Fraternity I'm sorry I didn't reply you before, somehow I missed your post there! my apology...

well I'm not good at writing tutorial anyway, and as you can see under my name, I'm still a Newbie cheater... so I think you would get more help here instead.

hope my contribution helps! and sorry again!
Back to top
View user's profile Send private message Visit poster's website
Pingo
Grandmaster Cheater
Reputation: 8

Joined: 12 Jul 2007
Posts: 571

PostPosted: Sun Aug 21, 2011 2:59 pm    Post subject: Reply with quote

Fraternity wrote:
Wow but I thought doing that would be instant crash because you are completely removing an adress that does something, you are allowed to do that?

It didn't work Sad, also I just realized the code reads the samething exactly I found the code again but this time the address changed. It is now, 0BA11920
I was reading the forum about this that you could use AOB to find the address automatically in your script so the script always works. Do you know how?

Thats just codeshifting. You wont need to use an aobscan, just include the module+offset instead of using a static address like 0BA11920

_________________
Back to top
View user's profile Send private message
Fraternity
Newbie cheater
Reputation: 0

Joined: 13 Apr 2009
Posts: 15

PostPosted: Sun Aug 21, 2011 8:52 pm    Post subject: Reply with quote

Thanks for all the help guys i'm starting to get a good understanding of how things work. Cielos don't worry about it but thanks anyway though and you know a hell lot more than I do that's for sure.

Does anyone know if there is a book that teaches you all of this? I love all of this but I find CEF hard to follow, tutorials are all mixed around I don't know which tutorial goes first and which comes after so If There is a book that teaches about all of this please let me know someone.
Back to top
View user's profile Send private message
low_density
Expert Cheater
Reputation: 1

Joined: 08 Aug 2009
Posts: 156

PostPosted: Mon Aug 22, 2011 12:23 am    Post subject: Reply with quote

i dunno if this helps you, but i learnt my assembly programming by looking through codes that other people, like Geri and Recifencse (Sorry if i spelled this wrongly) make, and then asking people my doubts Very Happy
Back to top
View user's profile Send private message
cwjakesteel
Cheater
Reputation: 0

Joined: 24 Jun 2009
Posts: 31

PostPosted: Tue Aug 30, 2011 9:48 pm    Post subject: Reply with quote

Fraternity wrote:
Thanks for all the help guys i'm starting to get a good understanding of how things work. Cielos don't worry about it but thanks anyway though and you know a hell lot more than I do that's for sure.

Does anyone know if there is a book that teaches you all of this? I love all of this but I find CEF hard to follow, tutorials are all mixed around I don't know which tutorial goes first and which comes after so If There is a book that teaches about all of this please let me know someone.


That would be nice, but then what would this forum be here for?
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 -> 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