Hello guys, as i learned some JAVA and C# now i decided to do some stuff for silkroad, just for fun..
My questions are, how i can attach my program to silkroad client, for example, im doing a simple autoclicker i want to attach it to client and allow him to press keys ONLY in silkroad window, that means i can minimize silkroad window and program wont be pressing keys in windows, just in silkroad window..
I started to code that and i have a little problem with sro_Client..
Code:
Process[] procs = Process.GetProcessesByName("sro_client");
foreach (Process p in procs)
{
IntPtr pFoundWindow = p.MainWindowHandle;
p.CloseMainWindow();
}
}
This should close my window, but it does not.. Same as
Are you sure PlaySRO doesn't use XTrap? That might cause problems too.
Well im not sure.. They may use XTrap.. Ok since they are secured, is there any way to break that? i mean, many bots are working on those versions, even if they are secured.. Im wondering how? Packets?
Most of the bots work with packets so if you do it right xtrap won´t notice it. But if you try to mess with the memory xtrap can detect it. I´m not sure what works and what doesn´t if xtrap is enabled since I´m a not newb at the game hacking thing.
Well im sure that's the security of client.. Im totally newbie in packets etc.. Seems that i need to start learning that .. Now making a simple Autoclicker with a simple fuctions seems to be more complicated ever ..
const UInt32 WM_KEYDOWN = 0x0100;
const int VK_RETURN = 0x0D;
const int VK_F8 = 0x77;
const int VK_F9 = 0x78;
const int A = 0x41;
[DllImport("user32.dll")]
static extern bool PostMessage(IntPtr hWnd, UInt32 Msg, int wParam, int lParam);
[DllImport("USER32.DLL", CharSet = CharSet.Unicode)]
public static extern IntPtr FindWindow(string lpClassName,
string lpWindowName);
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
public static extern IntPtr FindWindowEx(IntPtr hwNd, IntPtr chhwNd, string lclassName, string windowTitle);
static void Main(string[ ] args) {
try {
IntPtr mainWindow = FindWindow(null, "SRO_Client");
if (mainWindow == IntPtr.Zero)
{
Console.WriteLine("Nie znaleziono okna silkroad'a");
return;
}
IntPtr childWindow = FindWindowEx(mainWindow, IntPtr.Zero ,"Edit", null);
PostMessage(childWindow, WM_KEYDOWN, VK_RETURN, 0);
PostMessage(mainWindow, WM_KEYDOWN, VK_F8, 0);
PostMessage(childWindow, WM_KEYDOWN, VK_F9, 0);
PostMessage(childWindow, WM_KEYDOWN, A, 0);
PostMessage(mainWindow, WM_KEYDOWN, A, 0);
} catch
{
Console.WriteLine("Nie dziala");
}
}
}
}
I wrote that kind of code, probably wrong, but u can make corrects, anyway.. Code is sending informations to MainWindow, but it seems to do not send or even find childWindow..