Difference between revisions of "Memory Functions"

From SolarStrike wiki
Jump to: navigation, search
(memoryReadByte)
m (memoryReadByte)
Line 8: Line 8:
 
<source lang="lua">
 
<source lang="lua">
 
HP = memoryReadInt( myProcess, 0x0D2E0F90); -- This will read 0x0D2E0F90 on MyProcess and store it into HP
 
HP = memoryReadInt( myProcess, 0x0D2E0F90); -- This will read 0x0D2E0F90 on MyProcess and store it into HP
  if( HP =< 100 ) then  
+
  if( HP <= 100 ) then  
 
   printf("Hp[%d] dropping too low!",HP);
 
   printf("Hp[%d] dropping too low!",HP);
 
  end
 
  end
 
</source>
 
</source>

Revision as of 04:23, 15 July 2008

memoryReadByte

byte memoryReadByte(handle, address)

Reads a specific memory adress and returns a single byte.


Example

HP = memoryReadInt( myProcess, 0x0D2E0F90); -- This will read 0x0D2E0F90 on MyProcess and store it into HP
 if( HP <= 100 ) then 
  printf("Hp[%d] dropping too low!",HP);
 end