What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

How to send a key press for a certain skill?

mscard02

New Member
Joined
Nov 10, 2014
Messages
40
Reaction score
0
How would i get tell archebuddy to press the "0" key, or use a skill in a certain bar slot?
 
To send keys to game client, I think it must be visible and foreground and you can use imported User32.dll functions.
I don't know if AB can do it itself.
Code:
[B]using System.Diagnostics; // Process
using System.Runtime.InteropServices; // DllImport[/B]
//...
// import the function in your class
[DllImport ("User32.dll")]
static extern int SetForegroundWindow(IntPtr point);

//...

Process p = Process.GetProcessesByName([B]"arch" + "eage"[/B]).FirstOrDefault(); [B]//Obscuring to prevent this post from search sites[/B]
if (p != null)
{
    IntPtr h = p.MainWindowHandle;
    SetForegroundWindow(h);
    SendKeys.SendWait("f"); //Put the key you wish here
}

Press the action slot 0:
Code:
var [B]slot0[/B] = me.getActionSlots().Find(f => f.slotId == [B]1[/B] && f.type == ActionSlotType.Skill);

if ([B]slot0[/B] != null)
{
    UseSkill((uint)(slot0.actionId))
}
ps.: Pay attemption about slotId vs action slot numbers.
 
Last edited:
Back
Top