Jump to content

Why Wont My Enter Command Work?


Recommended Posts

this is a script that one of the users here posted, i decided i was going to edit it a bit (im not too advanced so i cant really COMPLETELY build my own yet). I got it all working, except for when it disconnects, it will load the game back up, and continue to do what is needed, except for pushing enter every 60 seconds, which is very much needed, here is the code.... yet again i dont take credit for making this whole thing, though i did edit some of it already and much more to come.

$SCrack = ("C:\Documents and Settings\David\Desktop\Bot110\SCrack.exe")
$SRO = ("C:\Program Files\Silkroad\Silkroad.exe")
$SROExe = ("sro_client.exe")
$SROClient = ("SRO_Client")
$Account = ("acct")
$Password = ("password")
$SROLauncher = ("Silkroad Online Launcher")
$Connected = 0
$Disconnected = 0
;=================================================
While   $Connected = 0
    StartPrograms()
    Connect()
    If $Connected = 1 Then
    StartBot()
    EndIf
Wend

While $Connected = 1
    While    $Disconnected = 0
        sleep (2500)
        ControlSend($SROClient, "", "", "{ENTER}")
        Sleep (60000)
        If  ProcessExists ($SROExe) Then
        $Disconnected = 0
        Else
        $Disconnected = 1
        $Connected = 0
        WinKill ($SROExe)
        EndIf   
    Wend
While   $Connected = 0
    StartPrograms()
    Connect()
    If $Connected = 1 Then
    StartBot()
    EndIf
Wend
wend
;==================================================
Func StartPrograms()
Run($SCrack)
Sleep(4000)
Run($SRO)
EndFunc

Func Connect()
WinActive ($SROLauncher)
    Sleep (5000)
    ControlClick ($SROLauncher, "", 1000)

Sleep (7500)

WinActivate ($SROClient)
    Sleep (1000)
      MouseClick ("Left", 674, 550, 1, 0)
    Sleep (2000)
      MouseClick ("Left", 674, 550, 1, 0)
    Sleep (2000)
    Send ($Account)
    Sleep (1000)
    Send ("{TAB}")
    Send ($Password)
    Sleep (1000)
    WinActivate ($SROClient)
    Send ("{ENTER}")

Sleep(7500)

MouseClick ("Left", 397, 500, 3, 5); Press first character
Sleep (5000)
MouseClick ("Left", 992, 939, 2, 0); press start
If   WinExists ($SROClient) = 1  Then
    $Connected = 1
Else
    $Connected = 0
EndIf
EndFunc

Func StartBot()
Sleep(10000)
MouseWheel("down", 8);Just to expand visual distance ingame
sleep (100)
Send("{INSERT}")
sleep(100)
MouseClick ("Left", 800, 337, 1, 10);close pet inventory
sleep(200)
MouseClick ("Left", 11, 960, 4, 3); Expands Chat window
sleep(2000)
If  PixelGetColor(39, 93) <> 16202041   Then
do
Send("e");open AutoMatch
sleep(1000)
MouseClick ("Left", 513, 717, 1, 10); Press AutoMatch
sleep(1000)
MouseClick ("Left", 596, 659, 1, 10); Press Confirm
sleep(1000)
Send("e")
Until   PixelGetColor(39, 93) = 16202041
endif
EndFunc

any help would be greatly appreciated, thanks for your time

Link to comment
Share on other sites

try throwing a

While 1
Sleep(60000)
send("{ENTER}")
Wend

In, i dunno where you need it, but that pushes enter every 60 secs

EDIT: accedently pushed tab and then Enter while typing, my bad

Edited by Paulie
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...