|
You last visited: Today at 22:02
Advertisement
Problem!
Discussion on Problem! within the AutoIt forum part of the Coders Den category.
06/11/2010, 16:19
|
#1
|
elite*gold: 0
Join Date: Sep 2009
Posts: 531
Received Thanks: 1,775
|
Problem!
Hallo leute ich habe ein Problem und zwar:
Wie mmache ich das er bei einer Label die Koordinaten anzeigt? X und Y? also das sie sich immer verändern wen ich mich bewege usw... pointer habe ich schonn
thx für help
|
|
|
06/11/2010, 16:56
|
#2
|
elite*gold: 0
Join Date: Nov 2009
Posts: 927
Received Thanks: 1,317
|
Quote:
Originally Posted by italien1995
Hallo leute ich habe ein Problem und zwar:
Wie mmache ich das er bei einer Label die Koordinaten anzeigt? X und Y? also das sie sich immer verändern wen ich mich bewege usw... pointer habe ich schonn
thx für help
|
Probier's mal mit GUICtrlSetData()
|
|
|
06/11/2010, 17:05
|
#3
|
elite*gold: 0
Join Date: Sep 2009
Posts: 531
Received Thanks: 1,775
|
wie guictrlsetdate nehmen wir mal an ich hab soo nnen code
$Label1 ("0")
$Label2 ("0")
Wie füge ich das dan in den script ein wen der benutzer sehen will wo er gerade ist also z.b. 5319 oder so bei X und bei Y 1090
was mus ich in die klammer schreiben?
|
|
|
06/11/2010, 17:27
|
#4
|
elite*gold: 0
Join Date: Nov 2009
Posts: 927
Received Thanks: 1,317
|
Quote:
Originally Posted by italien1995
wie guictrlsetdate nehmen wir mal an ich hab soo nnen code
$Label1 ("0")
$Label2 ("0")
Wie füge ich das dan in den script ein wen der benutzer sehen will wo er gerade ist also z.b. 5319 oder so bei X und bei Y 1090
was mus ich in die klammer schreiben?
|
Also, nehmen wir mal an, du liest die Koordinaten aus der Memory, etwa so:
PHP Code:
$Position_X = _Memorypointerread()
$Position_Y = _Memorypointerread()
dann kannst du über diese Variablen die Positionen setzen
PHP Code:
GUICtrlSetData($Label1, $Position_X[1])
GUICtrlSetData($Label2, $Position_Y[1])
|
|
|
06/11/2010, 17:36
|
#5
|
elite*gold: 0
Join Date: Sep 2009
Posts: 531
Received Thanks: 1,775
|
Will nicht sorichtig funken  haste vll skype dan kanste ja mal adden sunnybaer11
|
|
|
06/11/2010, 17:41
|
#6
|
elite*gold: 0
Join Date: Nov 2009
Posts: 927
Received Thanks: 1,317
|
Quote:
Originally Posted by italien1995
Will nicht sorichtig funken  haste vll skype dan kanste ja mal adden sunnybaer11
|
Kein Skype, sorry
|
|
|
06/11/2010, 17:44
|
#7
|
elite*gold: 0
Join Date: Sep 2009
Posts: 531
Received Thanks: 1,775
|
$Label10 = GUICtrlCreateLabel("X", 448, 232, 11, 17)
GUICtrlSetColor(-1, 0x00FF00)
$Label21 = GUICtrlCreateLabel("Y", 448, 264, 11, 17)
pointer dafür habe ich schon aber wie geht dass?  iwie funkt es nicht erklärs mal mit denen
|
|
|
06/11/2010, 18:18
|
#8
|
elite*gold: 0
Join Date: Nov 2009
Posts: 927
Received Thanks: 1,317
|
Du brauchst nur folgendes in deine Hauptschleife einfügen:
PHP Code:
$Pos_X = _memorypointerread() $Pos_Y = _memorypointerread() Guictrlsetdata($Label10, $Pos_X[1]) Guictrlsetdata($Label21, $Pos_Y[1])
Wenn du mit _MemoryRead() arbeitest, lässt einfach bei $Pos_X und $Pos_Y die [1] weg
Bei den _memorypointerread() mußt du natürlich noch deine Werte (Offset, Pointer und Prozess) ergänzen
|
|
|
06/11/2010, 21:31
|
#9
|
elite*gold: 0
Join Date: Sep 2009
Posts: 531
Received Thanks: 1,775
|
Sry das ich euch nochmal störe aber ich hab nen neues problem ^^ hier source
PHP Code:
Label15 = GUICtrlCreateLabel("Aktueller Standpunkt:", 104, 248, 106, 17)
GUICtrlSetColor(-1, 0x00FF00)
$Label16 = GUICtrlCreateLabel("HP=", 40, 280, 25, 17)
GUICtrlSetColor(-1, 0x00FF00)
$Label17 = GUICtrlCreateLabel("MP=", 160, 280, 25, 33)
GUICtrlSetColor(-1, 0x00FF00)
$Label18 = GUICtrlCreateLabel("700", 72, 280, 40, 17)
GUICtrlSetColor(-1, 0x00FF00)
$Label19 = GUICtrlCreateLabel("400", 192, 280, 40, 17)
Global $HP[3] = [0, ISTMEINSSRY, istMEINSSRY]
Global $MP[3] = [0, ISTMEINSSRY, ISTMeINSSRY]
$HP = _MemorypointerRead($iv_Adress,$ah_Handle,$HP)
Global $AKT_HP = GUICtrlRead($label18)
$MP = _MemorypointerRead($iv_Adress,$ah_Handle,$MP)
global $AKT_MP = GUICtrlRead($label19)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
ExitEndSwitch
If $HP[1] <> $AKT_HP Then
$AKT_HP = $HP[1]
GUICtrlSetData($Label18, $AKT_HP)
EndIf
If $MP[1] <> $AKT_MP Then
$AKT_MP = $MP[1]
GUICtrlSetData($Label19, $AKT_MP)
EndIf
Das prooblem hierbei ist das sich die Werte nicht akutaliesieren z.b. wen ich ein monster angreifen will und leben verliere zeigt er das dorrt nciht an wass ist zutuN?
PLS HELP!
|
|
|
06/11/2010, 22:54
|
#10
|
elite*gold: 0
Join Date: Nov 2009
Posts: 927
Received Thanks: 1,317
|
Quote:
Originally Posted by italien1995
Sry das ich euch nochmal störe aber ich hab nen neues problem ^^ hier source
PHP Code:
Label15 = GUICtrlCreateLabel("Aktueller Standpunkt:", 104, 248, 106, 17)
GUICtrlSetColor(-1, 0x00FF00)
$Label16 = GUICtrlCreateLabel("HP=", 40, 280, 25, 17)
GUICtrlSetColor(-1, 0x00FF00)
$Label17 = GUICtrlCreateLabel("MP=", 160, 280, 25, 33)
GUICtrlSetColor(-1, 0x00FF00)
$Label18 = GUICtrlCreateLabel("700", 72, 280, 40, 17)
GUICtrlSetColor(-1, 0x00FF00)
$Label19 = GUICtrlCreateLabel("400", 192, 280, 40, 17)
Global $HP[3] = [0, ISTMEINSSRY, istMEINSSRY]
Global $MP[3] = [0, ISTMEINSSRY, ISTMeINSSRY]
$HP = _MemorypointerRead($iv_Adress,$ah_Handle,$HP)
Global $AKT_HP = GUICtrlRead($label18)
$MP = _MemorypointerRead($iv_Adress,$ah_Handle,$MP)
global $AKT_MP = GUICtrlRead($label19)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
ExitEndSwitch
If $HP[1] <> $AKT_HP Then
$AKT_HP = $HP[1]
GUICtrlSetData($Label18, $AKT_HP)
EndIf
If $MP[1] <> $AKT_MP Then
$AKT_MP = $MP[1]
GUICtrlSetData($Label19, $AKT_MP)
EndIf
Das prooblem hierbei ist das sich die Werte nicht akutaliesieren z.b. wen ich ein monster angreifen will und leben verliere zeigt er das dorrt nciht an wass ist zutuN?
PLS HELP!
|
Simpler Fehler! Du liest die Werte nur einmal vor dem While 1 aus der Memory, in der Schleife allerdings nicht mehr. Woher soll dein Script also die aktualisierten Werte haben, wenn es "nur" noch die While-Schleife abarbeitet?
Setz doch einfach vor die jeweilige If-Zeile nochmal die memorypointerreads, etwa so:
PHP Code:
$HP = _MemorypointerRead($iv_Adress,$ah_Handle,$HP)
If $HP[1] <> $AKT_HP Then
$AKT_HP = $HP[1]
GUICtrlSetData($Label18, $AKT_HP)
EndIf
$MP = _MemorypointerRead($iv_Adress,$ah_Handle,$MP)
If $MP[1] <> $AKT_MP Then
$AKT_MP = $MP[1]
GUICtrlSetData($Label19, $AKT_MP)
EndIf
|
|
|
06/12/2010, 09:13
|
#11
|
elite*gold: 0
Join Date: Sep 2009
Posts: 531
Received Thanks: 1,775
|
PHP Code:
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Pointer.au3>
#RequireAdmin
SetPrivilege("SeDebugPrivilege",1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Elitepvpers Test", 153, 71, 192, 127)
$Label1 = GUICtrlCreateLabel("HP=", 8, 8, 25, 17)
$Label2 = GUICtrlCreateLabel("MP=", 8, 40, 26, 17)
$Label3 = GUICtrlCreateLabel("0", 48, 8, 10, 17)
$Label4 = GUICtrlCreateLabel("0", 48, 40, 10, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While ProcessExists("TClient.exe") = False
Sleep ( 700 )
WEnd
Global $pid= ProcessExists("TClient.exe")
If $pid = 0 Then Exit
Global $ah_Handle =_MemoryOpen($pid)
Global $iv_Adress = 0x0686D04
Global $HP[3] = [0, 0xA08, 0x428]
Global $MP[3] = [0, 0xA08, 0x42C]
Global $AKT_HP = GUICtrlRead($label3)
Global $AKT_MP = GUICtrlRead($label4)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Global $AKT_HP = GUICtrlRead($label3)
$HP = _MemorypointerRead($iv_Adress,$ah_Handle,$HP)
If $HP[1] <> $AKT_HP Then
$AKT_HP = $HP[1]
GUICtrlSetData($Label3, $AKT_HP)
EndIf
global $AKT_MP = GUICtrlRead($label4)
$MP = _MemorypointerRead($iv_Adress,$ah_Handle,$MP)
If $MP[1] <> $AKT_MP Then
$AKT_MP = $MP[1]
GUICtrlSetData($Label4, $AKT_MP)
EndIf
EndSwitch
WEnd
Habe so gemacht wie du gesagt hast doch jetzt funkt es garnicht mehr worin liegt das problem habe ich was falsch gemacht?
|
|
|
06/12/2010, 12:00
|
#12
|
elite*gold: 0
Join Date: Nov 2009
Posts: 2,210
Received Thanks: 6,755
|
Code:
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Global $AKT_HP = GUICtrlRead($label3)
$HP = _MemorypointerRead($iv_Adress,$ah_Handle,$HP)
If $HP[1] <> $AKT_HP Then
$AKT_HP = $HP[1]
GUICtrlSetData($Label3, $AKT_HP)
EndIf
global $AKT_MP = GUICtrlRead($label4)
$MP = _MemorypointerRead($iv_Adress,$ah_Handle,$MP)
If $MP[1] <> $AKT_MP Then
$AKT_MP = $MP[1]
GUICtrlSetData($Label4, $AKT_MP)
EndIf
EndSwitch
WEnd
Siehst du deinen Fehler? erst wenn du aufs kreuz geklickt hättest wär es losgegangen dann aber auch nicht wegen dem Exit
Code:
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
Global $AKT_HP = GUICtrlRead($label3)
$HP = _MemorypointerRead($iv_Adress,$ah_Handle,$HP)
If $HP[1] <> $AKT_HP Then
$AKT_HP = $HP[1]
GUICtrlSetData($Label3, $AKT_HP)
EndIf
global $AKT_MP = GUICtrlRead($label4)
$MP = _MemorypointerRead($iv_Adress,$ah_Handle,$MP)
If $MP[1] <> $AKT_MP Then
$AKT_MP = $MP[1]
GUICtrlSetData($Label4, $AKT_MP)
EndIf
WEnd
|
|
|
06/12/2010, 12:15
|
#13
|
elite*gold: 0
Join Date: Sep 2009
Posts: 531
Received Thanks: 1,775
|
ich habs zwar nicht so gemacht wie du es gesagt hast aber bei mir funkt es jetzt  wie würde man es den machen wwen man ein button hat mit leiche teleport?
|
|
|
06/12/2010, 13:29
|
#14
|
elite*gold: 0
Join Date: Nov 2009
Posts: 2,210
Received Thanks: 6,755
|
Quote:
Originally Posted by italien1995
ich habs zwar nicht so gemacht wie du es gesagt hast aber bei mir funkt es jetzt  wie würde man es den machen wwen man ein button hat mit leiche teleport?
|
Ich verstehe deine Frage nicht ;o
|
|
|
06/12/2010, 13:57
|
#15
|
elite*gold: 0
Join Date: Sep 2009
Posts: 531
Received Thanks: 1,775
|
z.b. ich hab x koord und y koord habe offsets davon und pointer, habe ein button mit "TEleport leiceh" z.b. wen man stirbt kan man sich dahin sofort porten wie mache ich das?^^
|
|
|
Similar Threads
|
Metin 2 Pserver Problem/ Lösung für das Matrix Kartennummer Problem
01/04/2010 - Metin2 Private Server - 3 Replies
Hy Leute
Wie in der Überschrift genannt, hab ich gerade ein Problem mit meinem Metin 2Server.
Ich lasse ihn via Loopbackadapter laufen, funktioniert auch ganz gut.
Ich hab aber jetzt das Poblem, das in meinem Account nur noch Krieger mit Level null stehen.
Wie kann ich das Beheben??, das is auch manchmal da, wenn ich via Navicat n neuen Account mach. Hoffe einer hatt ne Lösung
Hab n Screenshot im Anhang
Aber ich hab ja auch ne Lösung für n anderes Problem.
Gestern hatte ich beim...
|
[Problem] Problem with server starting - cannot find quest index for PaxHeader
12/22/2009 - Metin2 Private Server - 1 Replies
Hello!
I have this same problem as here when i'm starting my server:
http://www.elitepvpers.com/forum/metin2-pserver-di scussions-questions/307143-metin2-serverfiles-ques t-index-fehler.html
But I didn't know the answer.. how to repair this?
Greetings
|
All times are GMT +1. The time now is 22:03.
|
|