|
You last visited: Today at 22:46
Advertisement
Problem bei Bot
Discussion on Problem bei Bot within the Nostale forum part of the MMORPGs category.
12/28/2009, 15:53
|
#1
|
elite*gold: 0
Join Date: Feb 2009
Posts: 104
Received Thanks: 7
|
Problem bei Bot
Also ich habe hier mein LV Bot,aber da muss irgendwas falsch sein weil mein Chara im spiel nicht angreift und daher konnte ich auich nicht testen ob es mit den hinsetztenund soo weiter funtz.
Quote:
Global $Paused
$running = false
HotKeySet("{PAUSE}", "TogglePause")
#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_1 = GUICreate("NosTale Bot by cCcBoZkurTcCc", 301, 552, 190, 123)
$Adressen = GUICtrlCreateGroup("Adressen", 25, 8, 249, 97)
$h = GUICtrlCreateInput("", 73, 32, 177, 21)
$HP = GUICtrlCreateLabel("HP", 41, 32, 19, 17)
$m = GUICtrlCreateInput("", 73, 72, 177, 21)
$MP = GUICtrlCreateLabel("MP", 41, 72, 19, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Aufsammeln = GUICtrlCreateGroup("Aufsammeln", 25, 120, 249, 73)
$aufsammel = GUICtrlCreateInput("", 129, 136, 129, 21)
$Aufsammeltaste = GUICtrlCreateLabel("Aufsammeltaste", 41, 136, 78, 17)
$Aktivieren = GUICtrlCreateCheckbox("Aktivieren", 41, 168, 97, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Hinsetzen = GUICtrlCreateGroup("Hinsetzen", 25, 208, 249, 49)
$setzen = GUICtrlCreateInput("", 129, 224, 129, 21)
$Hinsetztaste = GUICtrlCreateLabel("Hinsetztaste", 41, 224, 62, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$SonstigeEinstellungen = GUICtrlCreateGroup("Sonstige Einstellungen", 25, 280, 249, 153)
$minhp = GUICtrlCreateInput("", 90, 304, 167, 21)
$MinHP = GUICtrlCreateLabel("MinHP", 41, 304, 36, 17)
$maxhp = GUICtrlCreateInput("", 89, 336, 169, 21)
$MaxHP = GUICtrlCreateLabel("MaxHP", 41, 336, 39, 17)
$minmp = GUICtrlCreateInput("", 89, 368, 169, 21)
$MinMP = GUICtrlCreateLabel("MinMP", 41, 368, 37, 17)
$maxmp = GUICtrlCreateInput("", 89, 400, 169, 21)
$MaxMP = GUICtrlCreateLabel("MaxMP", 41, 400, 40, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Steuerung = GUICtrlCreateGroup("Steuerung", 25, 448, 249, 89)
$START = GUICtrlCreateButton("START", 41, 472, 217, 25, $WS_GROUP)
$PAUSE = GUICtrlCreateButton("PAUSE", 41, 504, 217, 25, $WS_GROUP)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$windowname = "NosTale"
$minHP = GUICtrlRead($minhp)
$maxHP = GUICtrlRead($maxhp)
$minMP = GUICtrlRead($minmp)
$maxMP = GUICtrlRead($maxmp)
$SPA = GUICtrlRead($HP)
$SPP = GUICtrlRead($MP)
$sk = GUICtrlRead($setzen)
$lk = GUICtrlRead($aufsammel)
func startstop()
$running = NOT $running
EndFunc
Func TogglePause()
$Paused = Not $Paused
While $Paused
Sleep(100)
WEnd
EndFunc
func checkHP()
$SPA = "0x1E5E29C"
$pid = WinGetProcess($windowname) ; hier besorge ich die PID
;open the process
$ProcessInformation = _MemoryOpen($pid)
$Number = _MemoryRead($SPA, $ProcessInformation)
_MemoryClose($ProcessInformation)
return $Number
EndFunc
func checkMP()
$SPP = "0x1E5E29C"
$pid = WinGetProcess($windowname) ; hier besorge ich die PID
;open the process
$ProcessInformation = _MemoryOpen($pid)
$Number = _MemoryRead($SPP, $ProcessInformation)
_MemoryClose($ProcessInformation)
return $Number
EndFunc
func loot()
if BitAnd(GUICtrlRead($Aktivieren), $GUI_CHECKED) THEN
ControlSend($windowname, '', '', $lk)
Else
;NIX TUN --> WEIL NICHT AUSGEWÄHLT
EndIf
ControlSend($windowname, '', '', $lk)
EndFunc
func attack()
ControlSend($windowname, '', '', "{SPACE}")
EndFunc
func doSleep()
ControlSend($windowname, '', '', $sk)
while(checkHP()<$maxHP)
sleep(500)
WEnd
ControlSend($windowname, '', '', $sk)
EndFunc
func doSleep1()
ControlSend($windowname, '', '', $sk)
while(checkMP()<$maxMP)
sleep(500)
WEnd
ControlSend($windowname, '', '', $sk)
EndFunc
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $START
startstop()
Case $PAUSE
TogglePause()
EndSwitch
if $running == True Then
if(checkHP()<$minHP) Then
doSleep()
EndIf
if(checkMP()<$minMP) Then
doSleep1()
EndIf
attack()
loot()
EndIf
WEnd
|
|
|
|
12/28/2009, 16:12
|
#2
|
elite*gold: 20
Join Date: Feb 2009
Posts: 1,199
Received Thanks: 2,545
|
Da es so ziemlich der Code aus meinem Tutorial ist würde ich dir empfehlen das Tutorial einfach nochmals genauer anzusehen.
|
|
|
12/28/2009, 18:10
|
#3
|
elite*gold: 0
Join Date: Feb 2009
Posts: 104
Received Thanks: 7
|
 Ja das ist der Code aus deinem Tutorial!
Aber bei deinem ist daa auch ein fehler er lies die hp addresse glaub nicht weil bei mir habe ich sie 3 mal geprüft ob meine stimmt und habe sie bei dir eingegeben und es hat nicht gefunzt.
Naja bei meinem ist ja das problem das bei mir kein Space an Nostale geschickt wird und daher kann ich auch nicht prüfen ob da was faösch ist kann es sein das es an dem start button liegt oder irgendwas falsch bei controlsend ist !!!
NetMax habe dein Tutorial schon 5 mal durchgelesen aber fand den Fehler nicht!
Bei meinem ist ja nur MP noch dabei !!!
NetMax kannst du das bitte ma durch gucken Bitte
Achja und könnte man teoretisch einfach den base pointer und den base offset da rein schreiben und wie könnte ich das mit dem speichern machen das nervt jedes mal alles neu rein zu schreiben
und wie macht man das dann mit skills
also wie müsste ich die einsetzten!
Wäre sehr lieb!!
Thx im Vorraus!!
|
|
|
12/28/2009, 22:51
|
#4
|
elite*gold: 1
Join Date: Feb 2009
Posts: 834
Received Thanks: 803
|
Wenn ich mir das aunschaue hast du ziemlich viele Funktionen ô.o xD
*etwas verwirrt bin*
z.B. das Du für
ControlSend($windowname, '', '', "{SPACE}")
nen eigene Funktion nimmst ^-^
Hab grad net den Link aba schau dir vlt ma den Opensource vom RedBot an!
|
|
|
12/29/2009, 13:16
|
#5
|
elite*gold: 0
Join Date: Feb 2009
Posts: 104
Received Thanks: 7
|
13tROjan13
thx Aber hat mich nicht weiter gebracht
Kann mir jemand denn nun diese fragen beantworten ?
|
|
|
12/30/2009, 15:52
|
#6
|
elite*gold: 1
Join Date: Feb 2009
Posts: 834
Received Thanks: 803
|
Code:
Global $Paused
$running = false
HotKeySet("{PAUSE}", "TogglePause")
#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_1 = GUICreate("NosTale Bot by cCcBoZkurTcCc", 301, 552, 190, 123)
$Adressen = GUICtrlCreateGroup("Adressen", 25, 8, 249, 97)
$h = GUICtrlCreateInput("", 73, 32, 177, 21)
$HP = GUICtrlCreateLabel("HP", 41, 32, 19, 17)
$m = GUICtrlCreateInput("", 73, 72, 177, 21)
$MP = GUICtrlCreateLabel("MP", 41, 72, 19, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Aufsammeln = GUICtrlCreateGroup("Aufsammeln", 25, 120, 249, 73)
$aufsammel = GUICtrlCreateInput("", 129, 136, 129, 21)
$Aufsammeltaste = GUICtrlCreateLabel("Aufsammeltaste", 41, 136, 78, 17)
$Aktivieren = GUICtrlCreateCheckbox("Aktivieren", 41, 168, 97, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Hinsetzen = GUICtrlCreateGroup("Hinsetzen", 25, 208, 249, 49)
$setzen = GUICtrlCreateInput("", 129, 224, 129, 21)
$Hinsetztaste = GUICtrlCreateLabel("Hinsetztaste", 41, 224, 62, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$SonstigeEinstellungen = GUICtrlCreateGroup("Sonstige Einstellungen", 25, 280, 249, 153)
$minhp = GUICtrlCreateInput("", 90, 304, 167, 21)
$MinHP = GUICtrlCreateLabel("MinHP", 41, 304, 36, 17)
$maxhp = GUICtrlCreateInput("", 89, 336, 169, 21)
$MaxHP = GUICtrlCreateLabel("MaxHP", 41, 336, 39, 17)
$minmp = GUICtrlCreateInput("", 89, 368, 169, 21)
$MinMP = GUICtrlCreateLabel("MinMP", 41, 368, 37, 17)
$maxmp = GUICtrlCreateInput("", 89, 400, 169, 21)
$MaxMP = GUICtrlCreateLabel("MaxMP", 41, 400, 40, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Steuerung = GUICtrlCreateGroup("Steuerung", 25, 448, 249, 89)
$START = GUICtrlCreateButton("START", 41, 472, 217, 25, $WS_GROUP)
$PAUSE = GUICtrlCreateButton("PAUSE", 41, 504, 217, 25, $WS_GROUP)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $START
$windowname = "NosTale"
$minHP = GUICtrlRead($minhp)
$maxHP = GUICtrlRead($maxhp)
$minMP = GUICtrlRead($minmp)
$maxMP = GUICtrlRead($maxmp)
$SPA = GUICtrlRead($HP)
$SPP = GUICtrlRead($MP)
$sk = GUICtrlRead($setzen)
$lk = GUICtrlRead($aufsammel)
startstop()
Case $PAUSE
TogglePause()
EndSwitch
if $running == True Then
if(checkHP()<$minHP) Then
doSleep()
EndIf
if(checkMP()<$minMP) Then
doSleep1()
EndIf
attack()
loot()
EndIf
WEnd
func startstop()
$running = NOT $running
EndFunc
Func TogglePause()
$Paused = Not $Paused
While $Paused
Sleep(100)
WEnd
EndFunc
func checkHP()
$SPA = "0x1E5E29C"
$pid = WinGetProcess($windowname) ; hier besorge ich die PID
;open the process
$ProcessInformation = _MemoryOpen($pid)
$Number = _MemoryRead($SPA, $ProcessInformation)
_MemoryClose($ProcessInformation)
return $Number
EndFunc
func checkMP()
$SPP = "0x1E5E29C"
$pid = WinGetProcess($windowname) ; hier besorge ich die PID
;open the process
$ProcessInformation = _MemoryOpen($pid)
$Number = _MemoryRead($SPP, $ProcessInformation)
_MemoryClose($ProcessInformation)
return $Number
EndFunc
func loot()
if BitAnd(GUICtrlRead($Aktivieren), $GUI_CHECKED) THEN
ControlSend($windowname, '', 0, $lk)
Else
;NIX TUN --> WEIL NICHT AUSGEWÄHLT
EndIf
ControlSend($windowname, '',0, $lk)
EndFunc
func attack()
ControlSend($windowname, '', 0, "{SPACE}")
EndFunc
func doSleep()
ControlSend($windowname, '', 0, $sk)
while(checkHP()<$maxHP)
sleep(500)
WEnd
ControlSend($windowname, '', 0, $sk)
EndFunc
func doSleep1()
ControlSend($windowname, '', 0, $sk)
while(checkMP()<$maxMP)
sleep(500)
WEnd
ControlSend($windowname, '',0, $sk)
EndFunc
Versuchs so mal! Ich glaub du hast die Input direkt am Anfang ausgelesen und nich erst wenn Start gedrückt wird!
|
|
|
Similar Threads
|
[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:47.
|
|