Key Space
- Diavolakos
- Posts: 114
- Joined: Thu Apr 20, 2017 5:05 am
- Has thanked: 31 times
- Been thanked: 13 times
Re: Key Space
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.
other clickers could allow for something in the background who knows. I haven't tried many clickers.
I play on NA Server Siel
-
- VIP
- Posts: 47
- Joined: Fri Feb 10, 2017 8:10 am
- Has thanked: 111 times
- Been thanked: 14 times
Re: Key Space
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);
}
}
KeyMapping: StandingJump=ToggleGliding=Space
Who is online
Users browsing this forum: No registered users and 1 guest