| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| Faxonation Cheater
 
 ![]() Reputation: 0 
 Joined: 18 Oct 2014
 Posts: 25
 
 
 | 
			
				|  Posted: Sat Oct 31, 2015 2:24 pm    Post subject: how do I use cmp the right way. |   |  
				| 
 |  
				| I am trying to make my AA script that will only exicute when certain conditions are met. 
 I dont want lua code cause i cant run more then one script at a time.
 
 Example:
 
 Read these addresses
 (Address1, Address2, Address3, Address4)
 
 If addresses =
 1,6,7,12A4335B
 Then change the value at
 Address5 to
 FFFFFFFF.
 
 I know how to do it in lua but i want to do it in normal AA script
 
 Example 2:
 
 cmp address to 1
 je code
 cmp address to 0
 je code2
 
 code:
 Address:
 db FF FF FF FF
 
 code2:
 Address:
 Wait 2 secs
 db B0 64 3A 00
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Zanzer I post too much
 
 ![]() Reputation: 126 
 Joined: 09 Jun 2013
 Posts: 3278
 
 
 | 
			
				|  Posted: Sat Oct 31, 2015 3:21 pm    Post subject: |   |  
				| 
 |  
				| What you want is Lua. Not sure why you think you can only run one script at a time. |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| panraven Grandmaster Cheater
 
 ![]() Reputation: 62 
 Joined: 01 Oct 2008
 Posts: 958
 
 
 | 
			
				|  Posted: Sat Oct 31, 2015 4:46 pm    Post subject: |   |  
				| 
 |  
				| Here a demo for 1), it is 64-bit, try attach cheatengine-x86_64.exe. Hopefully not misunderstood the problem.
 
 Go to __+80 and enter 1 to simulate matched condition.
 
 
  	  | Code: |  	  | [ENABLE] globalalloc(__,$4000)
 
 __:
 dq __
 
 __+10:
 dq __+80,1,__+90,2,__+A0,3,__+b0,4,0,0 // addresses 1-4
 
 __+e0: // address 5 to set
 dq 0
 
 __+f0: // thread end flag
 dq 1
 
 // ^ test set up
 
 __+100:
 push rax
 push rcx
 push rdx
 push rdi
 
 nextLoop:
 mov  rcx,#50
 sub  rsp,20
 call Sleep
 add  rsp,20
 mov  rdi,__+10
 testAddr:
 inc  dword ptr [__+d0]// test of alive
 
 mov  rdx,[rdi]        // load addres and matching value
 mov  rax,[rdi+08]
 test rdx,rdx          // test if end of address list
 je   short doneOneLoop
 cmp  [rdx],rax        // test if match
 jne  short nextAddr
 
 inc  dword ptr [__+e0]// action on match
 
 nextAddr:
 add  rdi,10
 jmp short testAddr
 
 
 
 doneOneLoop:
 mov  rax,[__+f0]
 test rax,rax
 jne  short nextLoop
 
 pop  rdi
 pop  rdx
 pop  rcx
 pop  rax
 
 ret
 
 createThread(__+100)
 
 [DISABLE]
 __+f0:
 dq 0
 
 | 
 _________________
 
 - Retarded. |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Faxonation Cheater
 
 ![]() Reputation: 0 
 Joined: 18 Oct 2014
 Posts: 25
 
 
 | 
			
				|  Posted: Sat Oct 31, 2015 10:09 pm    Post subject: |   |  
				| 
 |  
				| Dang i dont understand most of that. Thank you though. I will give it a try. 
 
 
  	  | Zanzer wrote: |  	  | What you want is Lua. Not sure why you think you can only run one script at a time. | 
 
 Because i wrote a bunch of scripts and only the first one I activate works.  You think it might be because i didnt write anything under Disable? Cause i have to shut off cheat engine to turn off the script.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| panraven Grandmaster Cheater
 
 ![]() Reputation: 62 
 Joined: 01 Oct 2008
 Posts: 958
 
 
 | 
			
				|  Posted: Sun Nov 01, 2015 1:50 am    Post subject: |   |  
				| 
 |  
				| Is it something like AA command Assert ? ce help:
 
  	  | Code: |  	  | ASSERT(address, array of byte) : Will check the memory address for the given address.
 If the memory is not what is defined by the array of
 byte given, the auto assemble script will not execute.
 | 
 
 If yes, there is possible to make custom AA command to fit you need.
 bye~
 _________________
 
 - Retarded. |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Zanzer I post too much
 
 ![]() Reputation: 126 
 Joined: 09 Jun 2013
 Posts: 3278
 
 
 | 
			
				|  Posted: Sun Nov 01, 2015 6:17 am    Post subject: |   |  
				| 
 |  
				| I think only one of your scripts is working because you named the function the same thing in each one. If you show us two of your scripts, we can help you make them both work.
 And we can help you with the DISABLE so you don't have to restart CE each time.
 
  	  | Code: |  	  | timer1 = createTimer(nil) function execute1()
 -- do function one
 end
 timer1.OnTimer = execute1
 | 
 
  	  | Code: |  	  | timer2 = createTimer(nil) function execute2()
 -- do function two
 end
 timer2.OnTimer = execute2
 | 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  |