[Tool] Waypointer / Helper

03/28/2010 17:40 Dani1406#1
Ich habe ein kleines Skript erstellt das Die aktuelle Position eures Charackteres anzeigt und auf Wunsch in einer INI Datei speichert. Die aktuellen MausPositionen werden auch angeziegt :)

Skript
Code:
#include <includes\Nomadmemory.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#include <file.au3>

Opt ("MouseCoordMode", 1)
Opt ("TrayAutoPause", 0)

HotKeySet ("{Pause}", "Stop")
HotKeySet ("{space}", "Write")

$Paused = 0
$Paus = 0
Const $xp = IniRead ("Funcs.ini","Funcs","POSX","Not found") 	; x Position
Const $yp = IniRead ("Funcs.ini","Funcs","POSY","Not found") 	; y Position

;##################################################################
$Form2 = GUICreate("Helper", 150, 230, 169, 238)                 ;#
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::;;;;;;;#
                                                                 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::;;;;;;;#
		GUICtrlCreateGroup ( "Char-Position", 3, 3, 144, 95) 
			$x1 = GUICtrlCreateInput ("", 30, 20, 110, 20)  	 ;#
				GUICtrlSetFont ( $x1, 8)						 ;#
					$x2 = GUICtrlCreateLabel ("X:", 5, 20)  	 ;#
						GUICtrlSetFont ( $x2, 14)				 ;#
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::;;;;;;;#				
			$y1 = GUICtrlCreateInput ("", 30, 45, 110, 20)  	 ;#
				GUICtrlSetFont ( $y1, 8)                         ;#
					$y2 = GUICtrlCreateLabel ("Y:", 5, 45)       ;#
						GUICtrlSetFont ( $y2, 14)                ;#
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::::#
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::::#	
		GUICtrlCreateGroup ( "Mouse-Position", 3, 90, 144, 95) 
			$mx = GUICtrlCreateInput ("", 30, 107, 110, 20)  	 ;#
				GUICtrlSetFont ( $mx, 8)                         ;#
					$mx1 = GUICtrlCreateLabel ("X:", 5, 107)     ;#
						GUICtrlSetFont ( $mx1, 14)               ;#
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::;;;;;;;#				
			$my = GUICtrlCreateInput ("", 30, 132, 110, 20)  	 ;#
				GUICtrlSetFont ( $y1, 8)                         ;#
					$my1 = GUICtrlCreateLabel ("Y:", 5, 132)     ;#
						GUICtrlSetFont ( $my1, 14)               ;#
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::::#
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#
		$PauseOff = GUICtrlCreateButton ( "Start", 0, 190, 150, 20);#
			GUICtrlSetState ( $PauseOff, $Gui_Disable)			 ;#
																 ;#
		$PauseOn = GUICtrlCreateButton ( "Stop", 0, 210, 150, 20)  ;#	
		$Save = GUICtrlCreateButton ( "Save", 35, 70, 100, 20)
																 ;#	
Guisetstate (@sw_show)                                           ;#
WinSetOnTop ( "Helper", "", 1 )
;##################################################################

While 1
	Sleep (10)
	$msg = GUIGetMsg ()
	
	$Pid = ProcessExists ("Gw.exe")
	$Open = _MemoryOpen($Pid)	           
	$out1 = _MemoryRead ($xp, $Open, "float")
	$out2 = _MemoryRead ($yp, $Open, "float")
	GUICtrlSetData ($x1, $out1)
	GUICtrlSetData ($y1, $out2)
	$Pos = MouseGetPos()
	GUICtrlSetData ($mx, $Pos[0])
	GUICtrlSetData ($my, $Pos[1])

	
	Funcs1 ()
	
WEnd
			
			
			
			
Func Stop()
    
					If $Paused = 0 Then
						GUICtrlSetState ( $PauseOn, $GUI_Disable)
						GUICtrlSetState ( $PauseOff, $GUI_Enable)
						$Paused = 1
					ElseIf $Paused = 1 Then
						GUICtrlSetState ( $PauseOff, $GUI_Disable)
						GUICtrlSetState ( $PauseOn, $GUI_Enable)
						$Paused = 0
					EndIf	
						
						Funcs2 ()

EndFunc


Func RSleep ($min, $max)
	$Sleep = Random ($min, $max)
	$out = Sleep ($Sleep)
	Return $Sleep
EndFunc		


Func Funcs1 ()
	
	Switch $msg
			
		Case $GUI_EVENT_CLOSE
			Exit
		Case $PauseOn
			GUICtrlSetState ( $PauseOn, $GUI_Disable)
			GUICtrlSetState ( $PauseOff, $GUI_Enable)
			$Paused = 1
					While $Paused = 1
						$msg = GUIGetMsg ()
						Switch $msg
							Case $GUI_EVENT_CLOSE
								Exit
							Case $PauseOff
								GUICtrlSetState ( $PauseOff, $GUI_Disable)
								GUICtrlSetState ( $PauseOn, $GUI_Enable)
								Exitloop
								Sleep (50)
								$Paused = 0
							Case $Save
								$Count = _FileCountLines ("Helper.ini")
								IniWrite ( "Helper.ini", "Position", "Waypoint " & $Count, "   MoveToEx( " & $out1 & ", " & $out2)
						EndSwitch							
					WEnd	
			$Paused = 0 
		Case $Save
			Write ()
	EndSwitch		
		
EndFunc
	
	

Func Funcs2 ()
	
	While $Paused = 1
		$msg = GUIGetMsg ()
		Switch $msg
			Case $GUI_EVENT_CLOSE
				Exit
			Case $PauseOff
				GUICtrlSetState ( $PauseOff, $GUI_Disable)
				GUICtrlSetState ( $PauseOn, $GUI_Enable)
				$Paused = 0
				Exitloop
				Sleep (50)
			Case $Save
				Write ()
		EndSwitch	
	WEnd		
	
EndFunc	

			

Func Write ()
	$Count = _FileCountLines ("Helper.ini")
	IniWrite ( "Helper.ini", "Position", "Waypoint " & $Count, "   MoveToEx( " & $out1 & ", " & $out2)
EndFunc
MfG Daniel
03/30/2010 21:09 kaffetasse99#2
also bei mir kommt da dass ein fehler mit der NoMadmemory datei is. Bzw dass sie nich funkt und ich habs jetzt auch schon mehrmals probiert mit dem einfügen bzw gleichen ordnern etc aber geht nich . Weißte da weiter?
03/30/2010 22:27 Dani1406#3
ehmm da steht doch
#include <includes\Nomadmemory.au3>
also sollte dort ein Ordner namens includes mit der nomad memory.au3 sein ^^
oder änder das einfach in
#include <Nomadmemory.au3>
um ^^

Ahja ein thx wär auch nett :P

MfG Daniel
04/08/2010 10:49 Ravenous1981#4
Also wenn du schon die Maus Coords mit rein tust dann mache sie doch Fensterspezifisch! und nicht einfach nur überall auf dem Desktop...

hoffe du verstehst was ich damit meine ansonsten ganz nett nimm dir aber nen Beispiel an Sync0 Dumper der zeichnet alles auf Koord im fenster Guild Wars X,Y Farben usw...

trotzdem für die mühe ein Lob
04/13/2010 17:28 Dani1406#5
Quote:
Originally Posted by Ravenous1981 View Post
Also wenn du schon die Maus Coords mit rein tust dann mache sie doch Fensterspezifisch! und nicht einfach nur überall auf dem Desktop...

hoffe du verstehst was ich damit meine ansonsten ganz nett nimm dir aber nen Beispiel an Sync0 Dumper der zeichnet alles auf Koord im fenster Guild Wars X,Y Farben usw...

trotzdem für die mühe ein Lob
Naja war eine Arbeit von 30 mins ^^ Aber trotzdem thx :P

Vorher hatte ich es auch so eingestellt jdoch waren es die koordinaten von meinem tool fenster. Hatte keine zeit in der hilfedatei nachzuschauen wie man das mit mauscoords in anderen Fenstern macht :P

Vllt mach ich morgen oder übermorgen ein update (mehr funktionen und so.)


MfG Daniel