PHP Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#Include <Array.au3>
#include<WebTcp.au3>
#include<string.au3>
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Internal|Market", 413, 309, 299, 218)
$Button1 = GUICtrlCreateButton("Refresh", 14, 272, 75, 25)
$Label3 = GUICtrlCreateLabel("Step:", 312, 8, 35, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Label4 = GUICtrlCreateLabel("0/0", 352, 8, 22, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Checkbox1 = GUICtrlCreateCheckbox("List Winner?", 184, 277, 97, 17)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Label1 = GUICtrlCreateLabel("Server:", 112, 8, 47, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Label2 = GUICtrlCreateLabel("", 168, 8, 27, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Button2 = GUICtrlCreateButton("Cancel", 102, 272, 75, 25)
$Button3 = GUICtrlCreateButton("Help", 328, 272, 75, 25)
$PageControl1 = GUICtrlCreateTab(8, 8, 396, 256)
$TabSheet1 = GUICtrlCreateTabItem("Market")
$List1 = GUICtrlCreateList("", 16, 40, 377, 216)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$TabSheet2 = GUICtrlCreateTabItem("Winner")
$List2 = GUICtrlCreateList("", 16, 40, 377, 216)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
#RequireAdmin
global $username, $password, $server, $checkbox1, $oWebTcp, $time, $date, $hwinner, $i, $uid, $log, $relog, $blub
anfang();nice
func anfang();nice
enablelabelclear()
data()
while 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
if WinExists("Help|Credits", "") Then
GUIDelete($form2)
Else
exit
endif
case $Button1
_autoitobject_startup()
$owebtcp=_webtcp_create(false, true)
TCPStartup()
If not StringInStr($relog, $uid) = true Then
disableclear()
checkboxcheck()
checkboxcheck2()
GUICtrlSetData($list1, "["&@hour&":"&@min&":"&@sec&"]"&"Login of user "&$username&" on "&$server&".")
$oWebTcp.Navigate("http://darkorbit.bigpoint.com/?locale=de&aid=0http://darkorbit.bigpoint.com/?locale=de&aid=0&aip=email_invites", "loginForm_default_username="&$username&"&loginForm_default_password="&$password&"&loginForm_default_login_submit=Login")
$sucess= _StringBetween($oWebTcp.body, 'title="Fehlermeldung">', '</div>')
if IsArray($sucess) then
GUICtrlSetData($list1, "["&@hour&":"&@min&":"&@sec&"]"&"Login failed...")
sleep(1000)
anfang()
else
GUICtrlSetData($list1, "["&@hour&":"&@min&":"&@sec&"]"&"Checking GameAPI.php.")
$erg=_StringBetween($oWebTcp.body,'http://'&$server&'.darkorbit.bigpoint.com/GameAPI.php?req=', ')">')
$blub=StringTrimRight($erg[0],1)
$oWebTcp.Navigate("http://"&$server&".darkorbit.bigpoint.com/GameAPI.php?req="&$blub)
if not @error then
GUICtrlSetData($label2, $server)
endif
checkboxcheck3()
GUICtrlSetData($list1, "["&@hour&":"&@min&":"&@sec&"]"&"Navigating to Market.")
$oWebTcp.Navigate("http://"&$server&".darkorbit.bigpoint.com/indexInternal.es?action=internalstart")
$log = FileWrite(@scriptdir&"\log.txt", $oWebTcp.body)
$oWebTcp.Navigate("http://"&$server&".darkorbit.bigpoint.com/indexInternal.es?action=internalHandel")
endif
$hbietender=_StringBetween($oWebTcp.body, 'class="fliess10px-gelb">', '</span></td>')
If IsArray($hbietender) Then
guictrlsetdata($list1, "")
For $i = 1 To UBound($hbietender) -1
GUICtrlSetData($list1, $hbietender[$i])
Next
else
GUICtrlSetData($list1, "["&@hour&":"&@min&":"&@sec&"]"&"Fail on GameAPI.php?.")
msgbox(16, "", " Error code 2 "&@CRLF & _;Gameapi adress failed
" Gameapi failed! "&@CRLF & _
" PM Ludder231 @Epvp ")
endif
checkboxcheck4()
enable()
_autoitobject_shutdown()
TCPShutdown()
Else
GUICtrlSetData($list1, "["&@hour&":"&@min&":"&@sec&"]"&"Navigating to Market.")
$oWebTcp.Navigate("http://"&$server&".darkorbit.bigpoint.com/indexInternal.es?action=internalHandel")
$hbietender=_StringBetween($oWebTcp.body, 'class="fliess10px-gelb">', '</span></td>')
If IsArray($hbietender) Then
guictrlsetdata($list1, "")
For $i = 1 To UBound($hbietender) -1
GUICtrlSetData($list1, $hbietender[$i])
Next
else
GUICtrlSetData($list1, "["&@hour&":"&@min&":"&@sec&"]"&"Fail on GameAPI.php?.")
msgbox(16, "", " Error code 2 "&@CRLF & _;Gameapi adress failed
" Gameapi failed! "&@CRLF & _
" PM Ludder231 @Epvp ")
endif
checkboxcheck4()
enable()
_autoitobject_shutdown()
TCPShutdown()
endif
case $button2
exit
case $button3
form2()
EndSwitch
WEnd
endfunc
func form2()
$Form2 = GUICreate("Help|Credits", 413, 165, 221, 413)
$Label1 = GUICtrlCreateLabel("Please encode speacial chracters", 8, 8, 319, 18)
GUICtrlSetFont(-1, 12, 400, 0, "Nasalization")
GUICtrlSetColor(-1, 0xFF0000)
$Label2 = GUICtrlCreateLabel("*Thank's to kknb's help making this tool", 8, 136, 277, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFFFFFF)
$Label3 = GUICtrlCreateLabel("I accept no responsibility for any damage to accounts that may result from this", 8, 40, 381, 23)
GUICtrlSetFont(-1, 12, 400, 0, "Placard MT Condensed")
$Label4 = GUICtrlCreateLabel("programm", 8, 64, 54, 23)
GUICtrlSetFont(-1, 12, 400, 0, "Placard MT Condensed")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
endfunc
func disableclear()
GUICtrlSetState($checkbox1, $GUI_disable)
GUICtrlSetState($button1, $GUI_DISABLE)
GUICtrlSetState($button2, $GUI_DISABLE)
GUICtrlSetState($button3, $GUI_DISABLE)
GUICtrlSetData($list1, "")
GUICtrlSetData($list2, "")
endfunc
func enable()
GUICtrlSetState($checkbox1, $GUI_enable)
GUICtrlSetState($button1, $GUI_enable)
GUICtrlSetState($button2, $GUI_enable)
GUICtrlSetState($button3, $GUI_enable)
EndFunc
func enablelabelclear()
GUICtrlSetData($label4, "0/0")
GUICtrlSetData($label2, "")
GUICtrlSetState($button1, $GUI_enable)
GUICtrlSetState($checkbox1, $GUI_enable)
GUICtrlSetState($button2, $GUI_enable)
GUICtrlSetState($button3, $GUI_enable)
EndFunc
func data()
$relog=FileRead(@scriptdir&"\log.txt")
$uid=FileRead(@scriptdir&"\UserID.txt")
$username=InputBox("Data", "Username:")
$password=InputBox("Data", "Passwort:", "", "*")
$server=InputBox("Data", "Server:")
EndFunc
func checkboxcheck()
if guictrlread($checkbox1) = $gui_checked Then
guictrlsetdata($label4, "0/3")
Else
guictrlsetdata($label4, "0/2")
endif
EndFunc
func checkboxcheck2()
if guictrlread($checkbox1) = $gui_checked Then
guictrlsetdata($label4, "1/3")
Else
guictrlsetdata($label4, "1/2")
endif
EndFunc
func checkboxcheck3()
if guictrlread($checkbox1) = $gui_checked Then
guictrlsetdata($label4, "2/3")
Else
guictrlsetdata($label4, "2/2")
endif
EndFunc
func checkboxcheck4()
sleep(700)
if guictrlread($checkbox1) = $gui_checked Then
GUICtrlSetState($tabsheet2, $gui_show)
guictrlsetdata($label4, "3/3")
GUICtrlSetData($list2, "["&@hour&":"&@min&":"&@sec&"]"&"Navigating to closed Market.")
$oWebTcp.Navigate("http://"&$server&".darkorbit.bigpoint.com/indexInternal.es?action=internalHandel&tpl=internalHandelClosed")
$hwinner=_StringBetween($oWebTcp.body, '<p class="fliess11px-gelb">', '</p>')
If IsArray($hwinner) Then
guictrlsetdata($list2, "")
For $i = 1 To UBound($hwinner) -1
GUICtrlSetData($list2, $hwinner[$i])
inicheck()
enable()
Next
Else
guictrlsetdata($list2, "Failed on closed Market...")
endif
endif
EndFunc
func inicheck()
; for $o=1 to $hwinner[$i]
; $writesectionnames=IniWriteSection(@scriptdir&"\Closed Market.ini", "Winner", $hwinner[$i])
; next
;$wins=IniWrite(@scriptdir&"\Closed Market.ini", "Winner", "Wins", $hwinner)
EndFunc