zu 90% fertig... errorhandling fehlt teils noch und ist nicht
so schön strukt. ... its all yours...
(dir fehlt eigentlich nur noch eine auto run vers. von AutoAion..)
Code:
#include <ButtonConstants.au3>
#include <GuiStatusBar.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#include <String.au3>
#include <Array.au3>
#include <Inet.au3>
#include <IE.au3>
#Include <Misc.au3>
#include <Timers.au3>
#include <GUIConstantsEx.au3>
#include <GUIConstants.au3>
#include <StaticConstants.au3>
global $Progress1
global $Form1_1
Global $ChildGui
Global $time
Global $label11
Global $label11
Global $probarx
Global $probary
Global $windowname
Call ("Start")
Func Start()
$ini = @ScriptDir & "\Data\AION.ini"
$setup = IniRead($ini,"Section","setup","AION.ini is missing")
If $setup = "1" Then call("loader")
If $setup = "0" Then Setup()
EndFunc
Func Loader()
$ini = @ScriptDir & "\Data\AION.ini"
$aionloc = IniRead($ini,"Section","AIONLocation","AION.ini is missing")
Run("$aionloc")
Sleep(30000) ;sleeps 30 sec to give the game time to load...
GetColorLogIn()
EndFunc
Func GetColorLogIn()
WinActivate("AION Client")
sleep (500)
$ini = @ScriptDir & "\Data\AION.ini"
$mx = IniRead($ini,"Section","MXL","AION.ini is missing")
$my = IniRead($ini,"Section","MYL","AION.ini is missing")
$color = IniRead($ini,"Section","MLC","AION.ini is missing")
sleep(500)
$NewColor = PixelGetColor( $mx , $my)
if $NewColor = ($color) Then
Login()
Else
Sleep (5000)
call ("GetColorLogIn")
Endif
EndFunc
Func LogIn()
$ini = @ScriptDir & "\Data\AION.ini"
sleep(300)
$name = IniRead($ini,"Section","Name","AION.ini is missing")
sleep(300)
Send ($name)
sleep(300)
Send ("{TAB}",0)
sleep(300)
$pwr = IniRead($ini,"Section","pw","AION.ini is missing")
sleep(300)
send ($pwr)
Send ("{ENTER}")
Sleep(1000)
Send ("{ENTER}")
Sleep(1000)
Send ("{ENTER}")
Sleep(1000)
call("GetColor1")
EndFunc
Func GetColor1()
WinActivate("AION Client")
WinWaitActive("AION Client")
sleep (500)
$ini = @ScriptDir & "\Data\AION.ini"
$mmx = IniRead($ini,"Section","MXS","AION.ini is missing")
$mmy = IniRead($ini,"Section","MYS","AION.ini is missing")
$cmx = IniRead($ini,"Section","MXC","AION.ini is missing")
$cmy = IniRead($ini,"Section","MYC","AION.ini is missing")
$mcolor = IniRead($ini,"Section","MCS","AION.ini is missing")
sleep(500)
$NewColor = PixelGetColor($mmx,$mmy)
sleep (300)
if $NewColor = ($mcolor) Then
MouseClick("left", $cmx , $cmy ,1,0)
Sleep(1000)
Send("{ENTER}")
Sleep(12000)
Call("runbot")
Else
Sleep (2000)
call ("GetColor1")
Endif
EndFunc
Func runbot()
Run ("Bot.exe" , @ScriptDir & "\" )
;~ Run ( "filename" [, "workingdir" [, show_flag[, opt_flag ]]] )
EndFunc
Func Setup()
#Region GUI & Includes
#include <ButtonConstants.au3>
#include <GuiStatusBar.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#include <String.au3>
#include <Array.au3>
#include <Inet.au3>
#include <IE.au3>
#Include <Misc.au3>
#include <GUIConstantsEx.au3>
#include <GUIConstants.au3>
$ini = @ScriptDir & "\Data\AION.ini"
$dll = DllOpen("user32.dll")
;~ $t = Iniread($ini, "Section","Aionlocation","$AIONLocation")
;~ msgbox(0,"kk" , $t)
$AIONLocation = Inputbox("AION Istanllation folder","Copy this Target from your Game Shortcut like!!:" & @CR & @CR &"D:\Programme\NCsoft\Launcher\NCLauncher.exe /LaunchGame=AionEU : " , "" , "" , 550,150)
$errorl = @error
Select
Case $errorl = 0
IniWrite($ini, "Section","Aionlocation",$AIONLocation)
Case $errorl = 1
Exit
EndSelect
msgbox(0, "just read it all...","Place your Bot into the Script Directory and name it Bot.exe ... "& @CR & "Bot.exe will be autoloaded once ingame..." & @CR & "dont forget to add all files need for the bot into script directory")
$login = Inputbox("AION Login Name","AION Login Name: ")
$errorl = @error
Select
Case $errorl = 0
IniWrite($ini, "Section","Name",$login)
Case $errorl = 1
Exit
EndSelect
sleep(300)
$pw = Inputbox("AION password","AION password: ")
$errorp = @error
Select
Case $errorp = 0
IniWrite($ini, "Section","pw",$pw)
Case $errorp = 1
Exit
EndSelect
$Form1_1 = GUICreate("Help pics where to click ", 634, 448, 192, 124)
;~ $Progress1 = GUICtrlCreateProgress(8, 400, 614, 25)
;~ $StatusBar1 = _GUICtrlStatusBar_Create($Form1_1)
;~ _GUICtrlStatusBar_SetSimple($StatusBar1)
;~ _GUICtrlStatusBar_SetText($StatusBar1, "Url of Website")
$Tab1 = GUICtrlCreateTab(0, 0, 683, 401)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$Button1 = GUICtrlCreateButton("",999, 999, 0, 0, BitOR($BS_DEFPUSHBUTTON,$WS_GROUP))
$Button2 = GUICtrlCreateButton("Click here for next steps / instructions ...",4,402, 625,43)
GUICtrlSetFont(-1, 14, 800, 0, "Viner Hand ITC")
$URLLINK=GUICtrlCreateCombo("http://i50.photobucket.com/albums/f309/Engelsfeuer/ulli-1.jpg",130,0,500)
$Seite1 = GUICtrlCreateTabItem("Pic 1")
$InetOne = ObjCreate("Shell.Explorer.2")
$InetOne_ctrl = GUICtrlCreateObj($InetOne, 4, 25, 626, 372)
$Seite2 = GUICtrlCreateTabItem("Pic 2")
$InetTwo = ObjCreate("Shell.Explorer.2")
$Obj1_ctrl = GUICtrlCreateObj($InetTwo, 4, 25, 626, 372)
$Seite3 = GUICtrlCreateTabItem("Pic 3")
$InetTree = ObjCreate("Shell.Explorer.2")
$Obj2_ctrl = GUICtrlCreateObj($InetTree, 4, 25, 626, 372)
GUISetState(@SW_SHOW)
$InetOne.navigate( @ScriptDir & "\Data\pic1.jpg")
$InetTree.navigate( @ScriptDir & "\Data\Data\pic2.jpg")
$InetTwo.navigate( @ScriptDir & "\Data\pic3.jpg")
GUICtrlSetState($Seite1,$GUI_SHOW)
GUICtrlSetState($URLLINK,$GUI_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
ExitLoop
Case $Button1
$InetOne.navigate(GUICtrlRead($URLLINK))
Case $Button2
ExitLoop
EndSwitch
WEnd
$msg = MsgBox(4,"Step 1: On Account Login Screen", ">- On LogIn Screen look for a spot with a steady color" & @CR & _
" (Outside the animated background pic and no active buttons)" _
& @CR & @CR & "-> Click OK once the Game is loaded on Login Screen" & @CR & _
" (after OK you autom. TAB into Game)" & @CR _
& @CR & "-> After you found the steady colored spot left-click it.." _
& @CR & @CR & @CR & @CR &" ??? Are you ready with the Game loadd on Login Screen ???")
Select
Case $msg = 6
Case $msg < 6
Exit
Case $msg > 6
Exit
EndSelect
WinActivate("AION Client")
Sleep ( 250 )
While 1
If _IsPressed("01", $dll) Then
$MousePos = MouseGetPos()
;~ MsgBox(0,"_IsPressed", "Mouse Button Pressed" & @CR & "X=" & $MousePos[0] & @CR & "Y=" & $MousePos[1])
$colorlogin = PixelGetColor($MousePos[0],$MousePos[1])
IniWrite($ini, "Section","MXL",$MousePos[0])
IniWrite($ini, "Section","MYL",$MousePos[1])
IniWrite($ini, "Section","MLC",$colorlogin)
;~ MsgBox(0,"_IsPressed", "color of pixel" & @CR & $colorlogin)
ExitLoop
EndIf
WEnd
MsgBox(0,"Log into Chara...", "Now Get ready for the next step..." & @CR _
& @CR & "-> Log into your account until you are" & @CR _
& " on the chara selection screen")
sleep(300)
WinActivate("AION Installation")
sleep(300)
$Form1_1 = GUICreate("Help pics where to click ", 634, 448, 192, 124)
;~ $Progress1 = GUICtrlCreateProgress(8, 400, 614, 25)
;~ $StatusBar1 = _GUICtrlStatusBar_Create($Form1_1)
;~ _GUICtrlStatusBar_SetSimple($StatusBar1)
;~ _GUICtrlStatusBar_SetText($StatusBar1, "Url of Website")
$Tab1 = GUICtrlCreateTab(0, 0, 683, 401)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$Button1 = GUICtrlCreateButton("",999, 999, 0, 0, BitOR($BS_DEFPUSHBUTTON,$WS_GROUP))
$Button2 = GUICtrlCreateButton("Click here for next steps / instructions ...",4,402, 625,43)
GUICtrlSetFont(-1, 14, 800, 0, "Viner Hand ITC")
$URLLINK=GUICtrlCreateCombo("http://i50.photobucket.com/albums/f309/Engelsfeuer/ulli-1.jpg",130,0,500)
$Seite1 = GUICtrlCreateTabItem("Pic 1")
$InetOne = ObjCreate("Shell.Explorer.2")
$InetOne_ctrl = GUICtrlCreateObj($InetOne, 4, 25, 626, 372)
$Seite2 = GUICtrlCreateTabItem("Pic 2")
$InetTwo = ObjCreate("Shell.Explorer.2")
$Obj1_ctrl = GUICtrlCreateObj($InetTwo, 4, 25, 626, 372)
$Seite3 = GUICtrlCreateTabItem("Pic 3")
$InetTree = ObjCreate("Shell.Explorer.2")
$Obj2_ctrl = GUICtrlCreateObj($InetTree, 4, 25, 626, 372)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$InetOne.navigate( @ScriptDir & "\Data\pic1.jpg")
$InetTree.navigate( @ScriptDir & "\Data\pic3.jpg")
$InetTwo.navigate( @ScriptDir & "\Data\pic2.jpg")
GUICtrlSetState($Seite2,$GUI_SHOW)
GUICtrlSetState($URLLINK,$GUI_SHOW)
#EndRegion GUI
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
ExitLoop
Case $Button1
$InetOne.navigate(GUICtrlRead($URLLINK))
Case $Button2
ExitLoop
EndSwitch
WEnd
$msg = MsgBox(4,"Step 2: Start Button", "Click on the INACTIVE Start button at the bottom (green part)" & @CR _
& @CR & "(select an empty chara slot to get an inactive Start button)" & @CR _
& " "& @CR & @CR & @CR & _
"-> Click YES if you are ready to" & @CR & _
" mark the Start button")
Select
Case $msg = 6
Case $msg < 6
Exit
Case $msg > 6
Exit
EndSelect
WinActivate("AION Client")
Sleep ( 250 )
While 1
If _IsPressed("01", $dll) Then
$StartPos = MouseGetPos()
;~ MsgBox(0,"_IsPressed", "Mouse Button Pressed" & @CR & "X=" & $MousePos[0] & @CR & "Y=" & $MousePos[1])
$colorStart = PixelGetColor($StartPos[0],$StartPos[1])
IniWrite($ini, "Section","MXS",$StartPos[0])
IniWrite($ini, "Section","MYS",$StartPos[1])
IniWrite($ini, "Section","MCS",$colorStart)
;~ MsgBox(0,"_IsPressed", "color of pixel" & @CR & $colorlogin)
ExitLoop
EndIf
WEnd
Sleep(300)
$Form1_1 = GUICreate("Help pics where to click ", 634, 448, 192, 124)
;~ $Progress1 = GUICtrlCreateProgress(8, 400, 614, 25)
;~ $StatusBar1 = _GUICtrlStatusBar_Create($Form1_1)
;~ _GUICtrlStatusBar_SetSimple($StatusBar1)
;~ _GUICtrlStatusBar_SetText($StatusBar1, "Url of Website")
$Tab1 = GUICtrlCreateTab(0, 0, 683, 401)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$Button1 = GUICtrlCreateButton("",999, 999, 0, 0, BitOR($BS_DEFPUSHBUTTON,$WS_GROUP))
$Button2 = GUICtrlCreateButton("Click here for next steps / instructions ...",4,402, 625,43)
GUICtrlSetFont(-1, 14, 800, 0, "Viner Hand ITC")
$URLLINK=GUICtrlCreateCombo("http://i50.photobucket.com/albums/f309/Engelsfeuer/ulli-1.jpg",130,0,500)
$Seite1 = GUICtrlCreateTabItem("Pic 1")
$InetOne = ObjCreate("Shell.Explorer.2")
$InetOne_ctrl = GUICtrlCreateObj($InetOne, 4, 25, 626, 372)
$Seite2 = GUICtrlCreateTabItem("Pic 2")
$InetTwo = ObjCreate("Shell.Explorer.2")
$Obj1_ctrl = GUICtrlCreateObj($InetTwo, 4, 25, 626, 372)
$Seite3 = GUICtrlCreateTabItem("Pic 3")
$InetTree = ObjCreate("Shell.Explorer.2")
$Obj2_ctrl = GUICtrlCreateObj($InetTree, 4, 25, 626, 372)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$InetOne.navigate( @ScriptDir & "\Data\pic1.jpg")
$InetTree.navigate( @ScriptDir & "\Data\pic3.jpg")
$InetTwo.navigate( @ScriptDir & "\Data\pic2.jpg")
GUICtrlSetState($Seite3,$GUI_SHOW)
GUICtrlSetState($URLLINK,$GUI_SHOW)
#EndRegion GUI
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
ExitLoop
Case $Button1
$InetOne.navigate(GUICtrlRead($URLLINK))
Case $Button2
ExitLoop
EndSwitch
WEnd
WinActivate("Help pics where to click ")
$msg = MsgBox(4,"Step 3: Chara Spot", "Click where you pick your chara..." & @CR _
& @CR & "-> Choose Slot 1 (Just click" & @CR _
& " in the middle of the Box)"& @CR & @CR & @CR & _
"-> Click YES if you are ready to" & @CR & _
" mark the spot")
Select
Case $msg = 6
Case $msg < 6
Exit
Case $msg > 6
Exit
EndSelect
WinActivate("AION Client")
Sleep ( 300 )
While 1
If _IsPressed("01", $dll) Then
$CharaPos = MouseGetPos()
;~ MsgBox(0,"_IsPressed", "Mouse Button Pressed" & @CR & "X=" & $MousePos[0] & @CR & "Y=" & $MousePos[1])
$colorchara = PixelGetColor($CharaPos[0],$CharaPos[1])
IniWrite($ini, "Section","MXC",$CharaPos[0])
IniWrite($ini, "Section","MYC",$CharaPos[1])
IniWrite($ini, "Section","MCC",$colorchara)
;~ MsgBox(0,"_IsPressed", "color of pixel" & @CR & $colorlogin)
ExitLoop
EndIf
WEnd
MsgBox(0,"Finished...", "Successfully initialized AION Game Launcher" & @CR & @CR & _
"Quit the Game and try AION Game Launcher.exe" & @CR & _
"(if it doesn't input password after 30sec redo Setup.exe)")
IniWrite($ini, "Section","setup","1")
DllClose($dll)
Exit
EndFunc