Key Space

cooco
VIP
Posts: 218
Joined: Fri Feb 17, 2017 2:01 am
Has thanked: 58 times
Been thanked: 85 times

Re: Key Space

Post by cooco » Tue Dec 26, 2017 2:29 am

I think still need to keep aion client foreground

User avatar
Diavolakos
Posts: 114
Joined: Thu Apr 20, 2017 5:05 am
Has thanked: 31 times
Been thanked: 13 times

Re: Key Space

Post by Diavolakos » Tue Dec 26, 2017 11:33 pm

Yes with macro express whatever you have in foreground gets the keys. It is like a clicker with extended usage but only works in a program that is in focus. Nothing in background.

other clickers could allow for something in the background who knows. I haven't tried many clickers.
I play on NA Server Siel

pawelgbw
VIP
Posts: 47
Joined: Fri Feb 10, 2017 8:10 am
Has thanked: 111 times
Been thanked: 14 times

Re: Key Space

Post by pawelgbw » Tue Jan 30, 2018 11:40 am

Code: Select all

    [DllImport("user32.dll")]
    static extern void keybd_event(byte bVk, byte bScan, uint dwFlags, int dwExtraInfo);

    [DllImport("user32.dll")]
    static extern uint MapVirtualKeyEx(uint uCode, uint uMapType, IntPtr dwhkl);
    
    [DllImport("user32.dll")]
    [return: MarshalAs(UnmanagedType.Bool)]
    static extern bool SetForegroundWindow(uint hWnd);
    
    public override void OnLoad()
    {	
    	SetForegroundWindow(Game.Process.ProcessWindowHandle);
    }
    
    public static void EngageFlight()
    {
        if (Game.Process.GetUnsignedInteger(Game.Base() + (ulong)Game.Resolver["ControllerSingle"]["FlightCooldownRemainingTime"].Value) == 0)
        {
            Game.Process.SetByte(Game.Player.GetAddress(0) + Game.Resolver["ActorSingle"]["Action"].Value, 7);
            Thread.Sleep(210);
            keybd_event(0x20, (byte)(MapVirtualKeyEx(0x20, 0, IntPtr.Zero)), 0, 0);
            Thread.Sleep(210);
            keybd_event(0x20, (byte)(MapVirtualKeyEx(0x20, 0, IntPtr.Zero)), 2, 0);
            Game.Process.SetByte(Game.Player.GetAddress(0) + Game.Resolver["ActorSingle"]["Action"].Value, 0);
        }
    }
    
    public static void EngageFlight()
    {
        if (Game.Process.GetUnsignedInteger(Game.Base() + (ulong)Game.Resolver["ControllerSingle"]["FlightCooldownRemainingTime"].Value) == 0)
        {
            float
                pZ = Game.Process.GetFloat(Game.Player.GetAddress(2) + Game.Resolver["ActorPosition"]["Position"].Value + 8);
            keybd_event(0x20, (byte)(MapVirtualKeyEx(0x20, 0, IntPtr.Zero)), 0, 0);
            Thread.Sleep(210);
            keybd_event(0x20, (byte)(MapVirtualKeyEx(0x20, 0, IntPtr.Zero)), 2, 0);
            Thread.Sleep(210);
            Game.Process.SetFloat(Game.Player.GetAddress(2) + Game.Resolver["ActorPosition"]["Position"].Value + 8, pZ + 4);
        }
    }
    
It works with a jump.
KeyMapping: StandingJump=ToggleGliding=Space

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest