Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #cs
- #########################
- ## Includes ##
- #########################
- #ce
- #include <WindowsConstants.au3>
- #include <GUIConstantsEx.au3>
- #include <GUIConstants.au3>
- #include <string.au3>
- #include <EditConstants.au3>
- #include <date.au3>
- #include <array.au3>
- #include <ImageSearch.au3>
- #cs
- #########################
- ## Variablen ##
- #########################
- #ce
- $Datum = @MDAY&"/" & @MON&"/" & @YEAR&" - "&@HOUR&":" & @MIN &":"& @SEC
- $clickkey = IniRead("Config.ini","hotkeys","Click","up")
- $walkkey = IniRead("Config.ini","hotkeys","Walk","left")
- $helpkey = IniRead("Config.ini","hotkeys","Help","right")
- $pausekey = IniRead("Config.ini","hotkeys","Pause","down")
- $endekey = IniRead("Config.ini","hotkeys","End","F10")
- $loginkey = IniRead("Config.ini","hotkeys","Login","p")
- $beendenkey = IniRead("Config.ini","hotkeys","Beenden","F9")
- $funcon = 0
- $running = 0
- $Server = "ftp://mozo:12031993@mozo.square7.ch/"
- #cs
- #########################
- ## Build GUI ##
- #########################
- #ce
- #Region ### START Koda GUI section ### Form=C:\Users\Mozo\Desktop\Form1.kxf
- $Form1 = GUICreate("Dekaron Tool", 248, 202, 193, 125)
- $Group2 = GUICtrlCreateGroup("Credits", 136, 0, 105, 97)
- $Label2 = GUICtrlCreateLabel("Credits:", 168, 24, 47, 17)
- GUICtrlSetFont(-1, 8, 800, 4, "MS Sans Serif")
- $Label3 = GUICtrlCreateLabel("Mozo007", 168, 64, 48, 17)
- GUICtrlCreateGroup("", -99, -99, 1, 1)
- $Group1 = GUICtrlCreateGroup("Change Login", 8, 0, 113, 97)
- $Loginname = GUICtrlCreateInput("Loginname", 16, 16, 97, 21)
- $Passwort = GUICtrlCreateInput("Passwort", 16, 40, 97, 21,$es_password)
- $Button1 = GUICtrlCreateButton("Ändern", 16, 64, 97, 25, 0)
- GUICtrlCreateGroup("", -99, -99, 1, 1)
- $Group3 = GUICtrlCreateGroup("Start", 8, 96, 233, 41)
- $Button2 = GUICtrlCreateButton("Start", 56, 104, 129, 25, 0)
- GUICtrlCreateGroup("", -99, -99, 1, 1)
- $Group4 = GUICtrlCreateGroup("Datum - Uhrzeit", 8, 136, 233, 41)
- $Label1 = GUICtrlCreateLabel($Datum, 68, 152, 200, 20)
- GUICtrlCreateGroup("", -99, -99, 1, 1)
- $Menu = GUICtrlCreateMenu("&Menu")
- $Update = GUICtrlCreateMenuItem("Update", $Menu)
- $Close = GUICtrlCreateMenuItem("Close", $Menu)
- $MenuItem2 = GUICtrlCreateMenu("?")
- $Info = GUICtrlCreateMenuItem("Login",$MenuItem2)
- $Help = GUICtrlCreateMenuItem("Help", $MenuItem2)
- GUISetState(@SW_SHOW)
- #EndRegion ### END Koda GUI section ###
- Dim $AccelKeys[1][2] = [["{ENTER}", $Button1]]
- GUISetAccelerators($AccelKeys)
- #cs
- ##########################
- ## Endlosschleife ##
- ##########################
- #ce
- While 1
- $nMsg = GUIGetMsg($Form1)
- Switch $nMsg
- Case $GUI_EVENT_CLOSE
- Exit
- Case $Button1
- _change()
- Case $Button2
- _dkstart()
- Case $Close
- Exit
- Case $Help
- _help()
- Case $Update
- _update()
- Case $Info
- _info()
- EndSwitch
- If ProcessExists("dekaron.exe") Then
- GUISetState(@SW_HIDE)
- TraySetState(1)
- $running = 1
- HotKeySet("{"&$endekey&"}", "_ende")
- HotKeySet("{"&$helpkey&"}", "_help")
- HotKeySet("{"&$clickkey&"}", "_click")
- HotKeySet("{"&$pausekey&"}", "_pause")
- HotKeySet("{"&$walkkey&"}", "_walk")
- HotKeySet("{"&$loginkey&"}", "_login")
- HotKeySet("{"&$beendenkey&"}", "_been")
- Else
- GUISetState(@SW_SHOW)
- TraySetState(0)
- $running = 0
- HotKeySet("{"&$endekey&"}")
- HotKeySet("{"&$helpkey&"}")
- HotKeySet("{"&$clickkey&"}")
- HotKeySet("{"&$pausekey&"}")
- HotKeySet("{"&$walkkey&"}")
- HotKeySet("{"&$loginkey&"}")
- HotKeySet("{"&$beendenkey&"}")
- EndIf
- $Datum = @MDAY&"/" & @MON&"/" & @YEAR&" - "&@HOUR&":" & @MIN &":"& @SEC
- If $Datum <> GUICtrlRead($Label1) Then GUICtrlSetData($Label1,$Datum)
- WEnd
- #cs
- #########################
- ## Funktionen ##
- #########################
- #ce
- Func _change()
- If GUICtrlRead($Loginname) = "" Or GUICtrlRead($Passwort) = "" Or GUICtrlRead($Loginname) = "Loginname" Or GUICtrlRead($Passwort) = "Passwort" Then
- MsgBox(0,"Daten eingeben", "Es wurden keine Daten eingegeben!")
- Else
- $idch = _StringEncrypt(1,GUICtrlRead($Loginname),"loginid",3)
- $pwch = _StringEncrypt(1,GUICtrlRead($Passwort),"loginpw",3)
- $idold = IniRead("Config.ini","login","Id","NoID")
- $pwold = IniRead("Config.ini","login","Pw","NoPW")
- If $idch = $idold And $pwch = $pwold Then
- MsgBox(0,"Daten","Gleiche Daten!")
- Else
- SplashTextOn("Aktualisierung", ""&@CRLF&@CRLF&@CRLF&"Daten werden aktualisiert",260,202)
- Sleep(600)
- SplashOff()
- If $idch <> $idold Then
- IniWrite("Config.ini","login","Id",$idch)
- IniWrite("Config.ini","change","Loginname","Last Change: "&@MDAY&"/"&@MON&"/"&@YEAR&", "&@HOUR&":"&@MIN& ":" &@SEC&" !")
- EndIf
- If $pwch <> $pwold Then
- IniWrite("Config.ini","login","Pw",$pwch)
- IniWrite("Config.ini","change","Password","Last Change: "&@MDAY&"/"&@MON&"/"&@YEAR&", "&@HOUR&":"&@MIN& ":" &@SEC&" !")
- EndIf
- $grund = InputBox("Grund", "Grund der Änderung:")
- IniWrite("Config.ini","change","Grund",$grund)
- MsgBox(0,"LoginDaten","Logindaten wurden erfolgreich aktuallisiert!")
- EndIf
- EndIf
- EndFunc
- Func _click()
- If $running = 1 Then
- If $funcon = 0 Then
- $funcon = 1
- While $funcon = 1
- MouseClick("left")
- WEnd
- Else
- MsgBox(0,"Funktion", "Es wird bereits ein anderer Script ausgeführt!")
- EndIf
- EndIf
- EndFunc
- Func _walk()
- If $running = 1 Then
- If $funcon = 0 Then
- $funcon = 2
- While $funcon = 2
- Send("{W DOWN}")
- WEnd
- Else
- MsgBox(0,"Funktion", "Es wird bereits ein anderer Script ausgeführt!")
- EndIf
- EndIf
- EndFunc
- Func _login()
- If $running = 1 Then
- If $funcon = 0 Then
- $funcon = 3
- While $funcon = 3
- $loginid = IniRead("Config.ini","login","Id","NoID")
- $loginpw = IniRead("Config.ini","login","Pw","NoPW")
- If $loginid = "NoID" Then
- $id = InputBox("Name","Loginname eingeben!")
- $id2 = _StringEncrypt(1,$id,"loginid",3)
- IniWrite("Config.ini","login","Id",$id2)
- IniWrite("Config.ini","change","Loginname","Last Change: "&@MDAY&"/"&@MON&"/"&@YEAR&", "&@HOUR&":"&@MIN&" !")
- Sleep(500)
- _login()
- ElseIf $loginpw = "NoPW" Then
- $pw = InputBox("Passwort","Passwort eingeben!","","*")
- $pw2 = _StringEncrypt(1,$pw,"loginpw",3)
- IniWrite("Config.ini","login","Pw",$pw2)
- IniWrite("Config.ini","change","Password","Last Change: "&@MDAY&"/"&@MON&"/"&@YEAR&", "&@HOUR&":"&@MIN&" !")
- Sleep(500)
- _login()
- Else
- $x1 = 0
- $y1 = 0
- $x2 = 0
- $y2 = 0
- $loginid2 = _StringEncrypt(0,$loginid,"loginid",3)
- $loginpw2 = _StringEncrypt(0,$loginpw,"loginpw",3)
- $result1 = _ImageSearch("server1.png",1,$x1,$y1,0)
- $result2 = _ImageSearch("server.png",1,$x2,$y2,0)
- ;~ $result3 = _ImageSearch("login.png",1,$x3,$y3,0)
- Beep(480,400)
- If $result1=1 Then
- MouseMove($x1,$y1,1)
- MouseClick("left")
- EndIf
- Sleep(1000)
- If $result2=1 Then
- MouseMove($x2,$y2,1)
- MouseClick("left")
- EndIf
- Sleep(1000)
- Send($loginid2)
- Send("{TAB}")
- Sleep(100)
- Send($loginpw2)
- Sleep(100)
- Send("{ENTER}")
- Sleep(10000)
- MouseClick("left" , 975, 84, 1)
- MouseClick("left" , 642, 906, 1)
- EndIf
- $funcon = 0
- WEnd
- Else
- MsgBox(0,"Funktion", "Es wird bereits ein anderer Script ausgeführt!")
- EndIf
- EndIf
- EndFunc
- Func _been()
- If $running = 1 Then
- If $funcon = 0 Then
- $funcon = 4
- Send("{ESC}")
- Sleep(200)
- MouseClick("left" , 630, 429, 1)
- $funcon = 0
- Else
- MsgBox(0,"Funktion", "Es wird bereits ein anderer Script ausgeführt!")
- EndIf
- EndIf
- EndFunc
- Func _help()
- If $funcon = 0 Then
- $funcon = 5
- MsgBox(0,"Helpbox", ""&$clickkey&" -> Autoklick" & @CRLF & ""&$walkkey&" -> Auto-W (Autolaufen)" & @CRLF & ""&$pausekey&" -> Alles Stoppen" & @CRLF & ""&$helpkey&" -> Helpbox" & @CRLF & ""&$loginkey&" -> Autologin" & @CRLF & ""&$beendenkey&" -> Dekaron beenden" & @CRLF & ""&$endekey&" -> Tool Beenden")
- Else
- MsgBox(0,"Funktion", "Es wird bereits ein anderer Script ausgeführt!")
- EndIf
- EndFunc
- Func _pause()
- If $running = 1 Then
- If $funcon > 0 Then
- Send("{W UP}")
- $funcon = 0
- Else
- MsgBox(0,"Funktion", "Es wird bereits ein anderer Script ausgeführt!")
- EndIf
- EndIf
- EndFunc
- Func _dkstart()
- $dkstart = IniRead("Config.ini","path","Path","path")
- If $running = 0 Then
- If $dkstart = "path" Or $dkstart = "" Then
- $dkpfad = FileOpenDialog("Datei suchen..", @ScriptDir, "(*.exe)")
- If $dkpfad <> "" Then
- IniWrite("Config.ini","path","Path",$dkpfad)
- _dkstart()
- EndIf
- Else
- Run($dkstart)
- EndIf
- EndIf
- EndFunc
- Func _update()
- $version = IniRead("Config.ini","version","Version","1.0.0.0") ;liest die akutelle version
- FileDelete("update.txt") ;Falls die Datei schon vorhanden ist
- InetGet("ftp://mozo_update:update@mozo.square7.de/Version.txt", "update.txt", 1, 0) ;läd die datei runter
- $file = FileOpen("update.txt", 0) ;ffnet sie
- $ver_server = FileReadLine($file, 1) ;liest zeile 1 (dort steht bei mir eben die version)
- If $ver_server = $version or $ver_server = "" Then ;vergleicht die version
- FileClose($file) ;schließt die datei
- FileDelete("update.txt") ;und löscht sie
- MsgBox(0,"Updater","Sie besitzen bereits die aktuellste Version!")
- Else
- $msgbox = MsgBox(36, "Update!", "Es ist ein neues Update verfügbar!"&@CRLF&"Aktuelle Version: "&$ver_server&@CRLF&"Wollen sie es runterladen?") ;ja-nein.msgbox
- If $msgbox = 6 Then ;wenn ja
- Tooltip("Update wird runtergeladen... bitte warten :-)")
- InetGet("ftp://mozo_update:update@mozo.square7.ch/DekaronTool-"&$ver_server&".exe", @scriptDir&"\" &"DekaronTool-"&$ver_server&".exe",0 ) ;läd er diese datei hier runter
- IniWrite("Config.ini","version","Version", $ver_server) ;schreibt die neue version in die ini
- FileClose($file) ;schließt die datei
- FileDelete("update.txt") ;löscht die datei
- Tooltip("") ;das ist wegen dem tooltip...der geht sonst nimmer wech xD
- msgbox(0,"Update", "Das Programm wurde aktualisiert ;)") ;bestätigung
- Run("DekaronTool-"&$ver_server&".exe") ;öffnet die neue version
- Exit ;schließt die alte
- Else
- FileClose($file)
- FileDelete("update.txt")
- EndIf
- EndIf
- EndFunc
- Func _GetVersion()
- $InetVersion = InetRead($Server & "Version.txt")
- If @error Then
- MsgBox(48, "Fehler", "Die Version konnte nicht überprüft werden")
- GUIDelete($Form)
- Else
- Return BinaryToString($InetVersion)
- EndIf
- EndFunc
- Func _info()
- $logininfo = IniRead("Config.ini","login","Id","NoID")
- $logininfo5 = IniRead("Config.ini","login","Pw","NoPW")
- $logininfo2 = _StringEncrypt(0,$logininfo,"loginid",3)
- MsgBox(0,"Login Info","Username: "&$logininfo2 & @CRLF &"Password: **********")
- EndFunc
- Func _ende()
- Exit
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement