| 
			
				|  | Cheat Engine The Official Site of Cheat Engine
 
 
 |  
 
	
		| View previous topic :: View next topic |  
		| Author | Message |  
		| Gear2ndGandalf Cheater
 
 ![]() Reputation: 0 
 Joined: 22 Jan 2018
 Posts: 36
 Location: USA
 
 | 
			
				|  Posted: Wed Feb 21, 2024 5:17 pm    Post subject: How Could I randomize a float value In AA Script? |   |  
				| 
 |  
				| I'm trying to make the projectile appear randomly when shooting from the player's perspective. 
 How can we go about randomzing [yShot] variable? I tried making compares and jumps with no luck so far.
 
 
  	  | Code: |  	  | [ENABLE] 
 aobscanmodule(yProjectiles,halo1.dll,F3 41 0F 10 46 04 F3 0F 59 F0)
 alloc(newmem1,$1024,yProjectiles)
 alloc(yShot,$8,yProjectiles)
 
 label(code1)
 label(return1)
 
 yShot:
 dd (float)5
 
 newmem1:
 movss xmm0,[yShot]
 jmp return1
 
 code1:
 movss xmm0,[r14+04]
 jmp return1
 
 yProjectiles:
 jmp newmem1
 nop
 return1:
 registersymbol(yProjectiles)
 registersymbol(yShot)
 
 [DISABLE]
 
 yProjectiles:
 db F3 41 0F 10 46 04
 
 unregistersymbol(*)
 dealloc(*)
 | 
 
 
 
 
	
		
	 
		| Description: |  |  
		| Filesize: | 38.94 KB |  
		| Viewed: | 1927 Time(s) |  
		| 
  
 
 |  
 |  |  
		| Back to top |  |  
		|  |  
		| Gear2ndGandalf Cheater
 
 ![]() Reputation: 0 
 Joined: 22 Jan 2018
 Posts: 36
 Location: USA
 
 | 
			
				|  Posted: Thu Feb 22, 2024 2:22 am    Post subject: |   |  
				| 
 |  
				| To answer my question above. This cheat makes it look like Master Chief is firing from multiple directions. 
 I followed a Stephen Chapman Terreria random number gen tutorial and it worked!
 
 
  	  | Code: |  	  | [ENABLE] 
 aobscanmodule(yProjectiles,halo1.dll,F3 41 0F 10 46 04 F3 0F 59 F0)
 alloc(newmem1,$1024,yProjectiles)
 alloc(retAddress,$48,yProjectiles)
 alloc(rngGen,$48,yProjectiles)
 
 label(opt1)
 label(opt2)
 label(opt3)
 label(opt4)
 label(opt5)
 label(opt6)
 label(opt7)
 label(opt8)
 label(opt9)
 label(optA)
 label(optB)
 label(optC)
 //label(originalCode)
 label(return1)
 
 rngGen:
 push rax
 push rcx
 push rdx
 mov rcx,C
 rdtsc
 xor rdx,rdx
 shr rax,1
 idiv rcx
 inc rdx
 jmp [retAddress]
 
 newmem1:
 push rbx
 lea rbx,[newmem1+15]
 mov [retAddress],rbx
 pop rbx
 jmp rngGen
 cmp rdx,1
 je opt1
 cmp rdx,2
 je opt2
 cmp rdx,3
 je opt3
 cmp rdx,4
 je opt4
 cmp rdx,5
 je opt5
 cmp rdx,6
 je opt6
 cmp rdx,7
 je opt7
 cmp rdx,8
 je opt8
 cmp rdx,9
 je opt9
 cmp rdx,A
 je optA
 cmp rdx,B
 je optB
 cmp rdx,C
 je optC
 jmp return1
 
 opt1:
 pop rdx
 pop rcx
 pop rax
 mov [r14+04],(float)-6
 movss xmm0,[r14+04]
 jmp return1
 
 opt2:
 pop rdx
 pop rcx
 pop rax
 mov [r14+04],(float)-5
 movss xmm0,[r14+04]
 jmp return1
 
 opt3:
 pop rdx
 pop rcx
 pop rax
 mov [r14+04],(float)-4
 movss xmm0,[r14+04]
 jmp return1
 
 opt4:
 pop rdx
 pop rcx
 pop rax
 mov [r14+04],(float)-3
 movss xmm0,[r14+04]
 jmp return1
 
 opt5:
 pop rdx
 pop rcx
 pop rax
 mov [r14+04],(float)-2
 movss xmm0,[r14+04]
 jmp return1
 
 opt6:
 pop rdx
 pop rcx
 pop rax
 mov [r14+04],(float)-1
 movss xmm0,[r14+04]
 jmp return1
 
 opt7:
 pop rdx
 pop rcx
 pop rax
 mov [r14+04],(float)1
 movss xmm0,[r14+04]
 jmp return1
 
 opt8:
 pop rdx
 pop rcx
 pop rax
 mov [r14+04],(float)2
 movss xmm0,[r14+04]
 jmp return1
 
 opt9:
 pop rdx
 pop rcx
 pop rax
 mov [r14+04],(float)3
 movss xmm0,[r14+04]
 jmp return1
 
 optA:
 pop rdx
 pop rcx
 pop rax
 mov [r14+04],(float)4
 movss xmm0,[r14+04]
 jmp return1
 
 optB:
 pop rdx
 pop rcx
 pop rax
 mov [r14+04],(float)5
 movss xmm0,[r14+04]
 jmp return1
 
 optC:
 pop rdx
 pop rcx
 pop rax
 mov [r14+04],(float)6
 movss xmm0,[r14+04]
 jmp return1
 
 originalCode:
 movss xmm0,[r14+04]
 jmp return1
 
 yProjectiles:
 jmp newmem1
 nop
 return1:
 registersymbol(yProjectiles)
 registersymbol(retAddress)
 registersymbol(rngGen)
 
 [DISABLE]
 
 yProjectiles:
 db F3 41 0F 10 46 04
 
 unregistersymbol(*)
 dealloc(*)
 | 
 
 
 
 
	
		
	 
		| Description: |  |  
		| Filesize: | 92.79 KB |  
		| Viewed: | 1897 Time(s) |  
		| 
  
 
 |  
 
 
	
		
	 
		| Description: |  |  
		| Filesize: | 54.79 KB |  
		| Viewed: | 1897 Time(s) |  
		| 
  
 
 |  
 |  |  
		| Back to top |  |  
		|  |  
		|  |  
  
	| 
 
 | 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
 
 |  |