Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiStatusBar.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <WinHttp.au3>
#include <GetHWID.au3>
Global $nLogin = False
#Region ### START Koda GUI section ###
$Form1 = GUICreate("Elitepvpers Treasure Creator by Lumi", 305, 187, 188, 120)
$MenuItem1 = GUICtrlCreateMenu("&Treasure")
$MenuItem2 = GUICtrlCreateMenuItem("&Creator", $MenuItem1)
$MenuItem3 = GUICtrlCreateMenuItem("&Exit", $MenuItem1)
$MenuItem4 = GUICtrlCreateMenu("&elite*Gold auslesen")
$MenuItem5 = GUICtrlCreateMenuItem("elite*Gold ausleser", $MenuItem4)
$MenuItem6 = GUICtrlCreateMenu("&Profil")
$MenuItem7 = GUICtrlCreateMenuItem("Profil auslesen", $MenuItem6)
$Label1 = GUICtrlCreateLabel("Benutzername:", 24, 24, 117, 20)
GUICtrlSetFont(-1, 12, 800, 0, "MS UI Gothic")
$Label2 = GUICtrlCreateLabel("Passwort:", 64, 48, 78, 20)
GUICtrlSetFont(-1, 12, 800, 0, "MS UI Gothic")
$Input1 = GUICtrlCreateInput("", 152, 24, 121, 21)
$Input2 = GUICtrlCreateInput("", 152, 48, 121, 21, $ES_PASSWORD)
$Button1 = GUICtrlCreateButton("Login", 9, 120, 287, 33)
$Label3 = GUICtrlCreateLabel("", 56, 160, 4, 4)
$AnzeigenPW = GUICtrlCreateCheckbox("Passwort anzeigen", 96, 88, 113, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $MenuItem3
Exit
If $nLogin = True Then
$hSession = _WinHttpOpen("Mozilla/5.0 (Windows NT 6.0; rv:10.0.2) Gecko/20100101 Firefox/10.0.2")
$hConnect = _WinHttpConnect($hSession, "www.elitepvpers.com")
_WinHttpCloseHandle($hSession)
_WinHttpCloseHandle($hConnect)
EndIf
Exit
Case $Button1
If $nLogin = True Then
GUICtrlSetState($Button1, $GUI_DISABLE)
EndIf
$hSession = _WinHttpOpen("Mozilla/5.0 (Windows NT 6.0; rv:10.0.2) Gecko/20100101 Firefox/10.0.2")
$hConnect = _WinHttpConnect($hSession, "www.elitepvpers.com")
$sHTML = _WinHttpSimpleRequest($hConnect, "POST", "forum/login.php?do=login", "", "vb_login_username=" & GUICtrlRead($Input1) & "&vb_login_password=" & GUICtrlRead($Input2) & "&cookieuser=1&s=&securitytoken=guest&do=login")
If StringInStr($sHTML, "<strong>Thank you for logging in") Then
GUICtrlSetData($Button1,"Login erfolgreich!")
GUICtrlSetColor(-1, 0x00FF66)
GUICtrlSetState($Button1, $GUI_DISABLE)
GUICtrlSetState($Input1, $GUI_DISABLE)
GUICtrlSetState($Input2, $GUI_DISABLE)
$nLogin = True
Else
GUICtrlSetData($Button1,"Login fehlgeschlagen!")
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlSetState($Button1, $GUI_DISABLE)
GUICtrlSetState($Input1, $GUI_DISABLE)
GUICtrlSetState($Input2, $GUI_DISABLE)
EndIf
;~ If GUICtrlRead($AnzeigenPW) = $GUI_CHECKED Then
;~ GUICtrlSetState($Input2, $GUI_FOCUS)
;~ Else
;~ Exit
;~ EndIf
Case $MenuItem2
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiStatusBar.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <WinHttp.au3>
#include "GetHWID.au3"
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Treasure Creator", 410, 396, 202, 126)
$Label4 = GUICtrlCreateLabel("Titel (von jedem einsehbar):", 8, 8, 217, 20)
GUICtrlSetFont(-1, 12, 800, 0, "MS UI Gothic")
$Label5 = GUICtrlCreateLabel("Inhalt (nur vom Käufer einsehbar):", 8, 72, 267, 20)
GUICtrlSetFont(-1, 12, 800, 0, "MS UI Gothic")
$Label6 = GUICtrlCreateLabel("Preis (elite*gold):", 8, 264, 137, 20)
GUICtrlSetFont(-1, 12, 800, 0, "MS UI Gothic")
$Input3 = GUICtrlCreateInput("", 8, 32, 265, 21)
$Input4 = GUICtrlCreateInput("", 8, 96, 385, 150)
$Input5 = GUICtrlCreateInput("", 8, 296, 121, 21)
$Button2 = GUICtrlCreateButton("Create", 8, 344, 75, 25)
$Label7 = GUICtrlCreateLabel("", 56, 376, 316, 28)
GUICtrlSetFont(-1, 12, 800, 0, "MS UI Gothic")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
If $Input5 > 27000 Then
GUICtrlSetData($Label7, "Dein Wert ist zu groß. Es dürfen nicht mehr als 27000 sein!")
Exit
Else
Truhen()
EndIf
Case $Button2
Truhen()
EndSwitch
WEnd
Case $MenuItem5
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiStatusBar.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <WinHttp.au3>
#include "GetHWID.au3"
#Region ### START Koda GUI section ###
$eliteGold = GUICreate("elite*Gold ausleser", 620, 214, 188, 120)
$Auslesen = GUICtrlCreateButton("Daten auslesen", 0, 0, 619, 25)
;~ $List1 = GUICtrlCreateListView("elite*gold|Benutzername|Passwort|", 0, 24, 617, 188, BitOR($WS_BORDER, $WS_VSCROLL))
$List1 = GUICtrlCreateListView("elite*gold|Benutzername|Passwort", 0, 24, 617, 188, BitOR($WS_BORDER, $WS_VSCROLL))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Auslesen
GoldAbfrage()
EndSwitch
WEnd
Case $MenuItem7
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiStatusBar.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <WinHttp.au3>
#include "GetHWID.au3"
#Region ### START Koda GUI section ### Form=C:\Users\Khuong\Desktop\Dateien\AutoIt Zeugs\Elitepvpers Treasor Creator\Profil auslesen.kxf
$Form3 = GUICreate("Profil ausleser", 310, 395, 191, 125)
;~ $HWIDGene = GUICtrlCreateButton("HWID Generieren", 0, 0, 307, 25)
$Input1 = GUICtrlCreateInput(_GetHWID(), 48, 32, 217, 21)
$Label1 = GUICtrlCreateLabel("Benutze diesen Link -> ", 8, 64, 115, 17)
$ProfilEdit = GUICtrlCreateButton("?", 120, 64, 27, 17)
GUICtrlSetFont(-1, 10, 800, 0, "MS PMincho")
GUICtrlSetColor(-1, 0x00FF00)
$Label2 = GUICtrlCreateLabel("Scrolle bis nach unten und", 160, 64, 130, 17)
$Label3 = GUICtrlCreateLabel("tragt bei Hardware ID euren HWID Code ein.", 8, 80, 216, 17)
$Label4 = GUICtrlCreateLabel("Drücke anschließend in diesem Fenster auf dem Knopf dort", 8, 96, 283, 17)
$Label5 = GUICtrlCreateLabel("unten.", 8, 112, 34, 17)
$ProfilAuslesen = GUICtrlCreateButton("Profil auslesen", 96, 152, 115, 25)
GUICtrlSetFont(-1, 10, 400, 0, "Meiryo UI")
GUICtrlSetColor(-1, 0xFF0000)
$Group1 = GUICtrlCreateGroup("User Info", 8, 216, 297, 169)
$Label6 = GUICtrlCreateLabel("Username:", 24, 272, 55, 17)
$Label11 = GUICtrlCreateLabel("-", 136, 248, 135, 17)
$Label12 = GUICtrlCreateLabel("-", 136, 272, 135, 17)
$Label13 = GUICtrlCreateLabel("-", 136, 296, 135, 17)
$Label14 = GUICtrlCreateLabel("-", 136, 320, 135, 17)
$Label15 = GUICtrlCreateLabel("-", 136, 344, 135, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Label7 = GUICtrlCreateLabel("User ID:", 24, 248, 43, 17)
$Label8 = GUICtrlCreateLabel("Benutzergruppe:", 24, 296, 82, 17)
$Label9 = GUICtrlCreateLabel("Beiträge:", 24, 320, 46, 17)
$Label10 = GUICtrlCreateLabel("Thanks:", 24, 344, 43, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $ProfilEdit
ClipPut(GUICtrlRead(_GetHWID()))
ShellExecute("http://www.elitepvpers.com/forum/profile.php?do=editprofile")
;~ Case $HWIDGene
;~ GUICtrlSetData($HWIDCode, $HWID)
Case $ProfilAuslesen
_GetUserInfos()
EndSwitch
WEnd
EndSwitch
WEnd
Func Truhen()
If $nLogin = True Then
$sHTML = _WinHttpSimpleRequest($hConnect, "POST", "theblackmarket/treasures/", "","title="&GUICtrlRead($Input3)&"&content="&GUICtrlRead($Input4)&"&cost="&GUICtrlRead($Input5)&"&createtreasure=Submit")
GUICtrlSetData($Label7,"Treasure wurde erfolgreich erstellt!")
GUICtrlSetColor(-1, 0x00FF66)
Else
GUICtrlSetData($Label7,"Du bist noch nicht einloggt!")
GUICtrlSetColor(-1, 0xFF0000)
EndIf
EndFunc
Func GoldAbfrage()
If $nLogin Then
$sHTML = _WinHttpSimpleRequest($hConnect, "POST", "forum/login.php?do=login", "", "vb_login_username=" & GUICtrlRead($Input1) & "&vb_login_password=" & GUICtrlRead($Input2) & "&cookieuser=1&s=&securitytoken=guest&do=login&vb_login_md5password=&vb_login_md5password_utf=")
$sHTML = _WinHttpSimpleRequest($hConnect, "GET", "forum/" )
$aReturn = StringRegExp($sHTML, '<span class="gold">([^<]+)', 3)
GuiCtrlCreateListViewItem($aReturn[0] & " | " & GUICtrlRead($Input1) & " | " & GUICtrlRead($Input2) , $List1)
Else
GuiCtrlCreateListViewItem("Daten" & " | " & "konnten nicht " & " | " & "ausgelesen werden!" , $List1)
GUICtrlSetColor(-1, 0xFF0000)
EndIf
EndFunc
Func _GetUserInfos()
$Infos = _GetHWIDData(_GetHWID())
If Not @error Then
GUICtrlSetData($Label11, $Infos[0])
GUICtrlSetData($Label12, $Infos[1])
GUICtrlSetData($Label13, $Infos[5])
GUICtrlSetData($Label14, $Infos[3])
GUICtrlSetData($Label15, $Infos[4])
EndIf
EndFunc