Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 18:04

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Need help :S AutoIT Trainer doesnt work

Discussion on Need help :S AutoIT Trainer doesnt work within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2012
Posts: 709
Received Thanks: 53
Exclamation Need help :S AutoIT Trainer doesnt work

Hey,






This is what my trainer looks like. It only has currently 1 adress which is static.


The problem with this is, that it wont work.


I start the game and try to change the value (Its working in CE and CE Debugger.)

But everytime when i start this hack, it wont change the value.
(I can see in CE that its not changing.)


Please help me :S


Thanks!
Split
SplitEditing is offline  
Old 02/19/2014, 15:14   #2
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
No ****, of course it won't work. You're sleeping over and over again if the process is there. Instead of that you should use
Code:
While Not ProcessExists("MicroVolts.exe")
Sleep(100)
WEnd
alpines is offline  
Old 02/19/2014, 15:15   #3
 
elite*gold: 0
Join Date: Nov 2012
Posts: 709
Received Thanks: 53
Quote:
Originally Posted by alpines View Post
No ****, of course it won't work. You're sleeping over and over again if the process is there. Instead of that you should use
Code:
While Not ProcessExists("MicroVolts.exe")
Sleep(100)
WEnd
Oh I failed that one


I will test in 1 min thanks!

Still not working :S
SplitEditing is offline  
Old 02/19/2014, 15:38   #4
 
lolkop's Avatar
 
elite*gold: 280
Join Date: May 2007
Posts: 2,818
Received Thanks: 3,483
Quote:
Originally Posted by alpines View Post
No ****, of course it won't work. You're sleeping over and over again if the process is there. Instead of that you should use
Code:
While Not ProcessExists("MicroVolts.exe")
Sleep(100)
WEnd
or use the function which does exactly that:
Code:
ProcessWait("MicroVolts.exe")
lolkop is offline  
Old 02/19/2014, 16:23   #5
 
elite*gold: 0
Join Date: Nov 2012
Posts: 709
Received Thanks: 53
Quote:
Originally Posted by lolkop View Post
or use the function which does exactly that:
Code:
ProcessWait("MicroVolts.exe")
Thanks, but its still not working :S
SplitEditing is offline  
Old 02/19/2014, 16:57   #6
 
mlukac89's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 473
Received Thanks: 104
Try this

Code:
#RequireAdmin
#include <NomadMemory.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>

$Form1 = GUICreate("Form1", 276, 51, 192, 124)
$Input1 = GUICtrlCreateInput("Enter new speed !", 16, 16, 121, 21)
$Button1 = GUICtrlCreateButton("Change speed !", 144, 16, 121, 25)
GUISetState(@SW_SHOW)

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		Case $Button1
			; check if process is running
			If ProcessExists("MicroVolts.exe") Then
				_hack()
			Else 
				; if process is not running show error message
				MsgBox(0, "Error", "Process not exists")
			EndIf

	EndSwitch
WEnd

Func _hack()
	$Open = _MemoryOpen(ProcessExists("MicroVolts.exe"))
	$Adresse = 0x00FFEA10
	$Read = _MemoryRead($Adresse, $Open, 'Float')
	$Write = _MemoryWrite($Adresse, $Open, GUICtrlRead($Input1), 'Float') ; GUICtrlRead($Input1) - reads data you enter from input field
EndFunc
mlukac89 is offline  
Old 02/19/2014, 17:27   #7
 
elite*gold: 0
Join Date: Nov 2012
Posts: 709
Received Thanks: 53
Exclamation

Quote:
Originally Posted by mlukac89 View Post
Try this

Code:
#RequireAdmin
#include <NomadMemory.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>

$Form1 = GUICreate("Form1", 276, 51, 192, 124)
$Input1 = GUICtrlCreateInput("Enter new speed !", 16, 16, 121, 21)
$Button1 = GUICtrlCreateButton("Change speed !", 144, 16, 121, 25)
GUISetState(@SW_SHOW)

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		Case $Button1
			; check if process is running
			If ProcessExists("MicroVolts.exe") Then
				_hack()
			Else 
				; if process is not running show error message
				MsgBox(0, "Error", "Process not exists")
			EndIf

	EndSwitch
WEnd

Func _hack()
	$Open = _MemoryOpen(ProcessExists("MicroVolts.exe"))
	$Adresse = 0x00FFEA10
	$Read = _MemoryRead($Adresse, $Open, 'Float')
	$Write = _MemoryWrite($Adresse, $Open, GUICtrlRead($Input1), 'Float') ; GUICtrlRead($Input1) - reads data you enter from input field
EndFunc
Thanks!

But it still doesnt work o.O
SplitEditing is offline  
Old 02/19/2014, 17:33   #8
 
mlukac89's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 473
Received Thanks: 104
What dont work ? Memory ?

Try to comment this line
Code:
 ; $Read = _MemoryRead($Adresse, $Open, 'Float')
U dont need to read memory just write

Try this code i maded you to read data in label so u can see current speed too but if it dont show then is problem with your base adress

Code:
#RequireAdmin
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <NomadMemory.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 197, 131, 231, 167)
$Label1 = GUICtrlCreateLabel("Current speed : ", 8, 8, 79, 17)
$currentSpeed = GUICtrlCreateLabel("", 88, 8, 68, 17)
$Input1 = GUICtrlCreateInput("", 96, 37, 89, 21)
$Label2 = GUICtrlCreateLabel("Enter new speed", 8, 40, 84, 17)
$Button1 = GUICtrlCreateButton("Start", 8, 72, 179, 49)
GUICtrlSetFont(-1, 11, 800, 0, "Verdana")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

Global $Adresse = 0x00FFEA10 ; base adress

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit

		Case $Button1
			; check if process is running
			If ProcessExists("MicroVolts.exe") Then
				_hack()
			Else
				; if process is not running show error message
				MsgBox(0, "Error", "Process not exists")
			EndIf

	EndSwitch

	_read() ; read data in GUI

WEnd

Func _hack()
	$Open = _MemoryOpen(ProcessExists("MicroVolts.exe"))
	$Write = _MemoryWrite($Adresse, $Open, GUICtrlRead($Input1), 'Float')
EndFunc

Func _read()
	$Open = _MemoryOpen(ProcessExists("MicroVolts.exe"))
	$Read = _MemoryRead($Adresse, $Open, 'Float')
	GUICtrlSetData($currentSpeed, $Read)
EndFunc
mlukac89 is offline  
Old 02/19/2014, 17:51   #9
 
YatoDev's Avatar
 
elite*gold: 50
Join Date: Sep 2012
Posts: 3,841
Received Thanks: 1,462
do you get an error ?
Mayby try 0xFFEA10 and not 0x00FFEA10
YatoDev is offline  
Old 02/19/2014, 18:06   #10
 
lolkop's Avatar
 
elite*gold: 280
Join Date: May 2007
Posts: 2,818
Received Thanks: 3,483
you might try to cut out the **** and use a simple errorhandling instead...
Code:
GUICreate("gui", 276, 51, Default, Default, 0x10C80000)
$input = GUICtrlCreateInput("Enter new speed!", 16, 16, 121, 21)
$btn = GUICtrlCreateButton("Change speed!", 144, 16, 121, 25)

While True
	Switch GUIGetMsg()
		Case -3
			Exit
		Case $btn
			$handle = OpenProcess(ProcessExists("MicroVolts.exe"))
			WriteProcessMemory($handle, 0xFFEA10, 400, "float")
			CloseHandle($handle)
	EndSwitch
WEnd

Func OpenProcess($pid)
	Local $x = DllCall('kernel32.dll', 'int', 'OpenProcess', 'int', 0x1F0FFF, 'int', 1, 'int', $pid)
	Local $e = GetLastError()
	If $e<>0 Then MsgBox(16, "Error", "OpenProcess("&$pid&")"&@CRLF&"Error: "&$e)
	Return $x[0]
EndFunc

Func WriteProcessMemory($process_hwnd, $adress, $data, $type = 'binary')
	Local $struct= DllStructCreate($type)
	DllStructSetData($struct, 1, $data)
	DllCall('kernel32.dll', 'int', 'WriteProcessMemory', 'int', $process_hwnd, 'int', $adress, 'int', DllStructGetPtr($struct), 'int', DllStructGetSize($struct), 'int', 0)
	Local $e = GetLastError()
	If $e<>0 Then MsgBox(16, "Error", "WriteProcessMemory("&$process_hwnd&', 0x'&Hex($adress)&', '&$data&', '&$type&")"&@CRLF&"Error: "&$e)
EndFunc

Func CloseHandle($hwnd)
	DllCall('kernel32.dll', 'int', 'CloseHandle', 'int', $hwnd)
	Local $e = GetLastError()
	If $e<>0 Then MsgBox(16, "Error", "CloseHandle("&$hwnd&")"&@CRLF&"Error: "&$e)
EndFunc

Func GetLastError()
	Local $x = DllCall('kernel32.dll', 'int', 'GetLastError')
	Return $x[0]
EndFunc
Edit:
Error infos are listed here:
lolkop is offline  
Old 03/02/2014, 13:18   #11
 
elite*gold: 0
Join Date: Aug 2013
Posts: 2
Received Thanks: 0
Wow, never seen so much unnecessary code...

it only takes 7 lines of code to make this work
Binaric is offline  
Old 03/02/2014, 13:22   #12
 
TheΚυριαρ's Avatar
 
elite*gold: 0
Join Date: Mar 2014
Posts: 39
Received Thanks: 46
While Not ProcessExists("MicroVolts.exe")
WEnd
TheΚυριαρ is offline  
Old 03/02/2014, 13:43   #13
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
Quote:
Originally Posted by TheΚυριαρ View Post
While Not ProcessExists("MicroVolts.exe")
WEnd
Quote:
Originally Posted by alpines View Post
No ****, of course it won't work. You're sleeping over and over again if the process is there. Instead of that you should use
Code:
While Not ProcessExists("MicroVolts.exe")
Sleep(100)
WEnd
You know that this was posted much earlier? You're just post hunting.
alpines is offline  
Old 03/02/2014, 17:46   #14
 
lolkop's Avatar
 
elite*gold: 280
Join Date: May 2007
Posts: 2,818
Received Thanks: 3,483
Quote:
Originally Posted by Binaric View Post
Wow, never seen so much unnecessary code...

it only takes 7 lines of code to make this work
so prove your statement by posting an errorhandling code for writing other processes memory, including a simple gui, in 7 lines of code... <.<
lolkop is offline  
Reply


Similar Threads Similar Threads
AUTOIT - script using pixel search doesnt work properly
08/11/2011 - AutoIt - 2 Replies
I have posted again triying to explain better wich is my problem. My level of english is very low and a friend is helping me to express my problem i got whith the script. Is the secon time i post the same please apologize me , and delete old post because here everyone will understand better what i am asking , and what i need. I have done a bot that must be running all time. It has 2 diferents parts. Part 1 must do :
Why Doesnt My 7.4 Cytriik Trainer work? ENGLISH ONLY
05/20/2011 - S4 League Hacks, Bots, Cheats & Exploits - 6 Replies
Well im having problems with this like this.First i log into s4league sucesfully after i hit F11 Then a Menu Pops up after i click and item an error comes up its German i cant understand it then after i get what ever i need later on i press Ready Then somehow 2secs later my S4league starts to crash could someone help me with this pRoblem?



All times are GMT +2. The time now is 18:04.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.