| View previous topic :: View next topic   | 
	
	
	
		| Author | 
		Message | 
	
	
		ciglipaf How do I cheat?
  Reputation: 0
  Joined: 26 Jul 2015 Posts: 6
 
  | 
		
			
				 Posted: Sun Jul 26, 2015 5:06 pm    Post subject: A Simple hotkey script | 
				       | 
			 
			
				
  | 
			 
			
				I want to make a simple hotkey script, can you help me?
 
 
 
pseudo code:
 
 
 	  | Code: | 	 		  check keystate of "U"
 
   if "U" key is pressed, write this value to the adress
 
   if "U" key is up, write this value to the adress
 
check keystate of "J"
 
   if "J" key is pressed write this value to the adress
 
   if "J" key is up write this value to the adress
 
re-check keystates without waiting (go to top) | 	 
  | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		ciglipaf How do I cheat?
  Reputation: 0
  Joined: 26 Jul 2015 Posts: 6
 
  | 
		
			
				 Posted: Mon Aug 03, 2015 8:34 pm    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				| bump | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Smellyhobo101 Newbie cheater
  Reputation: 0
  Joined: 21 Sep 2014 Posts: 23
 
  | 
		
			
				 Posted: Sun Aug 30, 2015 11:39 pm    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				I guess I'll reply
 
 
 	  | Code: | 	 		  
 
function main() 
 
if isKeyPressed(VK_U) then 
 
   writeInteger(Address, Value)
 
else
 
   writeInteger(Address, Value)
 
end
 
if isKeyPressed(VK_J) then 
 
   writeInteger(Address, Value)
 
else
 
   writeInteger(Address, Value)
 
end 
 
end 
 
 
t = createTimer(nil, false)  -- create a Timer object and assign it to variable t 
 
timer_onTimer(t, main)   -- When the timer ticks, call the function main 
 
timer_setInterval(t, 50) -- Sets the tickrate of the timer in milliseconds 
 
timer_setEnabled(t, true) -- Turns the timer on 
 
 | 	  
 
 
You may have to use writeFloat() or writeBytes() depending on what you're changing. Check the LUA page on the CE wiki to read about those. I'd link it but I don't have the permissions. Also read main.LUA, its in the cheat engine program folder. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		 |