| View previous topic :: View next topic   | 
	
	
	
		| Author | 
		Message | 
	
	
		Firered Cheater
  Reputation: 0
  Joined: 22 May 2012 Posts: 26
 
  | 
		
			
				 Posted: Fri Jun 22, 2012 10:43 am    Post subject: writeDouble | 
				       | 
			 
			
				
  | 
			 
			
				need help about it
 
how to use it
 | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Dark Byte Site Admin
  Reputation: 470
  Joined: 09 May 2003 Posts: 25807 Location: The netherlands
  | 
		
			
				 Posted: Fri Jun 22, 2012 8:03 pm    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				writeDouble(address, value)
 
 
You might have to use fullAccess(address,8) to make sure it's writable first
 _________________
 Do not ask me about online cheats. I don't know any and wont help finding them.
 
 
Like my help? Join me on Patreon so i can keep helping  | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Firered Cheater
  Reputation: 0
  Joined: 22 May 2012 Posts: 26
 
  | 
		
			
				 Posted: Sat Jun 23, 2012 1:46 am    Post subject: why not work? | 
				       | 
			 
			
				
  | 
			 
			
				My script is not working .. why?
 
 
----
 
 
 
 
----
  Last edited by Firered on Tue Jun 26, 2012 11:42 pm; edited 3 times in total | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Dark Byte Site Admin
  Reputation: 470
  Joined: 09 May 2003 Posts: 25807 Location: The netherlands
  | 
		
			
				 Posted: Sat Jun 23, 2012 10:53 am    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				how many addresses does your script find?
 
Print the addresses first
 
 
also, put fullAccess before writeDouble
 _________________
 Do not ask me about online cheats. I don't know any and wont help finding them.
 
 
Like my help? Join me on Patreon so i can keep helping  | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Firered Cheater
  Reputation: 0
  Joined: 22 May 2012 Posts: 26
 
  | 
		
			
				 Posted: Sat Jun 23, 2012 3:37 pm    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				looks:
 
 
 
 
I caught one of the 6 addresses found to show: 01824760
  Last edited by Firered on Tue Jun 26, 2012 11:42 pm; edited 2 times in total | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Firered Cheater
  Reputation: 0
  Joined: 22 May 2012 Posts: 26
 
  | 
		
			
				 Posted: Sun Jun 24, 2012 5:39 pm    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				soValueBetween
  Last edited by Firered on Tue Jun 26, 2012 11:43 pm; edited 1 time in total | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Dark Byte Site Admin
  Reputation: 470
  Joined: 09 May 2003 Posts: 25807 Location: The netherlands
  | 
		
			
				 Posted: Sun Jun 24, 2012 6:06 pm    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				Your FirstScanValueBetween() function doesn't seem to return anything, so any operation based on the return value won't work
 
 
Also, why do you call memoryrecord_setType ?
 
 
Edit: Use indentation, I can hardly read the code.
 
Anyho, it seems you're calling FirstScanValueBetween from inside FirstScanValueBetweenwhich might not be such a good idea
 _________________
 Do not ask me about online cheats. I don't know any and wont help finding them.
 
 
Like my help? Join me on Patreon so i can keep helping  | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Firered Cheater
  Reputation: 0
  Joined: 22 May 2012 Posts: 26
 
  | 
		
			
				 Posted: Sun Jun 24, 2012 7:20 pm    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				still not working =/
 
 
 	  | Code: | 	 		  function FirstScanValueBetween(input1, input2)
 
 
  local result_table = {}
 
 
 
  local memScan = createMemScan()
 
  local fl      = createFoundList(memScan)
 
 
  memscan_firstScan(memScan,soValueBetween, vtDouble, rtTruncated,input1, input2,
 
                    '0', '7fffffff', "+W-C", fsmAligned ,"4" , false , true, false, false)
 
 
  memscan_waitTillDone(memScan)
 
  foundlist_initialize(fl)
 
 
  local count = foundlist_getCount(fl)
 
 
  if count > 0 then
 
    for i=0,count-1 do
 
      result_table[i+1] = foundlist_getAddress(fl,i)
 
    end
 
  end
 
 
  object_destroy(fl)
 
  object_destroy(memScan)
 
 
  return result_table
 
end
 
 
results = FirstScanValueBetween('1.1', '1.2')
 
 
for i=1,#results do
 
  print('found address: '..results[i])
 
end
 
 
for i=1,#results do
 
                  fullAccess(results[i], 8)
 
 writeDouble(results[i], 2.0)
 
 
  if (success~=true) then print('failed writing to: '..results[i]) end
 
end | 	  
  Last edited by Firered on Tue Jun 26, 2012 11:46 pm; edited 2 times in total | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Firered Cheater
  Reputation: 0
  Joined: 22 May 2012 Posts: 26
 
  | 
		
			
				 Posted: Mon Jun 25, 2012 9:13 am    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				I'm trying but  this not work
  Last edited by Firered on Tue Jun 26, 2012 11:47 pm; edited 2 times in total | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Firered Cheater
  Reputation: 0
  Joined: 22 May 2012 Posts: 26
 
  | 
		
			
				 Posted: Tue Jun 26, 2012 9:29 am    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				this is my error writedouble..
  Last edited by Firered on Tue Jun 26, 2012 11:48 pm; edited 2 times in total | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		mgr.inz.Player I post too much
  Reputation: 222
  Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
  | 
		
			
				 Posted: Tue Jun 26, 2012 11:47 am    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				 	  | Code: | 	 		  function FirstScanValueBetween(input1, input2)
 
 
  local result_table = {}
 
 
 
  local memScan = createMemScan()
 
  local fl      = createFoundList(memScan)
 
 
  memscan_firstScan(memScan,soValueBetween, vtDouble, rtTruncated,input1, input2,
 
                    '0', '7fffffff', "+W-C", fsmAligned ,"4" , false , true, false, false)
 
 
  memscan_waitTillDone(memScan)
 
  foundlist_initialize(fl)
 
 
  local count = foundlist_getCount(fl)
 
 
  if count > 0 then
 
    for i=0,count-1 do
 
      result_table[i+1] = foundlist_getAddress(fl,i)
 
    end
 
  end
 
 
  object_destroy(fl)
 
  object_destroy(memScan)
 
 
  return result_table
 
end
 
 
results = FirstScanValueBetween('1.1', '1.2')
 
 
--print
 
for i=1,#results do
 
  print('found address: '..results[i])
 
end
 
 
--overwrite with 2.0
 
for i=1,#results do
 
                  fullAccess(results[i], 8)
 
  local success = writeDouble(results[i], 2.0)
 
 
  if (success~=true) then print('failed writing to: '..results[i]) end
 
end | 	  
 
 
note: it uses startAddress:0 and endAddress:7fffffff. Change that to your liking.
 _________________
  | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Firered Cheater
  Reputation: 0
  Joined: 22 May 2012 Posts: 26
 
  | 
		
			
				 Posted: Tue Jun 26, 2012 10:02 pm    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				| thx for help me
 | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Firered Cheater
  Reputation: 0
  Joined: 22 May 2012 Posts: 26
 
  | 
		
			
				 Posted: Fri Jun 29, 2012 9:54 am    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				how i can return the values of the double as it was before in this script?
 
 
I tried to use replaceAOB and restoreAOB but it did not work
 | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		 |