Code:
#include <NomadMemory.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Global $Paused
$running = False
Global $hp_read = 0x123456, $mp_read = 0x123456
$windowname = "NosTale"
If Not WinExists ($windowname) Then
MsgBox (0,"ERROR","Nostale ist nicht an")
Exit
EndIf
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("MagierBot by cCcBozKurTcCc", 635, 447, 193, 124)
$Tab1 = GUICtrlCreateTab(0, 0, 633, 33)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT)
$TabSheet1 = GUICtrlCreateTabItem(" Hauptfenster ")
$Einfaches = GUICtrlCreateGroup("Einfaches Angreifen", 8, 176, 617, 129)
$Start1 = GUICtrlCreateButton("Start", 376, 200, 233, 25, $WS_GROUP)
$Pause1 = GUICtrlCreateButton("Pause", 376, 232, 233, 25, $WS_GROUP)
$Exit1 = GUICtrlCreateButton("Exit", 376, 264, 233, 25, $WS_GROUP)
$Label1 = GUICtrlCreateLabel("Einfaches Angreifen ist das Angreifen mit der", 24, 240, 214, 17)
$Label2 = GUICtrlCreateLabel("Zauberwaffe und das des Skills", 24, 256, 152, 17)
$Label3 = GUICtrlCreateLabel("HP Absorbierung um MP wieder zu laden!!!", 24, 272, 206, 17)
$Potten32 = GUICtrlCreateCheckbox("Potten", 24, 216, 97, 17)
$Checkbox1 = GUICtrlCreateCheckbox("HP und MP berücksichtigen", 24, 200, 153, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Erweitertes = GUICtrlCreateGroup("Erweitertes Angreifen", 8, 312, 617, 129)
$Start2 = GUICtrlCreateButton("Start", 376, 336, 233, 25, $WS_GROUP)
$Pause2 = GUICtrlCreateButton("Pause", 376, 368, 233, 25, $WS_GROUP)
$Exit2 = GUICtrlCreateButton("Exit", 376, 400, 233, 25, $WS_GROUP)
$Potten = GUICtrlCreateCheckbox("Potten", 24, 344, 97, 17)
$Label4 = GUICtrlCreateLabel("Beim Erweitertem Angreifen wird Hp und Mp", 24, 384, 214, 17)
$Label5 = GUICtrlCreateLabel("berücksichtigt und mit Skills angegriffen!!", 24, 408, 196, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group1 = GUICtrlCreateGroup("Status", 16, 80, 609, 89)
$Label6 = GUICtrlCreateLabel("HP :", 32, 104, 25, 17)
$Label7 = GUICtrlCreateLabel(checkHP(), 64, 104, 36, 17)
$Label8 = GUICtrlCreateLabel("MP :", 32, 136, 26, 17)
$Label9 = GUICtrlCreateLabel("", 64, 136, 36, 17)
$Progress1 = GUICtrlCreateProgress(168, 104, 150, 17)
$Progress2 = GUICtrlCreateProgress(168, 136, 150, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$TabSheet2 = GUICtrlCreateTabItem(" Skills ")
$Label1 = GUICtrlCreateLabel("Label1", 200, -24, 36, 17)
$Skillliste = GUICtrlCreateGroup("Skillliste", 8, 136, 617, 305)
$skill1 = GUICtrlCreateCheckbox("1.Skill :", 24, 184, 57, 17)
$skill2 = GUICtrlCreateCheckbox("2.Skill :", 24, 208, 57, 17)
$skill3 = GUICtrlCreateCheckbox("3.Skill :", 24, 232, 57, 17)
$skill4 = GUICtrlCreateCheckbox("4.Skill :", 24, 256, 65, 17)
$skill5 = GUICtrlCreateCheckbox("5.Skill :", 24, 280, 65, 17)
$skill6 = GUICtrlCreateCheckbox("6.Skill :", 24, 304, 65, 17)
$skill7 = GUICtrlCreateCheckbox("7.Skill :", 24, 328, 65, 17)
$skill8 = GUICtrlCreateCheckbox("8.Skill :", 24, 352, 57, 17)
$Input1 = GUICtrlCreateInput("", 120, 184, 241, 21)
$Input2 = GUICtrlCreateInput("", 120, 208, 241, 21)
$Input3 = GUICtrlCreateInput("", 120, 232, 241, 21)
$Input4 = GUICtrlCreateInput("", 120, 256, 241, 21)
$Input5 = GUICtrlCreateInput("", 120, 280, 241, 21)
$Input6 = GUICtrlCreateInput("", 120, 304, 241, 21)
$Input7 = GUICtrlCreateInput("", 120, 328, 241, 21)
$Input8 = GUICtrlCreateInput("", 120, 352, 241, 21)
$Taste = GUICtrlCreateLabel("Die Taste auf der Leiste :", 120, 160, 123, 17)
$Checkbox = GUICtrlCreateLabel("Checkbox", 24, 160, 52, 17)
$Input9 = GUICtrlCreateInput("", 384, 184, 217, 21)
$Input10 = GUICtrlCreateInput("", 384, 208, 217, 21)
$Input11 = GUICtrlCreateInput("", 384, 232, 217, 21)
$Input12 = GUICtrlCreateInput("", 384, 256, 217, 21)
$Input13 = GUICtrlCreateInput("", 384, 280, 217, 21)
$Input14 = GUICtrlCreateInput("", 384, 304, 217, 21)
$Input15 = GUICtrlCreateInput("", 384, 328, 217, 21)
$Input16 = GUICtrlCreateInput("", 384, 352, 217, 21)
$Label2 = GUICtrlCreateLabel("Abklingzeit (in MIllisek) :", 384, 160, 115, 17)
$Button1 = GUICtrlCreateButton("Speichern", 24, 392, 577, 33, $WS_GROUP)
$TabSheet3 = GUICtrlCreateTabItem(" Einstellungen ")
$Einstellungen = GUICtrlCreateGroup("Einstellungen", 8, 144, 617, 297)
$Speicheraddressen = GUICtrlCreateGroup("Speicheraddressen", 24, 344, 585, 89)
$HP = GUICtrlCreateLabel("HP Speicheraddresse :", 40, 368, 113, 17)
$Label1 = GUICtrlCreateLabel("MP Speicheraddresse :", 40, 400, 114, 17)
$MPaddresse = GUICtrlCreateInput($mp_read, 184, 392, 257, 21)
$HPaddresse = GUICtrlCreateInput($hp_read, 184, 360, 257, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$abstand = GUICtrlCreateInput("", 256, 192, 353, 21)
$labelabstand = GUICtrlCreateLabel("Abstand zwischen Attacken (in Millisek) :", 24, 200, 212, 17)
$gruppe1 = GUICtrlCreateGroup("Tasten", 336, 240, 273, 89)
$Label2 = GUICtrlCreateLabel("Sammeltaste:", 352, 256, 67, 17)
$sammeltaste = GUICtrlCreateInput("", 432, 256, 97, 21)
$sitzttaste = GUICtrlCreateInput("", 432, 288, 97, 21)
$Label3 = GUICtrlCreateLabel("Sitzttaste:", 352, 288, 50, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group1 = GUICtrlCreateGroup("Potten Tasten", 24, 240, 273, 89)
$Label4 = GUICtrlCreateLabel("HP Trank:", 32, 256, 53, 17)
$hptrank = GUICtrlCreateInput("", 120, 256, 105, 21)
$Label5 = GUICtrlCreateLabel("MP Trank :", 32, 280, 57, 17)
$mptrank = GUICtrlCreateInput("", 120, 280, 105, 21)
$Label6 = GUICtrlCreateLabel("Erholungstrank :", 32, 304, 81, 17)
$erholungstrank = GUICtrlCreateInput("", 120, 304, 105, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("Speichern", 24, 440, 579, 25, $WS_GROUP)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Pic1 = GUICtrlCreatePic("nostale_bg.jpg", 8, 64, 617, 73, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
$TabSheet4 = GUICtrlCreateTabItem(" Potten/Hinsetzen ")
$Group1 = GUICtrlCreateGroup("Potten und Hinsetzen", 8, 200, 617, 233)
$Label4 = GUICtrlCreateLabel("HP Trank benutzen wenn HP geringer ist als :", 16, 224, 229, 17)
$hpbenutz = GUICtrlCreateInput("", 272, 216, 337, 21)
$Label5 = GUICtrlCreateLabel("MP Trank benutzen wenn Mp geringer ist als :", 16, 248, 225, 17)
$mpbenutz = GUICtrlCreateInput("", 272, 248, 337, 21)
$Label6 = GUICtrlCreateLabel("Erholungstrank benutzen wenn HP geringer ist als:", 16, 280, 241, 17)
$hperhol = GUICtrlCreateInput("", 272, 280, 129, 21)
$Label1 = GUICtrlCreateLabel("und MP :", 416, 280, 47, 17)
$mperhol = GUICtrlCreateInput("", 464, 280, 145, 21)
$maxhp = GUICtrlCreateInput("", 80, 312, 201, 21)
$minhp = GUICtrlCreateInput("", 400, 312, 209, 21)
$maxmp = GUICtrlCreateInput("", 80, 344, 201, 21)
$minmp = GUICtrlCreateInput("", 400, 344, 209, 21)
$Label2 = GUICtrlCreateLabel("Max. HP :", 16, 312, 51, 17)
$Label3 = GUICtrlCreateLabel("Min. Hp :", 320, 312, 47, 17)
$Label7 = GUICtrlCreateLabel("Max. MP :", 16, 344, 52, 17)
$Label8 = GUICtrlCreateLabel("Min. MP :", 320, 344, 49, 17)
$Button1 = GUICtrlCreateButton("Speichern", 16, 376, 593, 33, $WS_GROUP)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Pic1 = GUICtrlCreatePic("banner_nostale_ole1j92.jpg", 8, 56, 609, 145, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
$TabSheet5 = GUICtrlCreateTabItem(" Info ")
$infos = GUICtrlCreateGroup("Information", 8, 160, 617, 273)
$Label1 = GUICtrlCreateLabel("NosBot by cCcBozKurTcCc", 93, 184, 464, 52)
GUICtrlSetFont(-1, 28, 400, 0, "MS Sans Serif")
$Label2 = GUICtrlCreateLabel("Beta Version 0.7", 255, 248, 141, 28)
GUICtrlSetFont(-1, 15, 400, 0, "MS Sans Serif")
$Label3 = GUICtrlCreateLabel("Tutorial und Updates unter der Seite :", 167, 288, 316, 28)
GUICtrlSetFont(-1, 15, 400, 0, "MS Sans Serif")
$Label4 = GUICtrlCreateLabel("http://www.elitepvpers.com/forum/nostale/423211-beta-version-nosbot-mee-d.html", 87, 336, 477, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Label5 = GUICtrlCreateLabel("HAVE FUN ", 187, 360, 276, 56)
GUICtrlSetFont(-1, 35, 400, 0, "MS Sans Serif")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Pic1 = GUICtrlCreatePic("forumlogo_nostale.jpg", 8, 40, 617, 121, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Global $sitzt = GUICtrlRead($sitzttaste)
Global $sammelen = GUICtrlRead($sammeltaste)
Global $angriff = GUICtrlRead($abstand)
Global $MPSP = GUICtrlRead($MPaddresse)
Global $minhp = GUICtrlRead($minhp)
Global $maxhp = GUICtrlRead($maxhp)
Global $minmp = GUICtrlRead($minmp)
Global $maxmp = GUICtrlRead($maxmp)
Global $benutzen1 = GUICtrlRead($hpbenutz)
Global $benutzen2 = GUICtrlRead($mpbenutz)
Global $benutzen3 = GUICtrlRead($hperhol)
Global $benutzen4 = GUICtrlRead($mperhol)
Global $potten1 = GUICtrlRead($Potten)
While 1
$nMsg = GUIGetMsg($Form2)
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Start2
startstop()
Case $Pause2
TogglePause()
Case $Exit2
Ausschalten()
Case $Start1
ShellExecute("attackmage.exe")
Case $Pause1
TogglePause()
Case $Exit1
Ausschalten()
EndSwitch
If $running == True Then
If (checkHP() < $minhp) Then
doSleepwegenHP()
EndIf
If (checkMP() < $minmp) Then
doSleepwegenMP()
EndIf
If (checkHP() < $benutzen1) Then
pottenhp()
EndIf
If (checkMP() < $benutzen2) Then
pottenmp()
EndIf
If (checkHP() < $benutzen3) And (checkMP() < $benutzen4) Then
pottenerhol()
EndIf
If (checkMP() < $minmp) And (checkHP() < $minhp) Then
Else
Angriff()
EndIf
EndIf
WEnd
Func TogglePause()
$Paused = Not $Paused
While $Paused
Sleep(100)
WEnd
Send("{Pause}")
EndFunc ;==>TogglePause
Func Ausschalten()
Exit 0
Send("{ESC}")
EndFunc ;==>Ausschalten
Func startstop()
$running = Not $running
EndFunc ;==>startstop
Func Angriff()
attack()
Sleep($angriff)
skill1()
Sleep($angriff)
skill2()
Sleep($angriff)
skill3()
Sleep($angriff)
skill4()
Sleep($angriff)
skill5()
Sleep($angriff)
skill6()
Sleep($angriff)
skill7()
Sleep($angriff)
skill8()
Sleep($angriff)
loot()
Sleep($angriff)
EndFunc ;==>Angriff
Func attack()
ControlSend($windowname, "", "", "{SPACE}")
ControlSend($windowname, "", "", "{SPACE}")
Sleep($angriff)
EndFunc ;==>attack
Func doSleepwegenHP()
ControlSend($windowname, '', '', $sitzt)
While (checkHP() < $maxhp)
Sleep(500)
WEnd
ControlSend($windowname, '', '', $sitzt)
EndFunc ;==>doSleepwegenHP
Func doSleepwegenMP()
ControlSend($windowname, '', '', $sitzt)
While (checkMP() < $maxmp)
Sleep(500)
WEnd
ControlSend($windowname, '', '', $sitzt)
EndFunc ;==>doSleepwegenMP
Func loot()
ControlSend($windowname, '', '', $sammelen)
EndFunc ;==>loot
Func checkHP()
$pid = WinGetProcess($windowname)
$ProcessInformation = _MemoryOpen($pid)
$Number = _MemoryRead($hp_read, $ProcessInformation)
_MemoryClose($ProcessInformation)
Return $Number
EndFunc ;==>checkHP
Func checkMP()
$pid = WinGetProcess($windowname)
$ProcessInformation = _MemoryOpen($pid)
$Number = _MemoryRead($MPSP, $ProcessInformation)
_MemoryClose($ProcessInformation)
Return
EndFunc ;==>checkMP
Func pottenhp()
If BitAND(GUICtrlRead($potten1), $GUI_CHECKED) Then
ControlSend($windowname, '', '', $hptrank)
Else
EndIf
EndFunc ;==>pottenhp
Func pottenmp()
If BitAND(GUICtrlRead($potten1), $GUI_CHECKED) Then
ControlSend($windowname, '', '', $mptrank)
Else
EndIf
EndFunc ;==>pottenmp
Func pottenerhol()
If BitAND(GUICtrlRead($potten1), $GUI_CHECKED) Then
ControlSend($windowname, '', '', $erholungstrank)
Else
EndIf
EndFunc ;==>pottenerhol
Func skill1()
If BitAND(GUICtrlRead($skill1), $GUI_CHECKED) Then
ControlSend($windowname, "", "", $Input1)
Sleep($Input9)
Else
EndIf
EndFunc ;==>skill1
Func skill2()
If BitAND(GUICtrlRead($skill2), $GUI_CHECKED) Then
ControlSend($windowname, "", "", $Input2)
Sleep($Input10)
Else
EndIf
EndFunc ;==>skill2
Func skill3()
If BitAND(GUICtrlRead($skill3), $GUI_CHECKED) Then
ControlSend($windowname, "", "", $Input3)
Sleep($Input11)
Else
EndIf
EndFunc ;==>skill3
Func skill4()
If BitAND(GUICtrlRead($skill4), $GUI_CHECKED) Then
ControlSend($windowname, "", "", $Input4)
Sleep($Input12)
Else
EndIf
EndFunc ;==>skill4
Func skill5()
If BitAND(GUICtrlRead($skill5), $GUI_CHECKED) Then
ControlSend($windowname, "", "", $Input5)
Sleep($Input13)
Else
EndIf
EndFunc ;==>skill5
Func skill6()
If BitAND(GUICtrlRead($skill6), $GUI_CHECKED) Then
ControlSend($windowname, "", "", $Input6)
Sleep($Input14)
Else
EndIf
EndFunc ;==>skill6
Func skill7()
If BitAND(GUICtrlRead($skill7), $GUI_CHECKED) Then
ControlSend($windowname, "", "", $Input7)
Sleep($Input15)
Else
EndIf
EndFunc ;==>skill7
Func skill8()
If BitAND(GUICtrlRead($skill8), $GUI_CHECKED) Then
ControlSend($windowname, "", "", $Input8)
Sleep($Input16)
Else
EndIf
EndFunc ;==>skill8