autoit kill client

05/09/2013 16:21 speacher#1
hey,

I'm trying to make a small script to make my bots go clientless on relog. Guess this should work by killing the sro_client process so:

Code:
 If ProcessExists("sro_client.exe") Then ProcessClose("sro_client.exe")
The problem is that it closes the proces before its even actually starting, so, the client wont start at all, i will never login, and mbot still thinks the client is started, so it wont restart it, and even if it does, the same problem will occur. So in other words I've gotta add a delay before closing the client and thats my problem.
How do i add a delay between the If ProcessExists("sro_client.exe") and Then ProcessClose("sro_client.exe")....was thinking about Sleep(500) with my noob mind, but that doesnt work ofcourse. Help would be appreciated, because at the moment my laptop will crash with many clients opened.
05/10/2013 12:54 miamidolphin#2
Quote:
Originally Posted by speacher View Post
hey,

I'm trying to make a small script to make my bots go clientless on relog. Guess this should work by killing the sro_client process so:

Code:
 If ProcessExists("sro_client.exe") Then ProcessClose("sro_client.exe")
The problem is that it closes the proces before its even actually starting, so, the client wont start at all, i will never login, and mbot still thinks the client is started, so it wont restart it, and even if it does, the same problem will occur. So in other words I've gotta add a delay before closing the client and thats my problem.
How do i add a delay between the If ProcessExists("sro_client.exe") and Then ProcessClose("sro_client.exe")....was thinking about Sleep(500) with my noob mind, but that doesnt work ofcourse. Help would be appreciated, because at the moment my laptop will crash with many clients opened.
1. The bugs are because your code is wrong. You have to know well whats your algorithm is doing.
2. If you kill the process with 3rd program, 99% that the connection will lost, since mbot wont keep the proxy connection alive, only if you press the kill client button in mbot. That button not simply close the sro_client....
What youre looking for is:
-Make a script/program in autoit or c#.net or in anything else which is handling your mbot, like sbot manager or etc. Thats not that hard and there are example codes too, especially for autoit.
05/10/2013 20:52 speacher#3
1st i know its wrong, thats why i ask for help
2nd if i kill the client mbot will switch to clientless, but for that i need to wait till it logged in to the account first, which takes 30 seconds after starting the client, so ild have to add a delay on kill proces of 30 seconds, thast what im asking for, nothing more nothing less
05/10/2013 20:53 Darkness™#4
While 1
If WinExists("XXX [SRO_Client]") Then
Sleep(60000)
ProcessClose(WinGetProcess("XXX [SRO_Client]"))
EndIf
WEnd

This will check if Window name "XXX [SRO_Client] is active, then will wait 2 min and then it will close the process.

replace the XXX with ur char name.

if you need it for more chars just copy this

If WinExists("XXX [SRO_Client]") Then
Sleep(60000)
ProcessClose(WinGetProcess("XXX [SRO_Client]"))
EndIf

and paste again, just change XXX (char name)

i don't remember who give me this script, but credits goes to him :P
05/11/2013 01:16 speacher#5
seems to work fine ;)

@EDIT

got a question tho, i would like to make it go clientless on character selection screen, any idea how? if not, then i will just keep it like this ;)

#request to close thread
05/17/2013 16:50 falsex#6
how can i kill sro_client.exe C# im using

foreach (Process pro in Process.GetProcesses())
{

if (pro.ProcessName.Contains("sro_client"))
{
pro.Kill();
}
}

but give an error "access is denied"
11/11/2013 06:26 maickol#7
Sera que alguien me puede decir si es posible configurar ibot para un servidor privado
11/11/2013 13:32 theoneofgod#8
Depending on the client security, like hackshield, you won't be able to ProcessClose the client.