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 


[AA Script] Creating a loop

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Chaosis13
Master Cheater
Reputation: 0

Joined: 14 Aug 2007
Posts: 372

PostPosted: Sun Jun 29, 2008 5:06 pm    Post subject: [AA Script] Creating a loop Reply with quote

I am making a script for maplestory, a vac if you must know. But how do I make a loop in my code?

For example:

Code:
[Enable]
alloc(Hack, 1024) //more that enough
label(Hack)
Hack:
push eax //push eax onto the stack (is this needed?)
mov eax, 00110011 //move address 00110011 into eax
add eax, 1a //add offset 1a to address of eax
push ebx //push ebx onto the stack (is this needed?)
mov ebx, 11001100 // move address 11001100 into ebx
add ebx, 2b //add offset 2b to address of ebx
mov [ebx], [eax] //move value of eax into value of ebx
pop eax //remove eax from the stack
pop ebx //remoce ebx from the stack

//Loop 'Hack' Here

[Disable]
//Nothing (tick and close)


I am still a noob to AA, so if none of this works tell me plz. The script I am making is complex, so if I don't understand something, plz correct me.
Back to top
View user's profile Send private message
Chaosis13
Master Cheater
Reputation: 0

Joined: 14 Aug 2007
Posts: 372

PostPosted: Sun Jun 29, 2008 5:35 pm    Post subject: Reply with quote

ty! And does my code look fine?

EDIT:
My code had a small mistake that I fixed, then I tryed to run it, but the loop doesn't work. It says:
There is code defined without specifying the address it belongs to.

Is there another way? Or can you explain your code?

EDIT:
I feel stupid. I just did this:
Code:
 code1:
//stuff
jmp code2

code2:
jmp code1


It then compiled, or had no errors, w/e. I am now going to test my vac....
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Sun Jun 29, 2008 6:19 pm    Post subject: Reply with quote

I'd do something like

Code:

alloc (code, 128)
alloc (Index, 4)
label (loopStart)

code:
//do stuff

loopStart:
  //do more stuff
  inc [Index]
  cmp [Index], 10
  jl loopStart

  //other stuff

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
Chaosis13
Master Cheater
Reputation: 0

Joined: 14 Aug 2007
Posts: 372

PostPosted: Sun Jun 29, 2008 6:44 pm    Post subject: Reply with quote

Thats basicly what I had, and what I would do if I was smarter.

And my code had no errors, but I couldn't tick it why? Plz help.
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Sun Jun 29, 2008 7:05 pm    Post subject: Reply with quote

Post your script.

Usually it has something to do with the script failing to inject.

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
Chaosis13
Master Cheater
Reputation: 0

Joined: 14 Aug 2007
Posts: 372

PostPosted: Sun Jun 29, 2008 7:16 pm    Post subject: Reply with quote

It wasn't with the inject, but I got it after awhile!

YEAH! I am testing now....
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 programming 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