| 
			
				|  | Cheat Engine The Official Site of Cheat Engine
 
 
 |  
 
	
		| View previous topic :: View next topic |  
		| Author | Message |  
		| gummibearssss How do I cheat?
 
 ![]() Reputation: 0 
 Joined: 19 Jan 2018
 Posts: 1
 
 
 | 
			
				|  Posted: Fri Jan 19, 2018 12:20 pm    Post subject: How to add found list to address list and change value |   |  
				| 
 |  
				| Hi I need to know how to add found addresses to the address list. And then after that to replace the current value of the address with integer: 5000.
 
 Sorry I'm fairly new to LUA scripts.
 Here is what i have so far:
 
 --initialize memory scan
 --INITIALIZE MEMORY SCAN
 ms=createMemScan()
 ms.firstScan(soExactValue, vtGrouped, rtExtremerounded, "F:450 F:109.5445098877 F:20", "", 0, 0xffffffffffffffff, "", fsmAligned, "4", false, false, false, false)
 ms.waitTillDone()
 
 --POPULATE THE FOUNDLIST
 f=createFoundList(ms);
 f.initialize();
 
 --ADD FOUNDLIST TO ADDRESSLIST
 need the codes for this part
 
 --CHANGE  FIRST ADDRESS VALUE TO 5000
 and this part
 |  |  
		| Back to top |  |  
		|  |  
		| TheyCallMeTim13 Wiki Contributor
 
  Reputation: 51 
 Joined: 24 Feb 2017
 Posts: 976
 Location: Pluto
 
 | 
			
				|  Posted: Fri Jan 19, 2018 12:27 pm    Post subject: |   |  
				| 
 |  
				| From "celua.txt": 
  	  | Code: |  	  | createFoundList(memscan)
 
 properties
 Count: integer - Number of results found
 Address[index] : string - Returns the address as a string at the given index
 Value[index]: string - Returns the value as a string at the given index
 [index]: string - Same as Address
 
 methods
 initialize() : Call this when a memscan has finished scanning. This will open the results for reading
 deinitialize() : Release the results
 getCount()
 getAddress(index) : Returns the address as a string
 getValue(index) : Returs the value as a string
 | 
 
 
  	  | Code: |  	  | writeInteger(f.getAddress(1), 5000) | 
 or
 
  	  | Code: |  	  | writeInteger(f.Address[1], 5000) | 
 
 you may want to check if there are results first
 
 
  	  | Code: |  	  | if f.Count ~= -1 then writeInteger(f.Address[1], 5000)
 end
 | 
 
 EDIT:
 Some how missed the first part for adding to address list.
 
 
  	  | Code: |  	  | if f.Count ~= -1 then writeInteger(f.Address[1], 5000) -- Set value for the first one
 for i = 1, f.Count do
 if f.Address[i] ~= nil then -- if address then create memory record
 local mr = AddressList.createMemoryRecord()
 mr.Description = tostring(i) -- set description to then found index
 mr.Type = vtDword
 mr.Address = f.Address[i]
 end
 end
 end
 | 
 _________________
 
 |  |  
		| 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
 
 |  |