If it is possible could you add a method so we can make a plugin that will open the new gifts we are getting every 30m so when AFK we are still getting gifts?
SetTitleMatchMode, 2
loop
{
WinGet, hwnd , ID, - ArcheAge
MsgLeftClick(25, 1000, hwnd)a
Random, sleeptime , 45000, 125000
sleep sleeptime
}
MsgLeftClick(x, y, hwnd) {
PostMessage, 0x200, 0, ((y<<16)^x), , ahk_id%hwnd% ;WN_MOUSEMOVE
Random, sleeptime , 100, 220
sleep sleeptime
PostMessage, 0x200, 0, ((y<<16)^x), , ahk_id%hwnd% ;WN_MOUSEMOVE
PostMessage, 0x201, 0x0001, ((y<<16)^x), , ahk_id%hwnd% ;WM_LBUTTONDOWN
Random, sleeptime , 100, 220
sleep sleeptime
PostMessage, 0x200, 0, ((y<<16)^x), , ahk_id%hwnd% ;WN_MOUSEMOVE
PostMessage, 0x202 , 0, ((y<<16)^x), , ahk_id%hwnd% ;WM_LBUTTONUP
}
the cooldown is kept when you restart the game, so at the very least its also server side. Altho i wouldnt put it past XLgame to not validate the timer when receiving the "getgift" message xD.
That's what I meant. It is most likely not validated. Just a configuration option to block the client clicking the button. Imagine the amount of ArcheBuddy sales this could produce.
PostMessage(hwnd,0x200, 0,((y<<16)|x)); //first move the mouse virtually inside the window
Thread.Sleep(100);
PostMessage(hwnd,0x200, 0,((y<<16)|x)); //move it again just in case the user is also moving the mouse
PostMessage(hwnd,0x201, 1,((y<<16)|x)); //click the position
Thread.Sleep(50);
PostMessage(hwnd,0x200, 0,((y<<16)|x)); //move it again just in case the user is also moving the mouse
PostMessage(hwnd,0x202, 0,((y<<16)|x)); //release the click
to send a physical click to it, you dont need a method. Youd need to get the handle your plugin is attached to (i dont think there a 100% way, but a method similar to the one im using to get the pid would do)
Code:PostMessage(hwnd,0x200, 0,((y<<16)|x)); //first move the mouse virtually inside the window Thread.Sleep(100); PostMessage(hwnd,0x200, 0,((y<<16)|x)); //move it again just in case the user is also moving the mouse PostMessage(hwnd,0x201, 1,((y<<16)|x)); //click the position Thread.Sleep(50); PostMessage(hwnd,0x200, 0,((y<<16)|x)); //move it again just in case the user is also moving the mouse PostMessage(hwnd,0x202, 0,((y<<16)|x)); //release the click
combine that with a way for your plugin to get and remember the hwnd its linked to something similar to https://www.thebuddyforum.com/arche.../199699-pid-archeage-exe-process-running.html, but get the hwnd instead of the pid or just get both (the handle would be process.MainWindowHandle). and tadam, any of your plugin can send click anywhere on the screen of the archeage process its linked to.
It works even if the game is minimized or not in focus
edit:
After looking through the public members of Archebuddy.dll i found one called GetGameClientHandle(), it return a pointer to an int. Im not sure if it return the window handle or something else (cant test right now due to AB being unupdated),
Code:SetTitleMatchMode, 2 loop..... [/QUOTE] Cheers for that , but a plugin would be much more needed. Running multiple bots in grindmode , and a passive side plugin which clicks it would be amazing. Otherwise I gotta make a macro which cycles through the windows all 30 min.