Sign in to follow this  
Followers 0
jonathan2133

help making a macro... wont do anything while im in game...

4 posts in this topic

Like the title says, i need help with a macro... basically i want it to log me in... easy enough...

But

When i run the program, it seems to shut out everything that doesnt come from the keyboard... i dont know how...

The game is SilkRoad Online in case anyone wants to download it... its a pretty large file and protected by gameguard... ya i know im crazy for tryin. For those of you that dont know, gameguard is one of the largest anti hacking programs out there, and games protected by it are nearly unhackable. nearly. Also it updates every week or so because it is possable to bypass the gameguard stuff, but that emans making a new client to run the games, and its a long involved process... we wont go there.

Anyways, i got the following script from online. He shared the source (nice guy that he is) and i took a walk through it... pretty easy to get the hang of...

#include <GuiConstants.au3> 
Opt("SendKeyDelay", 1) 
HotKeySet("{PAUSE}", "Pause")
HotKeySet("{ESC}", "Closeall")

;##############################################################################
; Globals
;##############################################################################
Global $Paused
Global $SRoadPath
Global $SRoadExe
Global $SRoadLauncher
Global $SRoadClient
Global $Account
Global $Password
Global $LDelay
Global $CDelay
Global $RDelay
Global $ADelay
Global $PDelay

;##############################################################################
; Variables & IniReads
;##############################################################################
$Date = @MDAY & "/" & @MON & " ~ " & @HOUR & ":" & @MIN & ":" & @SEC & " > "
$Restart = 0
$Line = 0

If FileExists("SRO_autologin.ini") Then
$SRoadPath = IniRead ("SRO_autologin.ini", "Settings", "SRoadPath", "")
$SRoadExe = IniRead ("SRO_autologin.ini", "Settings", "SRoadExe", "")
$SRoadLauncher = IniRead ("SRO_autologin.ini", "Settings", "Launcher", "")
$SRoadClient = IniRead ("SRO_autologin.ini", "Settings", "Client", "")
$Account = IniRead ("SRO_autologin.ini", "Settings", "Account", "")
$Password = IniRead ("SRO_autologin.ini", "Settings", "Password", "")
$LDelay = IniRead ("SRO_autologin.ini", "Settings", "LauncherDelay", "")
$CDelay = IniRead ("SRO_autologin.ini", "Settings", "ClientDelay", "")
$RDelay = IniRead ("SRO_autologin.ini", "Settings", "RestartDelay", "")
$ADelay = IniRead ("SRO_autologin.ini", "Settings", "AccountDelay", "")
$PDelay = IniRead ("SRO_autologin.ini", "Settings", "PasswordDelay", "")

Else
IniWrite ("SRO_autologin.ini", "Settings", "SRoadPath ", ' "e:\Program Files\Silkroad"')
IniWrite ("SRO_autologin.ini", "Settings", "SRoadExe ", ' "Silkroad.exe"')
IniWrite ("SRO_autologin.ini", "Settings", "Launcher ", ' "Silkroad Online Launcher"')
IniWrite ("SRO_autologin.ini", "Settings", "Client ", ' "SRO_Client"')
IniWrite ("SRO_autologin.ini", "Settings", "Account ", ' "My Account"')
IniWrite ("SRO_autologin.ini", "Settings", "Password ", ' "My Password"')
IniWrite ("SRO_autologin.ini", "Settings", "LauncherDelay ", ' "1000"')
IniWrite ("SRO_autologin.ini", "Settings", "ClientDelay ", ' "3000"')
IniWrite ("SRO_autologin.ini", "Settings", "RestartDelay ", ' "3000"')
IniWrite ("SRO_autologin.ini", "Settings", "AccountDelay ", ' "1000"')
IniWrite ("SRO_autologin.ini", "Settings", "PasswordDelay ", ' "500"')

$SRoadPath = IniRead ("SRO_autologin.ini", "Settings", "SRoadPath", "")
$SRoadExe = IniRead ("SRO_autologin.ini", "Settings", "SRoadExe", "")
$SRoadLauncher = IniRead ("SRO_autologin.ini", "Settings", "Launcher", "")
$SRoadClient = IniRead ("SRO_autologin.ini", "Settings", "Client", "")
$Account = IniRead ("SRO_autologin.ini", "Settings", "Account", "")
$Password = IniRead ("SRO_autologin.ini", "Settings", "Password", "")
$LDelay = IniRead ("SRO_autologin.ini", "Settings", "LauncherDelay", "")
$CDelay = IniRead ("SRO_autologin.ini", "Settings", "ClientDelay", "")
$RDelay = IniRead ("SRO_autologin.ini", "Settings", "RestartDelay", "")
$ADelay = IniRead ("SRO_autologin.ini", "Settings", "AccountDelay", "")
$PDelay = IniRead ("SRO_autologin.ini", "Settings", "PasswordDelay", "")

EndIf

;##############################################################################
; Create GUI
;##############################################################################
GuiCreate("###### SilkRoad Online Auto logger V1.0 Final ~ By Julmuri ######", 482, 305)
$FileMenu = GuiCtrlCreateMenu("File")
$FileItem = GuiCtrlCreateMenuitem ("Open...",$FileMenu)
$HelpMenu = GuiCtrlCreateMenuitem ("Help",$FileMenu)
$ExitItem = GuiCtrlCreateMenuitem ("Exit",$FileMenu) 
$AboutMenu = GuiCtrlCreateMenu("About")
$AboutItem = GuiCtrlCreateMenuitem ("About",$AboutMenu) 
$GeneralLabel = GuiCtrlCreateLabel("General:", 50, 2, 150, 20)
$PathLabel = GuiCtrlCreateLabel("Path", 15, 20, 49, 16)
$PathInput = GuiCtrlCreateInput($SRoadPath , 80, 20 ,130, 18)
$ExecutableLabel = GuiCtrlCreateLabel("Executable", 15, 40, 54, 20)
$ExecutableInput = GuiCtrlCreateInput($SRoadExe , 80, 40 ,130, 18)
$LauncherLabel = GuiCtrlCreateLabel("Launcher", 15, 60, 49, 20)
$LauncherInput = GuiCtrlCreateInput($SRoadLauncher , 80, 60 ,130, 18)
$ClientLabel = GuiCtrlCreateLabel("Client", 15, 80, 49, 20)
$ClientInput = GuiCtrlCreateInput($SRoadClient , 80, 80 ,130, 18)
$AccountLabel = GuiCtrlCreateLabel("Account", 15, 100, 49, 20)
$AccountInput = GuiCtrlCreateInput($Account , 80, 100 ,130, 18)
$PasswordLabel = GuiCtrlCreateLabel("Password", 15, 120, 49, 20)
$PasswordInput = GuiCtrlCreateInput($Password , 80, 120 ,130, 18, $ES_PASSWORD)
$LoginLabel = GuiCtrlCreateLabel("Login Delays: (In milliseconds)", 250, 2, 150, 20)
$LDelayLabel = GuiCtrlCreateLabel("Launcher Delay:", 230, 20, 90, 20)
$LDelayInput = GuiCtrlCreateInput($LDelay , 320, 20 ,50, 18, $ES_NUMBER)
$CDelayLabel = GuiCtrlCreateLabel("Client Delay:", 230, 40, 90, 20)
$CDelayInput = GuiCtrlCreateInput($CDelay , 320, 40 ,50, 18, $ES_NUMBER)
$RDelayLabel = GuiCtrlCreateLabel("Restart Delay:", 230, 60, 90, 20)
$RDelayInput = GuiCtrlCreateInput($RDelay , 320, 60 ,50, 18, $ES_NUMBER)
$ADelayLabel = GuiCtrlCreateLabel("Account Delay:", 230, 80, 90, 20)
$ADelayInput = GuiCtrlCreateInput($ADelay , 320, 80 ,50, 18, $ES_NUMBER)
$PDelayLabel = GuiCtrlCreateLabel("Password Delay:", 230, 100, 90, 20)
$PDelayInput = GuiCtrlCreateInput($PDelay , 320, 100 ,50, 18, $ES_NUMBER)
$ConsoleEdit = GUICtrlCreateEdit("", 15, 160, 450, 110, $ES_READONLY + $WS_VSCROLL)
$GuiCloseButton = GUICtrlCreateButton("Close", 425, 120, 40, 25)
$GuiSaveButton = GUICtrlCreateButton("Save", 425, 90, 40, 25)
$GuiLoginButton = GUICtrlCreateButton("Login", 425, 60, 40, 25)
GUISetState() 

;##############################################################################
; Main
;##############################################################################
SetConsole("SilkRoad auto login script started.")
SetConsole("Version 1.0 Final.")
SetConsole("Made by Julmuri.")

While 1
            $Msg = GuiGetMsg()
    
    Select

        Case    $Msg =  $GuiSaveButton
                $PathRead = GUICtrlRead ($PathInput) 
                IniWrite ("SRO_autologin.ini", "Settings", "SRoadPath", $PathRead)
                $ExeRead = GUICtrlRead ($ExecutableInput)
                IniWrite ("SRO_autologin.ini", "Settings", "SRoadExe", $ExeRead)
                $LauncherRead = GUICtrlRead ($LauncherInput) 
                IniWrite ("SRO_autologin.ini", "Settings", "Launcher", $LauncherRead)
                $ClientRead = GUICtrlRead ($ClientInput)
                IniWrite ("SRO_autologin.ini", "Settings", "Client", $ClientRead)
                $AccountRead = GUICtrlRead ($AccountInput)
                IniWrite ("SRO_autologin.ini", "Settings", "Account", $AccountRead)
                $PasswordRead = GUICtrlRead ($PasswordInput) 
                IniWrite ("SRO_autologin.ini", "Settings", "Password", $PasswordRead)
                $LDelayRead = GUICtrlRead ($LDelayInput)  
                IniWrite ("SRO_autologin.ini", "Settings", "LauncherDelay", $LDelayRead)
                $CDelayRead = GUICtrlRead ($CDelayInput) 
                IniWrite ("SRO_autologin.ini", "Settings", "ClientDelay", $CDelayRead)
                $RDelayRead = GUICtrlRead ($RDelayInput) 
                IniWrite ("SRO_autologin.ini", "Settings", "RestartDelay", $RDelayRead)
                $ADelayRead = GUICtrlRead ($ADelayInput) 
                IniWrite ("SRO_autologin.ini", "Settings", "AccountDelay", $ADelayRead)
                $PDelayRead = GUICtrlRead ($PDelayInput) 
                IniWrite ("SRO_autologin.ini", "Settings", "PasswordDelay", $PDelayRead)
                SetConsole("Settings saved.") 

            Case    $Msg =  $FileItem
                    $file = FileOpenDialog("Choose file...",@ScriptDir & "\"," (*.ini)")
                SetConsole("Open config file")
                $SRoadPath = IniRead ($file, "Settings", "SRoadPath", "")
                GUICtrlSetData ($PathInput, $SRoadPath)
                $SRoadExe = IniRead ($file, "Settings", "SRoadExe", "")
                GUICtrlSetData ($ExecutableInput, $SRoadExe)
                $SRoadLauncher = IniRead ($file, "Settings", "Launcher", "")
                GUICtrlSetData ($LauncherInput, $SRoadLauncher)
                $SRoadClient = IniRead ($file, "Settings", "Client", "")
                GUICtrlSetData ($ClientInput, $SRoadClient)
                $Account = IniRead ($file, "Settings", "Account", "")
                GUICtrlSetData ($AccountInput, $Account)
                $Password = IniRead ($file, "Settings", "Password", "")
                GUICtrlSetData ($PasswordInput, $Password)
                $LDelay = IniRead ($file, "Settings", "LauncherDelay", "")
                GUICtrlSetData ($LDelayInput, $LDelay)
                $CDelay = IniRead ($file, "Settings", "ClientDelay", "")
                GUICtrlSetData ($CDelayInput, $CDelay)
                $RDelay = IniRead ($file, "Settings", "RestartDelay", "")
                GUICtrlSetData ($RDelayInput, $RDelay)
                $ADelay = IniRead ($file, "Settings", "AccountDelay", "")
                GUICtrlSetData ($ADelayInput, $ADelay)
                $PDelay = IniRead ($file, "Settings", "PasswordDelay", "")
                GUICtrlSetData ($PDelayInput, $PDelay)
        
        Case    $Msg =  $HelpMenu
                SetConsole("HELP > Path => Specify your Silkroad path here.")
                SetConsole("HELP > Executable => Specify your Silkroad executable here.")
                SetConsole("HELP > Launcer => Specify your Silkroad launcher title here.")
                SetConsole("HELP > Client => Specify your Silkroad Client title here.")
                SetConsole("HELP > Account => Specify your Silkroad Account here. ")
                SetConsole("HELP > Password => Specify your Silkroad Account Password here.")
                SetConsole("HELP > All delays are in milliseconds ex. 1000mils. = 1sec")
                SetConsole("HELP > Launcher Delay => Time how long script sleeps")
                SetConsole("HELP > after launching the launcher.")
                SetConsole("HELP > Increase Launcher Delay if Script cant get past launcher.")
                SetConsole("HELP > Client Delay => Time how long script sleeps after launching")
                SetConsole("HELP > the client.")
                SetConsole("HELP > Increase Client Delay if script starts login before client is up.")
                SetConsole("HELP > Restart Delay => Time how long script sleeps when restarting")
                SetConsole("HELP > SilkRoad online")
                SetConsole("HELP > Increase Restart Delay if script isnt restarting SilkRoad.")
                SetConsole("HELP > Account Delay => Time how long script sleeps when typing")
                SetConsole("HELP > your account.")
                SetConsole("HELP > Increse Account Delay if script doesnt type your hole")
                SetConsole("HELP > password to account screen.")
                SetConsole("HELP > Password Delay => Time how long script sleeps when typing")
                SetConsole("HELP > your password.")
                SetConsole("HELP > Increse Password Delay if script doesnt type your hole")
                SetConsole("HELP > password to password screen.")
                SetConsole("HELP > Press Save button to save your configurations.")
                SetConsole("HELP > You must save your configurations before starting the login.")
                SetConsole("HELP > Press Login button to start login.")

        Case    $Msg =  $AboutItem
                SetConsole("SilkRoad Online auto login script")
                SetConsole("If you downloaded this some where else then")
                SetConsole("http://www.netikka.net/julmuri/.... and you got hacked,")
                SetConsole("dont come crying at me.")
                SetConsole("Version 1.0 Final")
                SetConsole("Made with AutoIt v3")
                SetConsole("Made by Julmuri")

        Case    $Msg =  $GUI_EVENT_CLOSE 
            Exit

        Case    $Msg =  $ExitItem
            Exit

        Case    $Msg =  $GuiCloseButton
            Exit    
        
        Case    $Msg =  $GuiLoginButton
                $SRoadPath = IniRead ("SRO_autologin.ini", "Settings", "SRoadPath", "")
                $SRoadExe = IniRead ("SRO_autologin.ini", "Settings", "SRoadExe", "")
                $Restart = 1
                SetConsole("Login script started.")
            While 1
                SetConsole("(Re)Starting SilkRoad online.")
            If  $Restart = 1        Then
                Run ($SRoadPath & "\" & $SRoadExe)
                $Restart = 0
            EndIf

            Do 
                Sleep(1000)
            Until   WinActive ($SRoadLauncher)
                SetConsole("SilkRoad Launcher found.") 
                Sleep ($LDelay)
                WinMove ($SRoadLauncher, "", 0, 0)
                Sleep (5000)
                  MouseClick ("Left", 590, 355, 1, 0)

            Do 
                Sleep (5000)    
            Until   WinActive ($SRoadClient) 
                SetConsole("SilkRoad Client found.") 
                Sleep ($CDelay)
                  MouseClick ("Left", 400, 300, 1, 0)
                Sleep (500)
                  MouseClick ("Left", 542, 435, 1, 0)
                SetConsole("Sending account information.") 
                Sleep (500)
                Send ($Account)
                Sleep ($ADelay)
                Send ("{TAB}")
                Send ($Password)
                Sleep ($PDelay)
                  MouseClick ("Left", 460, 560, 1, 0)
                SetConsole("Starting login sequence") 

            If  PixelGetCOlor (626, 334) = 0    Then
            Do
                Sleep (5000)
                Send ("{Enter}")
            Until   PixelGetCOlor (626, 334) <> 0
                Sleep (2000)
                Send ("{Enter}")
                Sleep ($RDelay)

            If  WinExists ($SRoadClient) = 1    Then 
                SetConsole("GL HF , you got in;]") 
                ExitLoop
            Else
                $Restart = 1
                SetConsole("Disconnected ,restarting.") 
                ContinueLoop
            EndIf
            EndIf       
            Wend
    EndSelect
WEnd

;##############################################################################
; Funcs
;##############################################################################
Func SetConsole($Text)
                $Line = $Line + 1
                GUICtrlSetData ($ConsoleEdit, $Date & $Text & @CRLF, $Line)
EndFunc

Func Pause()
                $Paused = NOT $Paused
    While           $Paused
                    Sleep (100)
                    ToolTip('"Autologin paused"',0,0)
    WEnd
                    ToolTip("")
EndFunc

Func Closeall()
                ProcessClose("SRO_autologin.exe")
EndFunc

basically it runs the program, waits till the approperate screen, and tries typing in the username / password. personally i dont like delays, and set pixel triggers... so when the screen shows a certian color at a certian spot, go from there...

I made the approperiate modifications, and tried it... nothing. So i brought out another helpfull tool i sort of made... very basic but it gets the job done...

do
$pos = MouseGetPos()
$color = PixelGetColor ( $pos[0] , $pos[1] )
ToolTip ( $pos[0] & "," & $pos[1] & @LF & $color );, $pos[0] , $pos[1] )
until 1 = 2

That nifty bit of business shows the coor under the mouse... so i ran that, booted up the game, and after gameguard started and the game loaded, it showed the color to be 0... everywhere... not pleasant. So i added some hotkeys to make it move the mouse, not going to post that bit of code it was pretty messy, but the mouse didnt move, ended the game, tried it again, the mouse moved.

Conclusion: the game is blocking autoit from seeing the game and from sending commands. Well lets try one more thing, just because we can. Theres a hotkey to get items on the ground... G... so i decided to make a program to spam G... see what happens... well i start the game, log in, go to where some items are, start autoit, and nothing... press G on the keyboard and it picks up the item. Go to notepad and see gggggggggggggggggggggggggggggggggggggggggg so i know its working in notepad.

Final thought...

Im lost. Dont know what to do. Is there a way to get around this? has anyone ever seen this happen before? its really gotten me confused. Maybe if there was a way to make it send like a key down... key up sort of thing... i know u can do that with the mouse but i dont know about it with the keyboard. Or.... whatever. I dont know. Just if u have ideas please post here, eh? lol.

Share this post


Link to post
Share on other sites



seems to be my very old autologin script 8) anyways, yes gameguard is blocking autoit scripts.

i would suggest you to wait that 0x33.org releases their sbounce proggy, iv been on test crew for while and

its working pretty nicely. it bypasses gg and have zoomhack & multiclient 8)

Share this post


Link to post
Share on other sites

seems to be my very old autologin script 8) anyways, yes gameguard is blocking autoit scripts.

i would suggest you to wait that 0x33.org releases their sbounce proggy, iv been on test crew for while and

its working pretty nicely. it bypasses gg and have zoomhack & multiclient 8)

Any possable chance i could get the beta off you?

And for everyone else, any idea how i could mask autoit so gameguard doesnt detect it?

Share this post


Link to post
Share on other sites

i was messing around and found somthing interesting... I made a script that would open silkroad, wait for the window to load, click the button to launch, and press space when i got 2 error messages, and run in the background untill silkroad closed when i got another 2 error mesages (the fault of my computer, not the game or autoit)

well i compiled the script and gameguard found a trojan in it... i found this somewhat strange. Anyways, running it as a .au3 file gameguard didnt seem to have a problem with the file, it just masks the pixelcolor. And seems to prevent autoit pressing keys... anyways i thought this was strange, but may offer hope as it may not mean the end of autoit working with gameguard

just thought i may add this... if anyone has any ideas dont hesitate to add them

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0